Skip to content
This repository was archived by the owner on Mar 17, 2024. It is now read-only.

Release/v0.6.0 1 #261

Merged
merged 167 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
2f6cfb3
Removing apps and projecttemplates folders
carmat88 Dec 10, 2021
3489f32
updating chartcontroller utils
carmat88 Dec 10, 2021
aa252ee
Replacing with new charts: gatekeeper and keycloak removed
carmat88 Dec 10, 2021
132ed66
Removing controller app
carmat88 Dec 10, 2021
df9f9a4
Removing dataset app
carmat88 Dec 10, 2021
ba1cd98
New common app - User registration and authentication features
carmat88 Dec 10, 2021
eb7238b
Removing files app
carmat88 Dec 10, 2021
2282802
Removing ingress app
carmat88 Dec 10, 2021
298e8dd
Removing keycloak from modules, yet keeping folder for future dev.
carmat88 Dec 10, 2021
62c6465
Removing reports app
carmat88 Dec 10, 2021
2ee0fce
Removing studio_admin app
carmat88 Dec 10, 2021
d08218d
Removing workflows app
carmat88 Dec 10, 2021
c5cb31d
Adding cluster.conf file for local dev with docker-compose
carmat88 Dec 10, 2021
d202e36
Updating docker-compose related files
carmat88 Dec 10, 2021
77e80fd
Adding default_auto_field in all apps.py
carmat88 Dec 10, 2021
09e68a0
Removing other keycloak related files
carmat88 Dec 10, 2021
a6251b1
Updating settings.py
carmat88 Dec 10, 2021
9f8d8d7
Updating studio (django) project templates
carmat88 Dec 10, 2021
6a95936
Cleaning and updating static folder
carmat88 Dec 10, 2021
669a8d6
Cleaning and updating scripts
carmat88 Dec 10, 2021
90a080c
Cleaning and updating projects app
carmat88 Dec 10, 2021
98f50c8
Cleaning and updating portal app
carmat88 Dec 10, 2021
6b0d7af
Updating models app
carmat88 Dec 10, 2021
a9cd8bd
Cleaning chartcontroller values folder
carmat88 Dec 10, 2021
3c13aa5
Updating apps app
carmat88 Dec 10, 2021
ce5678e
Updating api app
carmat88 Dec 10, 2021
6b041e9
updating settings.py
carmat88 Dec 10, 2021
47b1192
Removing keycloak leftovers
carmat88 Dec 10, 2021
f1c68a8
Updating studio requirements.txt
carmat88 Dec 10, 2021
3f82f80
Cleaning and updating studio urlconf
carmat88 Dec 10, 2021
daffa3c
Correcting models urlsconf
carmat88 Dec 10, 2021
3cf2547
Forgot to update portal app views
carmat88 Dec 10, 2021
485f766
updating .gitignore
carmat88 Dec 10, 2021
e8fc5a8
Fixing import errors
carmat88 Dec 10, 2021
b96ec47
Updating docker-compose with dev image
carmat88 Dec 10, 2021
a7b8841
Updating studio settings.py
carmat88 Dec 10, 2021
f47d2c6
Renaming fixtures json files
carmat88 Dec 13, 2021
a5dec95
Correcting studio script
carmat88 Dec 13, 2021
0887e6c
Refreshing migrations
carmat88 Dec 13, 2021
56e806a
Correcting fixture filename
carmat88 Dec 13, 2021
00d72d7
Extending waiting time in relation to studio
carmat88 Dec 13, 2021
d2597e5
Updating Dockerfile for local dev
carmat88 Dec 13, 2021
bbeae24
Correcting fixtures
carmat88 Dec 13, 2021
e7274db
Using ImageField for logo_file
carmat88 Dec 13, 2021
0ecb425
Refreshing migrations
carmat88 Dec 13, 2021
541c6f4
Fixing image name
carmat88 Dec 13, 2021
e448d6d
Updating settings and urls
carmat88 Dec 13, 2021
5e94b67
Updating .gitignore
carmat88 Dec 15, 2021
fbcc521
new landing image
carmat88 Dec 15, 2021
77bdc23
Updating celery related tasks
carmat88 Dec 15, 2021
a86685c
Uploading project templates logo
carmat88 Dec 15, 2021
49efc87
Restructuring image assets and updating related files
carmat88 Dec 15, 2021
2b4942f
Fixing templates
carmat88 Dec 15, 2021
f0f260f
Adding django-extensions - runscript command
carmat88 Dec 15, 2021
73c87e7
rename some charts folder
carmat88 Dec 15, 2021
e7381a8
updating apps fixtures with new folder names
carmat88 Dec 15, 2021
f68f608
Create script for pre-populating apps images
carmat88 Dec 15, 2021
77f072a
Updating urlsconf with static and media files path
carmat88 Dec 15, 2021
64b31c6
updating .gitignore
carmat88 Dec 15, 2021
345d1ae
update .gitignore
carmat88 Dec 15, 2021
9ea2c63
Updating pre-loading scripts
carmat88 Dec 15, 2021
67c9ce7
Fixing apps fixtures
carmat88 Dec 15, 2021
1b01ad5
Correcting some charts slug name
carmat88 Dec 15, 2021
4118e9e
Fixing Ingress Bad Gateway Error
carmat88 Dec 23, 2021
4bec084
Updating Dockerfile
carmat88 Dec 23, 2021
92603b2
Fixing charts
carmat88 Dec 23, 2021
36ceceb
Fixing Dockerfile
carmat88 Dec 23, 2021
00a42f6
Updating project templates fixture
carmat88 Dec 23, 2021
9531188
Fixing VScode chart
carmat88 Dec 24, 2021
94715d0
Renaming models fixtures
carmat88 Dec 24, 2021
968ae3b
Updating starter script
carmat88 Dec 24, 2021
3c72261
Updating templates
carmat88 Dec 24, 2021
7f20670
Renaming fixture file
carmat88 Dec 24, 2021
60b8514
Updating some apps urlconf
carmat88 Dec 27, 2021
789e004
Updating static assets
carmat88 Dec 27, 2021
9903de2
Removing unused assets
carmat88 Dec 27, 2021
9e9e867
Updating some apps views
carmat88 Dec 27, 2021
6e663d1
UI/UX improvements
carmat88 Dec 27, 2021
ad05673
Removing misplaced file
carmat88 Dec 27, 2021
368d2c6
Removing outdated components/folders
carmat88 Dec 27, 2021
8c56919
Decoupling FEDn from base STACKn
carmat88 Dec 27, 2021
85f54e2
Adding script for loading FEDn
carmat88 Dec 27, 2021
2a485c1
Updating scripts
carmat88 Dec 27, 2021
06dfbc5
Updating template
carmat88 Dec 27, 2021
1bb1bf7
Updating root/landing url settings
carmat88 Dec 28, 2021
f22e08f
Updating loading scripts
carmat88 Dec 28, 2021
170fc3c
Fixing issue with creation of resources from templates
carmat88 Dec 28, 2021
c09c731
Updating timeout for javascript
carmat88 Dec 28, 2021
e236289
Improving backend print logs
carmat88 Dec 29, 2021
5cb545f
Renaming chart folder and updating related files
carmat88 Dec 29, 2021
4c50543
STACKn cli login refactoring
carmat88 Jan 5, 2022
34d421c
Adding model form views for creating an object
carmat88 Jan 5, 2022
54c85d1
Updating login command
carmat88 Jan 10, 2022
2c5bf1f
Updating stackn.py - better log info
carmat88 Jan 16, 2022
84443f9
updating login template style
carmat88 Jan 16, 2022
095ac3f
Details about studio URL and domain
carmat88 Jan 16, 2022
d5746fe
Testing minio service with multiple ports
carmat88 Jan 16, 2022
0e40ffd
Adding network aliases with nip.io
carmat88 Jan 16, 2022
d2c666e
Updating s3 minio connection
carmat88 Jan 18, 2022
6657803
Updating cli-settings for jupyter-lab chart
carmat88 Jan 18, 2022
0f76e88
Updating minio deplopyment chart
carmat88 Jan 18, 2022
db243b8
Updating css style class for bottom links
carmat88 Jan 18, 2022
2db0ba0
Update form buttons
carmat88 Jan 20, 2022
b842418
Removing debug log print
carmat88 Jan 20, 2022
27fcfb3
Updating cli and fixtures for model object creation
carmat88 Jan 20, 2022
e3ed760
Improving UI models views
carmat88 Jan 20, 2022
5636c13
Improving UI projects/apps views
carmat88 Jan 20, 2022
0c91617
Fix for handling url scheme for minio host connection
carmat88 Jan 20, 2022
012be28
Correcting scheme handling
carmat88 Jan 20, 2022
c45b9a3
Merge: correcting scheme handling
carmat88 Jan 20, 2022
2967d15
Adding global value for model-object creation
carmat88 Jan 25, 2022
7ec98d2
Updating view for creating model objects
carmat88 Jan 25, 2022
efaee3f
Pinning dependecies versions
carmat88 Jan 26, 2022
3aa736d
Updating model creation feature
carmat88 Jan 26, 2022
3b3e97e
Adding comment to celery scripts
carmat88 Jan 28, 2022
42360f3
Allowing to init DB only once with fixtures and data
carmat88 Jan 28, 2022
b138964
Updating Model Object Types
carmat88 Jan 28, 2022
59c4b76
Updating docker-compose.yaml
carmat88 Jan 28, 2022
9060220
Updating some migrations
carmat88 Feb 1, 2022
55aa05f
new ObjectType field app_slug
carmat88 Feb 1, 2022
0a87fb4
Updating some serve apps slug
carmat88 Feb 1, 2022
e946031
Updating ObjectType fixtures with new app_slug field
carmat88 Feb 1, 2022
7906cf2
Updating model creation and serve UI features
carmat88 Feb 1, 2022
3cb0115
Removing unecessary locals variable
carmat88 Feb 1, 2022
4761738
Adding flag for init and fedn
carmat88 Feb 1, 2022
bbede8c
Changing default init flag value
carmat88 Feb 1, 2022
90b8441
Handling possible exceptions
carmat88 Feb 1, 2022
2d7e79d
Increasing time for flash-messages
carmat88 Feb 1, 2022
c5a8e02
Adding form field for creating new environments
carmat88 Feb 1, 2022
2464d5d
Renaming some of the serve apps folder
carmat88 Feb 3, 2022
bee19eb
Updating env variable
carmat88 Feb 3, 2022
61b0606
Updating serve apps config with specific default object type
carmat88 Feb 3, 2022
ae689f1
Updating serialize_model method
carmat88 Feb 3, 2022
200c859
Updating Tensorflow chart
carmat88 Feb 3, 2022
8d2f895
Correcting model uid value when saved in DB
carmat88 Feb 3, 2022
c507d50
Correcting mistake: wrong script name
carmat88 Feb 3, 2022
eaee691
Fixing FastAPI serve app
carmat88 Feb 4, 2022
b8f4a32
Updating html templates
carmat88 Feb 4, 2022
3f3ab6b
Model creation: saving extra fields
carmat88 Feb 4, 2022
331b7ab
Simplifying script
carmat88 Feb 4, 2022
4b415b8
Adding html form field validation
carmat88 Feb 9, 2022
72ea2db
Updating PyTorch serve app
carmat88 Feb 9, 2022
ecbc4d0
Correcting comment
carmat88 Feb 9, 2022
f6bb188
Updating bootstrap script
carmat88 Feb 9, 2022
c5bd3e7
Adding badge for showing if a model is published or not
carmat88 Feb 10, 2022
828389f
Removing comments and enabling again view
carmat88 Feb 10, 2022
e959331
Creating home tab and related view/url
carmat88 Feb 10, 2022
2dbf9da
Updating template: removing style tag
carmat88 Feb 10, 2022
5590855
Update README.md
carmat88 Feb 11, 2022
5792bd4
Adding simple init shell script for bootstraping STACKn
carmat88 Feb 11, 2022
ae3e23f
Update README.md
carmat88 Feb 11, 2022
7042b34
Updating init related files
carmat88 Feb 11, 2022
35de363
Updating project table fields
carmat88 Feb 11, 2022
09a77f6
Create Values folder
carmat88 Feb 14, 2022
8ada3ff
Removing deprecated Telepresence settings
carmat88 Feb 16, 2022
21949e1
Improving line 91
carmat88 Feb 21, 2022
cc4180f
Improving check_Status method
carmat88 Feb 21, 2022
bdddfb5
Update docker-compose.yml
carmat88 Feb 21, 2022
dc877b6
Temp fix for connecting to minio
carmat88 Feb 25, 2022
8ce7122
Merge branch 'release/v0.6.0-1' of github.com:scaleoutsystems/stackn …
carmat88 Feb 25, 2022
b7f44bd
Update README.md
ahellander Mar 10, 2022
f919f06
Update requirements.txt
Mar 11, 2022
9372409
Merge pull request #262 from scaleoutsystems/mcapuccini-patch-1
Mar 11, 2022
771c1a5
ingress auth request for jupyter lab
Wrede Mar 30, 2022
fb62fb5
update README
Wrede Mar 30, 2022
de0d155
Merge branch 'release/v0.6.0-1' of github.com:scaleoutsystems/stackn …
Wrede Mar 30, 2022
49f8acc
Merge branch 'develop' into release/v0.6.0-1
Wrede Mar 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
components/studio/chartcontroller/values/
# About Studio (Django)
components/studio/chartcontroller/values/*
components/studio/cluster.conf
components/studio/media

# Byte-compiled / optimized / DLL files
.idea/
Expand Down Expand Up @@ -141,4 +144,4 @@ tele_settings_worker.py

bin/
pyvenv.cfg
share/
share/
104 changes: 49 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ STACKn is a machine learning platform that lets data scientist collaborate on pr
</p>



With an intuitive web UI, users can create private or shared projects in which various data science applications can be deployed, such as
- Dataset: project storage volumes, object stores, and databases for storing and sharing datasets.
- Environments and apps: Jupyter notebooks, VSCode, MLFlow etc. for experimentation and training models with pre-configured data science environments.
- STACKn Models: enables trained models to be deployed and served using tools such as Tensorflow Serving, PyTorch Serve and MLFlow Serve, which in turn enables deployment of analytics apps and custom UIs using served model endpoints (Dash, Flask etc).

STACKn has been designed to be highly customizable (but comes packaged with the most widely used applications) and cloud agnostic. STACKn deployments can be configured on any infrastructure that implements the Kubernetes API, and is packaged using Helm charts.

STACKn also integrates [FEDn](https://github.com/scaleoutsystems/fedn), a framework for federated machine learning which enables collaborative projects between stakeholders where data cannot be shared due to private, regulatory or practical reasons.
<br />
<br />

# Setup a local deployment
This deployment is for quick testing on Debian/Ubuntu and will not require any TLS certificates. For a production deployment, please see the [documentation](https://scaleoutsystems.github.io/stackn/#/?id=setup).
<br />
Expand Down Expand Up @@ -57,87 +56,82 @@ microk8s config >> ~/.kube/config
5. Finally, install the latest version of Helm since microk8s is usually not packaged with the latest Helm version.
**Follow the instructions** [here](https://helm.sh/docs/intro/install/#from-apt-debianubuntu)

## Install STACKn
## Install STACKn for Local Development with Docker-Compose

1. Clone Helm chart repo for STACKn
1. Clone this repository locally:
```
git clone https://github.com/scaleoutsystems/charts.git
$ git clone https://github.com/scaleoutsystems/stackn.git
```
2. A template file for values.yaml can be found in “charts/scaleout/stackn”
Please make sure to follow the instructions that you will find **at the beginning of this file** in order to set some required values, such as:

- StorageClass for microk8s is “microk8s-hostpath”
2. Navigate to the directory “components/studio“:
```
$ cd stackn/components/studio
```
At this directory there are two files that need to be quickly modified before running the command `docker-compose up`:
- `cluster.conf`
- update this file with your kubernetes cluster config by running: `$ microk8s config > ./cluster.conf`

- Search and replace **all** occurrences of `<your-domain.com>` with your local IP domain. It can be useful to use a wildcard dns such as [nip.io](http://nip.io). For example, if your local IP is 192.168.1.10 then the `<your-domain.com>` field becomes `192.168.1.10.nip.io`
- `docker-compose.yaml`
- update this file by searching and replacing **all** occurrences of `<your-domain>` with your local IP domain. It can be useful to use a wildcard dns such as [nip.io](http://nip.io). For example, if your local IP is 192.168.1.10 then the `<your-domain>` field becomes `192.168.1.10.nip.io`

- Set `oidc.verify_ssl = false`, this will enable insecure options (without certificates)
- `studio/settings.py`
- update this file, like the previous file, replace the occurence of `<your-domain>` with your local IP domain

- Setting passwords are optional, but we recommend setting `global.studio.superUser` and `global.studio.superUserPassword` since these are required in step 6., if these are left blank passwords will be auto generated.

- Copy your kubernetes cluster config and paste it in the values.yaml under the `cluster_config` field. Your kubernetes config file should be locate under the path `$HOME/.kube`; otherwise if you have followed this tutorial and used microk8s, then run the command:
**Note:** We have created a quite basic shell utility script that takes care of the above manual changes. You can find it under the same directory (i.e. `stackn/components/studio`) and it is called [`init.sh`](https://github.com/scaleoutsystems/charts/blob/release/v0.6.0/scaleout/stackn/values-utility-script.sh).

3. Finally, fire up STACKn with the following simple command:
```
microk8s config
$ docker-compose up
```
**Note:** in the `docker-compose.yaml` file, it is important to know and be aware that there exists two useful flags for the studio container which default values are:
- `INIT=true`
- `FEDN=false`

3. After the `values.yaml` is set, install STACKn via helm. This will take several minutes:
```
helm install stackn charts/scaleout/stackn -f values.yaml
```
**Note:** Instead of directly using the `values.yaml` file, one could make a copy out of it and use that. For instance:
```bash
cp values.yaml my-values.yaml
vim my-values.yaml # perform all the necessary changes
helm install stackn charts/scaleout/stackn -f my-values.yaml
```
This flags are used by the studio container when starting the web server with the script [`run_web.sh`](https://github.com/scaleoutsystems/stackn/blob/release/v0.6.0-1/components/studio/scripts/run_web.sh).

4. Go to studio in your browser: (for example `studio.stackn.192.168.1.10.nip.io`)
```
https://studio.<your-domain.com>
```
5. Register a new user. Press "sign in"
The `INIT` flag tells the studio container whether the initial database migrations, fixtures and admin user should be created. This means that such flag should be set to `true` whenever a fresh instance/deployment of STACKn is needed. **Otherwise you must change this to `false` after the first initialization, or you will run into database migrations errors.**

6. Go to django admin page:
The `FEDN` flag tells the studio container whether [FEDn](https://github.com/scaleoutsystems/fedn) should be enabled and integrated by running the related database migrations and fixtures. Same thing here, such flag should be set to `true` whenever a fresh instance/deployment with FEDn enabled is needed. **Otherwise you must change back this to `false` after the first initialization, or you will run into database migrations errors.**

## Install STACKn as an Helm Chart

1. Clone the Helm chart repository for STACKn
```
https://studio.<your-domain.com>/admin
$ git clone https://github.com/scaleoutsystems/charts.git
```
- Sign in with the superuser which was set in helm values (\<global\>.studio.superUser and \<global\>.studio.superUserPassword). If these values were omitted, the password can be found in the Secret "stackn" and superUser is by default "admin".
2. A template file for values.yaml can be found in “charts/scaleout/stackn”
Please make sure to follow the instructions that you will find **at the beginning of this file** in order to set some required values, such as:

- Go to "Users" tab and click on the user you created earlier.
- StorageClass for microk8s is “microk8s-hostpath”

- Give the user all permission (superuser, staff), then “save”.
- Search and replace **all** occurrences of `<your-domain.com>` with your local IP domain. It can be useful to use a wildcard dns such as [nip.io](http://nip.io). For example, if your local IP is 192.168.1.10 then the `<your-domain.com>` field becomes `192.168.1.10.nip.io`

## Install default apps and project templates
- Setting passwords are optional, but we recommend setting `global.studio.superUser` and `global.studio.superUserPassword` since these are required in step 6., if these are left blank passwords will be auto generated.

- Copy your kubernetes cluster config and paste it in the values.yaml under the `cluster_config` field. Your kubernetes config file should be locate under the path `$HOME/.kube`; otherwise if you have followed this tutorial and used microk8s, then run the command:

1. Clone this repository
```
git clone https://github.com/scaleoutsystems/stackn.git
```
2. Install STACKn CLI
```
cd stackn/cli
sudo python3 setup.py install
$ microk8s config
```
3. Login with the user (which you created in studio)

**Note:** We have created a quite basic shell utility script that takes care of the manual changes of the `values.yaml`. You can find it in the same Helm chart repository for STACKn and it is called [`values-utility-script.sh`](https://github.com/scaleoutsystems/charts/blob/release/v0.6.0/scaleout/stackn/values-utility-script.sh). Run it in order to modify the `values.yaml` file:
```
stackn login -u <user-email> -p <password> --insecure --url studio.<your-domain.com>
$ ./values-utility-script.sh
```

4. Install the project templates.

```
cd ../../projecttemplates/default
stackn create projecttemplate --insecure
cd ../fedn-mnist/
stackn create projecttemplate --insecure
3. After the `values.yaml` is set, install STACKn via helm. This will take several minutes:
```
5 . Install apps
$ helm install stackn charts/scaleout/stackn -f values.yaml
```
cd ../../apps
stackn create apps --insecure
**Note:** Instead of directly using the `values.yaml` file, one could make a copy out of it and use that. For instance:
```bash
$ cp values.yaml my-values.yaml
$ vim my-values.yaml # perform all the necessary changes
$ helm install stackn charts/scaleout/stackn -f my-values.yaml
```

## Start using STACKn
Open studio in your browser and create a new project. Here are [tutorials](https://github.com/scaleoutsystems/examples/tree/main/tutorials/studio) to get you started! Happy STACKning!
Open studio in your browser (for example `studio.stackn.192.168.1.10.nip.io:8080`), register a new user with the "Sign up" button and create a new project.. Here are [tutorials](https://github.com/scaleoutsystems/examples/tree/main/tutorials/studio) to get you started! Happy STACKning!
<br />
<br />
# Where is STACKn used?
Expand Down
45 changes: 0 additions & 45 deletions apps/dash-app/chart/templates/gatekeeper-config.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions apps/dash-app/chart/templates/service.yaml

This file was deleted.

47 changes: 0 additions & 47 deletions apps/docker-registry/chart/templates/gatekeeper-config.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions apps/docker-registry/chart/templates/ingress.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions apps/docker-registry/chart/templates/nginx_conf.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions apps/docker-registry/chart/templates/service.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions apps/docker-registry/chart/values.yaml

This file was deleted.

Loading