Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Commit 0556361

Browse files
authored
Helm charts refactor(#139)
* refactor helm charts * first draft of the new Travis CI script * first draft of the new Travis CI script * add helm init for CI * enhance CI script * fix typo in script * package helm chart and move to docs repo for helm chart hosting preparation * condense the 4 helm charts into 3 * update detailed installation guide * update developer guide * update helm chart naming
1 parent c57f73b commit 0556361

53 files changed

Lines changed: 381 additions & 383 deletions

Some content is hidden

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

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ script:
3636
# fail fast
3737
- set -e
3838
- export MAKE_ARGS=--no-print-directory
39+
- export VM_TYPE=minikube
3940
# Open SSH
4041
# - echo travis:$sshpassword | sudo chpasswd
4142
# - sudo sed -i 's/ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
@@ -48,9 +49,14 @@ script:
4849
- make $MAKE_ARGS gen-certs
4950
- make $MAKE_ARGS build
5051
- make $MAKE_ARGS docker-build
51-
- make $MAKE_ARGS create-volumes
52-
# deploy services
53-
- make $MAKE_ARGS deploy
52+
# initialize helm tiller
53+
- helm init
54+
- while ! (kubectl get pods --all-namespaces | grep tiller-deploy | grep '1/1'); do sleep 5; done
55+
# Prepare any local/static volume as the shared file system and deploy all the helper micro-services for ffdl
56+
- helm install docs/helm-charts/ffdl-helper-0.1.1.tgz --set prometheus.deploy=false,localstorage=true --wait
57+
# Deploy all the core ffdl services.
58+
- export IMAGE_TAG=user-$(whoami)
59+
- helm install docs/helm-charts/ffdl-core-0.1.1.tgz --set trainer.version=${IMAGE_TAG},restapi.version=${IMAGE_TAG},lcm.version=${IMAGE_TAG},trainingdata.version=${IMAGE_TAG},databroker.tag=${IMAGE_TAG},databroker.version=${IMAGE_TAG},webui.version=${IMAGE_TAG} --wait
5460
# submit a test job
5561
- make $MAKE_ARGS test-submit-minikube-ci
5662

Chart.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ WHOAMI ?= $(shell whoami)
2020
IMAGE_TAG ?= user-$(WHOAMI)
2121
TEST_SAMPLE ?= tf-model
2222
# VM_TYPE is "vagrant", "minikube" or "none"
23-
VM_TYPE ?= minikube
23+
VM_TYPE ?= none
2424
HAS_STATIC_VOLUMES?=false
2525
TEST_USER = test-user
2626
SET_LOCAL_ROUTES ?= 0

README.md

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ To know more about the architectural details, please read the [design document](
1919
* `helm`: The Kubernetes package manager (https://helm.sh)
2020
* `docker`: The Docker command-line interface (https://www.docker.com/)
2121
* `S3 CLI`: The [command-line interface](https://aws.amazon.com/cli/) to configure your Object Storage
22-
* An existing Kubernetes cluster (e.g., [Kubeadm-DIND](https://github.com/kubernetes-sigs/kubeadm-dind-cluster#using-preconfigured-scripts) for local testing).
22+
* An existing Kubernetes cluster (e.g., [Kubeadm-DIND](https://github.com/kubernetes-sigs/kubeadm-dind-cluster#using-preconfigured-scripts) for local testing or Follow the appropriate instructions for standing up your Kubernetes cluster using [IBM Cloud Public](https://github.com/IBM/container-journey-template/blob/master/README.md) or [IBM Cloud Private](https://github.com/IBM/deploy-ibm-cloud-private/blob/master/README.md)). The minimum capacity requirement for FfDL is 4GB Memory and 3 CPUs.
2323
<!-- For Minikube, use the command `make minikube` to start Minikube and set up local network routes. Minikube **v0.25.1** is tested with Travis CI. -->
24-
* Follow the appropriate instructions for standing up your Kubernetes cluster using [IBM Cloud Public](https://github.com/IBM/container-journey-template/blob/master/README.md) or [IBM Cloud Private](https://github.com/IBM/deploy-ibm-cloud-private/blob/master/README.md)
25-
* The minimum capacity requirement for FfDL is 4GB Memory and 3 CPUs.
2624

2725
## Usage Scenarios
2826

@@ -37,8 +35,8 @@ To know more about the architectural details, please read the [design document](
3735
## Steps
3836

3937
1. [Quick Start](#1-quick-start)
40-
- 1.1 [Installation using Kubeadm-DIND](#11-installation-using-kubeadm-dind)
41-
- 1.2 [Installation using Kubernetes Cluster](#12-installation-using-kubernetes-cluster)
38+
- 1.1 [Installation using Kubernetes Cluster](#11-installation-using-kubernetes-cluster)
39+
- 1.2 [Installation using Kubeadm-DIND](#12-installation-using-kubeadm-dind)
4240
2. [Test](#2-test)
4341
3. [Monitoring](#3-monitoring)
4442
4. [Development](#4-development)
@@ -48,57 +46,55 @@ To know more about the architectural details, please read the [design document](
4846

4947
## 1. Quick Start
5048

51-
There are multiple installation paths for installing FfDL into an existing Kubernetes cluster. Below are the steps for quick install. If you want to follow more detailed step by step instructions , please visit [the detailed installation guide](docs/detailed-installation-guide.md)
49+
There are multiple installation paths for installing FfDL into an existing Kubernetes cluster. Below are the steps for quick install. If you want to follow more detailed step by step instructions , please visit [the detailed installation guide](docs/detailed-installation-guide.md)
5250

53-
> If you are using bash shell, you can modify the necessary environment variables in `env.txt` and export all of them using the following commands
54-
> ```shell
55-
> source env.txt
56-
> export $(cut -d= -f1 env.txt)
57-
> ```
51+
* You need to initialize tiller with `helm init` before running the following commands.
5852

59-
### 1.1 Installation using Kubeadm-DIND
53+
### 1.1 Installation using Kubernetes Cluster
54+
55+
To install FfDL to any proper Kubernetes cluster, make sure `kubectl` points to the right namespace,
56+
then deploy the platform services:
6057

61-
If you have [Kubeadm-DIND](https://github.com/kubernetes-sigs/kubeadm-dind-cluster#using-preconfigured-scripts) installed on your machine, use these commands to deploy the FfDL platform:
6258
``` shell
63-
export VM_TYPE=dind
64-
export PUBLIC_IP=localhost
65-
export SHARED_VOLUME_STORAGE_CLASS="";
6659
export NAMESPACE=default # If your namespace does not exist yet, please create the namespace `kubectl create namespace $NAMESPACE` before running the make commands below
60+
export SHARED_VOLUME_STORAGE_CLASS="ibmc-file-gold" # Change the storage class to what's available on your Cloud Kubernetes Cluster.
6761

68-
make deploy-plugin
69-
make quickstart-deploy
62+
helm install ibmcloud-object-storage-plugin --name ibmcloud-object-storage-plugin --repo https://ibm.github.io/FfDL/helm-charts --set namespace=$NAMESPACE # Configure s3 driver on the cluster
63+
helm install ffdl-helper --name ffdl-helper --repo https://ibm.github.io/FfDL/helm-charts --set namespace=$NAMESPACE,shared_volume_storage_class=$SHARED_VOLUME_STORAGE_CLASS --wait # Deploy all the helper micro-services for ffdl
64+
helm install ffdl-core --name ffdl-core --repo https://ibm.github.io/FfDL/helm-charts --set namespace=$NAMESPACE,lcm.shared_volume_storage_class=$SHARED_VOLUME_STORAGE_CLASS --wait # Deploy all the core ffdl services.
7065
```
7166

72-
### 1.2 Installation using Kubernetes Cluster
73-
74-
To install FfDL to any proper Kubernetes cluster, make sure `kubectl` points to the right namespace,
75-
then deploy the platform services:
76-
> Note: For PUBLIC_IP, put down one of your Cluster Public IP that can access your Cluster's NodePorts. For IBM Cloud, you can get your Public IP with `bx cs workers <cluster_name>`.
67+
### 1.2 Installation using Kubeadm-DIND
7768

69+
If you have [Kubeadm-DIND](https://github.com/kubernetes-sigs/kubeadm-dind-cluster#using-preconfigured-scripts) installed on your machine, use these commands to deploy the FfDL platform:
7870
``` shell
79-
export VM_TYPE=none
80-
export PUBLIC_IP=<Cluster Public IP>
81-
export NAMESPACE=default # If your namespace does not exist yet, please create the namespace `kubectl create namespace $NAMESPACE` before running the make commands below
71+
export SHARED_VOLUME_STORAGE_CLASS=""
72+
export NAMESPACE=default
8273

83-
# Change the storage class to what's available on your Cloud Kubernetes Cluster.
84-
export SHARED_VOLUME_STORAGE_CLASS="ibmc-file-gold";
74+
./bin/s3_driver.sh # Copy the s3 drivers to each of the DIND node
75+
helm install ibmcloud-object-storage-plugin --name ibmcloud-object-storage-plugin --repo https://ibm.github.io/FfDL/helm-charts --set namespace=$NAMESPACE,cloud=false
76+
helm install ffdl-helper --name ffdl-helper --repo https://ibm.github.io/FfDL/helm-charts --set namespace=$NAMESPACE,shared_volume_storage_class=$SHARED_VOLUME_STORAGE_CLASS,localstorage=true --wait
77+
helm install ffdl-core --name ffdl-core --repo https://ibm.github.io/FfDL/helm-charts --set namespace=$NAMESPACE,lcm.shared_volume_storage_class=$SHARED_VOLUME_STORAGE_CLASS --wait
8578

86-
make deploy-plugin
87-
make quickstart-deploy
79+
# Forward the necessary microservices from the DIND cluster to your localhost.
80+
./bin/dind-port-forward.sh
8881
```
8982

9083
## 2. Test
9184

9285
To submit a simple example training job that is included in this repo (see `etc/examples` folder):
86+
> Note: For PUBLIC_IP, put down one of your Cluster Public IP that can access your Cluster's NodePorts. You can check your Cluster Public IP with `kubectl get nodes -o wide`.
87+
> For IBM Cloud, you can get your Public IP with `bx cs workers <cluster_name>`.
9388
9489
``` shell
90+
export PUBLIC_IP=<Cluster Public IP> # Put down localhost if you are running with Kubeadm-DIND
9591
make test-push-data-s3
9692
make test-job-submit
9793
```
9894

9995
## 3. Monitoring
10096

101-
The platform ships with a simple Grafana monitoring dashboard. The URL is printed out when running the `deploy` make target.
97+
The platform ships with a simple Grafana monitoring dashboard. The URL is printed out when running the `status` make target.
10298

10399
## 4. Development
104100

@@ -107,12 +103,11 @@ Please refer to the [developer guide](docs/developer-guide.md) for more details.
107103
## 5. Clean Up
108104
If you want to remove FfDL from your cluster, simply use the following commands.
109105
```shell
110-
helm delete $(helm list | grep ffdl | awk '{print $1}' | head -n 1)
106+
helm delete --purge ffdl-core ffdl-helper
111107
```
112-
If you want to remove the storage driver and pvc from your cluster, run:
108+
If you want to remove the storage driver from your cluster, run:
113109
```shell
114-
kubectl delete pvc static-volume-1
115-
helm delete $(helm list | grep ibmcloud-object-storage-plugin | awk '{print $1}' | head -n 1)
110+
helm delete --purge ibmcloud-object-storage-plugin
116111
```
117112
For Kubeadm-DIND, you need to kill your forwarded ports. Note that the below command will kill all the ports that are created with `kubectl`.
118113
```shell

bin/s3_driver.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
declare -a arrNodes=($(docker ps --format '{{.Names}}' | grep "kube-node-\|kube-master"))
44
for node in "${arrNodes[@]}"
55
do
6-
docker cp $FFDL_PATH/bin/ibmc-s3fs $node:/root/ibmc-s3fs
7-
docker cp $FFDL_PATH/bin/s3fs $node:/usr/local/bin/s3fs
6+
docker cp ./bin/ibmc-s3fs $node:/root/ibmc-s3fs
7+
docker cp ./bin/s3fs $node:/usr/local/bin/s3fs
88
docker exec -i $node /bin/bash <<_EOF
99
apt-get -y update
1010
apt-get -y install s3fs

0 commit comments

Comments
 (0)