33- [ Kubernetes deployment for proWES] ( #kubernetes-deployment-for-wes )
44 - [ Usage] ( #usage )
55 - [ Updates] ( #updates )
6- - [ Using with an external MongoDB] ( #using-with-an-external-mongodb )
7- - [ Setting up RabbitMQ for testing on OpenShift] ( #setting-up-rabbitmq-for-testing-on-openshift )
86 - [ Technical details] ( #technical-details )
97 - [ MongoDB] ( #mongodb )
108 - [ RabbitMQ] ( #rabbitmq )
@@ -53,95 +51,46 @@ Create a Kubernetes Secret from the `.netrc` file:
5351kubectl create secret generic netrc --from-file .netrc
5452```
5553
56- After this you can deploy proWES using ` kubectl ` :
54+ You need to edit the ` values.yaml ` file to specify your ` applicationDomain ` and the ` clusterType `
5755
58- ``` bash
59- cd deployment/common/wes
60- ls wes-* | xargs -L1 kubectl create -f
61- ```
62-
63- Once proWES is deployed, you can expose it with the YAML files found under
64- ` deployment/ingress ` . Which file to use depends on your cluster and how ingress
65- is configured there.
66-
67- Creating an OpenShift Route:
56+ After this you can deploy proWES using ` helm ` :
6857
6958``` bash
70- cd deployment/ingress
71- oc create -f wes-route.yaml
59+ helm install prowes . -f values.yaml
7260```
7361
7462### Updates
7563
76- If you make changes to any of the Deployments, you can update them with
77- ` kubectl ` . For example, this is how you would update the Celery worker Deployment :
64+ If you want to edit any of the Deployments, you can update them with
65+ ` helm ` and the ` values.yaml ` file. Once edited, you can run this command :
7866
7967``` bash
80- kubectl replace -f wes-celery-deployment .yaml
68+ helm upgrade prowes . -f values .yaml
8169```
8270
83- The OpenShift specific objects need to be updated using the ` oc ` tool instead.
84- Also, if you update the Route you must use the ` --force ` flag. This removes and
85- recreates the Route.
86-
8771If you want to point to a different FTP server or change the login credentials
8872for the current FTP server, you can update the ` .netrc ` secret like so:
8973
9074``` bash
9175kubectl create secret generic netrc --from-file .netrc --dry-run -o yaml | kubectl apply -f -
9276```
9377
94- If you want to update the configuration, you can update the ConfigMap or use a
95- different ConfigMap with the same name. The Deployments expect to find the
96- ` app_config.yaml ` ConfigMap with the name ` wes-config ` . You can update the
97- ConfigMap like so:
98-
99- ``` bash
100- kubectl replace -f wes-configmap.yaml
101- ```
102-
103- ### Using with an external MongoDB
104-
105- In certain situations, you may want to run an external MongoDB. There is an
106- example headless service file for this case under ` deployment/mongodb ` .
107-
108- Make a copy of the example Service:
109-
110- ``` bash
111- cd deployment/mongodb
112- cp mongodb-service-external.yaml.example mongodb-service-external.yaml
113- ```
114-
115- Edit the ` mongodb-service-external.yaml ` file and under ` externalName ` add your
116- external MongoDB's host name. After this, create the Service:
117-
118- ``` bash
119- kubectl create -f mongodb-service-external.yaml
120- ```
78+ ## Technical details
12179
122- It is assumed that the external MongoDB already has a database called
123- ` prowes-db ` created and a user with read-write access available. Next you
124- will need to configure the MongoDB user and password in a secret (replace
125- ` <username> ` and ` <password> ` ):
80+ ### MongoDB
12681
127- ``` bash
128- kubectl create secret generic mongodb --from-literal=database-user=< username> --from-literal=database-password=< password>
129- ```
82+ The MongoDB database is deployed using:
13083
131- Depending on your MongoDB provider, the port may differ from 27017. In this
132- case, you will need to modify the Deployment files accordingly to use the
133- correct port (replace ` <my external mongodb port> ` ):
84+ - ` templates/mongodb/mongodb-deployment.yaml `
13485
135- ``` bash
136- cd deployment/common
137- find . -name * .yaml | xargs -L1 sed -i -e ' s/27017/<my external mongodb port>/g'
138- ```
86+ ### RabbitMQ
13987
140- After this you can deploy proWES (see above).
88+ The message broker RabbitMQ that allows the app to communicate with the worker
89+ is deployed using:
14190
142- ## Technical details
91+ - ` templates/rabbitmq/rabbitmq-deployment.yaml `
14392
144- ### ApplicaWES
93+ ### WES
14594
14695proWES consists of five deployments: a Flask server and a Celery worker. These
14796are deployed using:
@@ -150,22 +99,14 @@ are deployed using:
15099- ` templates/prowes/celery-deployment.yaml `
151100
152101These deployments depend on setting up a shared ReadWriteMany volume between
153- Flask and Celery (` wes-volume.yaml ` ) and a shared ConfigMap
154102(` wes-configmap.yaml ` ).
155103
156- ### MongoDB
157104
158- The MongoDB database is deployed using:
159-
160- - ` templates/mongodb/mongodb-deployment.yaml `
161-
162- ### RabbitMQ
105+ ## Destroy
163106
164- The message broker RabbitMQ that allows the app to communicate with the worker
165- is deployed using:
107+ Simply run:
166108
167- - ` templates/rabbitmq/rabbitmq-deployment.yaml `
109+ ``` bash
110+ helm uninstall prowes
111+ ```
168112
169- The disadvantage with this template is that it only works with OpenShift because
170- it uses objects that are only available in OpenShift. For plain Kubernetes a
171- different approach needs to be used.
0 commit comments