Skip to content

Commit d286de3

Browse files
authored
Merge pull request scaleoutsystems#261 from scaleoutsystems/release/v0.6.0-1
Release/v0.6.0 1
2 parents 8b98d89 + 49f8acc commit d286de3

File tree

1,004 files changed

+54307
-26627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,004 files changed

+54307
-26627
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
components/studio/chartcontroller/values/
1+
# About Studio (Django)
2+
components/studio/chartcontroller/values/*
3+
components/studio/cluster.conf
4+
components/studio/media
25

36
# Byte-compiled / optimized / DLL files
47
.idea/
@@ -141,4 +144,4 @@ tele_settings_worker.py
141144

142145
bin/
143146
pyvenv.cfg
144-
share/
147+
share/

README.md

+49-55
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@ STACKn is a machine learning platform that lets data scientist collaborate on pr
1717
</p>
1818

1919

20-
2120
With an intuitive web UI, users can create private or shared projects in which various data science applications can be deployed, such as
2221
- Dataset: project storage volumes, object stores, and databases for storing and sharing datasets.
2322
- Environments and apps: Jupyter notebooks, VSCode, MLFlow etc. for experimentation and training models with pre-configured data science environments.
2423
- 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).
2524

2625
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.
2726

28-
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.
2927
<br />
3028
<br />
29+
3130
# Setup a local deployment
3231
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).
3332
<br />
@@ -57,87 +56,82 @@ microk8s config >> ~/.kube/config
5756
5. Finally, install the latest version of Helm since microk8s is usually not packaged with the latest Helm version.
5857
**Follow the instructions** [here](https://helm.sh/docs/intro/install/#from-apt-debianubuntu)
5958

60-
## Install STACKn
59+
## Install STACKn for Local Development with Docker-Compose
6160

62-
1. Clone Helm chart repo for STACKn
61+
1. Clone this repository locally:
6362
```
64-
git clone https://github.com/scaleoutsystems/charts.git
63+
$ git clone https://github.com/scaleoutsystems/stackn.git
6564
```
66-
2. A template file for values.yaml can be found in “charts/scaleout/stackn”
67-
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:
6865

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

71-
- 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`
74+
- `docker-compose.yaml`
75+
- 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`
7276

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

75-
- 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.
76-
77-
- 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:
80+
**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).
7881

82+
3. Finally, fire up STACKn with the following simple command:
7983
```
80-
microk8s config
84+
$ docker-compose up
8185
```
86+
**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:
87+
- `INIT=true`
88+
- `FEDN=false`
8289

83-
3. After the `values.yaml` is set, install STACKn via helm. This will take several minutes:
84-
```
85-
helm install stackn charts/scaleout/stackn -f values.yaml
86-
```
87-
**Note:** Instead of directly using the `values.yaml` file, one could make a copy out of it and use that. For instance:
88-
```bash
89-
cp values.yaml my-values.yaml
90-
vim my-values.yaml # perform all the necessary changes
91-
helm install stackn charts/scaleout/stackn -f my-values.yaml
92-
```
90+
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).
9391

94-
4. Go to studio in your browser: (for example `studio.stackn.192.168.1.10.nip.io`)
95-
```
96-
https://studio.<your-domain.com>
97-
```
98-
5. Register a new user. Press "sign in"
92+
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.**
9993

100-
6. Go to django admin page:
94+
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.**
95+
96+
## Install STACKn as an Helm Chart
97+
98+
1. Clone the Helm chart repository for STACKn
10199
```
102-
https://studio.<your-domain.com>/admin
100+
$ git clone https://github.com/scaleoutsystems/charts.git
103101
```
104-
- 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".
102+
2. A template file for values.yaml can be found in “charts/scaleout/stackn”
103+
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:
105104

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

108-
- Give the user all permission (superuser, staff), then “save”.
107+
- 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`
109108

110-
## Install default apps and project templates
109+
- 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.
110+
111+
- 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:
111112

112-
1. Clone this repository
113-
```
114-
git clone https://github.com/scaleoutsystems/stackn.git
115-
```
116-
2. Install STACKn CLI
117113
```
118-
cd stackn/cli
119-
sudo python3 setup.py install
114+
$ microk8s config
120115
```
121-
3. Login with the user (which you created in studio)
116+
117+
**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:
122118
```
123-
stackn login -u <user-email> -p <password> --insecure --url studio.<your-domain.com>
119+
$ ./values-utility-script.sh
124120
```
125121

126-
4. Install the project templates.
127-
128-
```
129-
cd ../../projecttemplates/default
130-
stackn create projecttemplate --insecure
131-
cd ../fedn-mnist/
132-
stackn create projecttemplate --insecure
122+
3. After the `values.yaml` is set, install STACKn via helm. This will take several minutes:
133123
```
134-
5 . Install apps
124+
$ helm install stackn charts/scaleout/stackn -f values.yaml
135125
```
136-
cd ../../apps
137-
stackn create apps --insecure
126+
**Note:** Instead of directly using the `values.yaml` file, one could make a copy out of it and use that. For instance:
127+
```bash
128+
$ cp values.yaml my-values.yaml
129+
$ vim my-values.yaml # perform all the necessary changes
130+
$ helm install stackn charts/scaleout/stackn -f my-values.yaml
138131
```
132+
139133
## Start using STACKn
140-
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!
134+
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!
141135
<br />
142136
<br />
143137
# Where is STACKn used?

apps/dash-app/chart/templates/gatekeeper-config.yaml

-45
This file was deleted.

apps/dash-app/chart/templates/service.yaml

-12
This file was deleted.

apps/docker-registry/chart/templates/gatekeeper-config.yaml

-47
This file was deleted.

apps/docker-registry/chart/templates/ingress.yaml

-46
This file was deleted.

apps/docker-registry/chart/templates/nginx_conf.yaml

-23
This file was deleted.

apps/docker-registry/chart/templates/service.yaml

-12
This file was deleted.

apps/docker-registry/chart/values.yaml

-18
This file was deleted.

0 commit comments

Comments
 (0)