Commits (6)
......@@ -47,21 +47,24 @@
## Deployment OpenMOLE in cluster kubernetes
* Prerequisite
* Kubernetes cluster deployed
* Docker image for `openmole-connect`. Here we use image `mm768528/openmole-connect:latest` on Docker Hub. View [here](https://gitlab.com/GuoAdeline/openmole-kubernetes/tree/master/docker/make_docker_image_for_openmole) to see how to make docker image.
* Kubernetes cluster deployed.
* Docker image for `openmole-connect`. Here we use image `mm768528/openmole-connect:latest` on Docker Hub. View [here](https://gitlab.com/GuoAdeline/openmole-kubernetes/tree/master/docker/make_docker_image_for_openmole) to see how to make docker image. You can use your own image by changing it in the ninth line of file `/deployment_openmole/openmole.sh`
* Public hostname associated to one of your machines. Replace the hostname `intern.iscpif.fr` in the file `/deployment_openmole/connect_ing.yaml` with your own hostname.
* Connect to one of the node machines, for exemple:
ssh ubuntu@
**Attention :** Remember to disable Swap on Kubernetes Node : `sudo swapoff -a`, otherwise Kubernetes will not work properly.
* Deployment in node machine :
git clone https://gitlab.com/GuoAdeline/automation-openmole-kubernetes.git
cd deployment_openmole/
bash openmole.sh
You will deploy a ingress-nginx, openmole-connect and two openmole instances for user "foo" and "bar" in the cluster.
To add instance for new user, add the following command in file `deployment_openmole/openmole.sh`, change `$uuid` to your user uuid:
kubectl run openmole-$uuid --image=openmole/openmole -n ingress-nginx -- openmole --port 80 --password password --remote --http
kubectl expose deployment openmole-$uuid --port=80 -n ingress-nginx
apiVersion: extensions/v1beta1
kind: Ingress
name: openmole-connect-ingress
namespace: ingress-nginx
kubernetes.io/ingress.class: "nginx"
- host: intern.iscpif.fr
- path: /
serviceName: openmole-connect
servicePort: 8080
\ No newline at end of file
......@@ -7,7 +7,10 @@ kubectl apply -f ingress_nginx.yaml
# Deploy openmole-connect
kubectl run openmole-connect --image=mm768528/openmole-connect:latest --replicas=1 --namespace=ingress-nginx -- --secret 6e824d88-b17e-4534-8ed6-f69ba5f29845 --public-adress http://intern.iscpif.fr
kubectl expose deployment openmole-connect --port=80 --namespace=ingress-nginx
kubectl expose deployment openmole-connect --port=8080 --namespace=ingress-nginx
# Expose openmole-connect with ingress
kubectl apply connect_ing.yaml
# Deploy openmole instance. We create here two instances openmole for user "foo" and "bar"
kubectl run openmole-foo-123-567-foo --image=openmole/openmole -n ingress-nginx -- openmole --port 80 --password password --remote --http