aboutsummaryrefslogtreecommitdiffstats
path: root/tools/moon_kubernetes
diff options
context:
space:
mode:
Diffstat (limited to 'tools/moon_kubernetes')
-rw-r--r--tools/moon_kubernetes/README.md8
-rw-r--r--tools/moon_kubernetes/init_k8s.sh2
-rw-r--r--tools/moon_kubernetes/start_moon.sh21
-rw-r--r--tools/moon_kubernetes/templates/moon_forming.yaml11
4 files changed, 21 insertions, 21 deletions
diff --git a/tools/moon_kubernetes/README.md b/tools/moon_kubernetes/README.md
index a74a1321..b47bbfaf 100644
--- a/tools/moon_kubernetes/README.md
+++ b/tools/moon_kubernetes/README.md
@@ -30,8 +30,8 @@ apt-get install -y kubelet kubeadm kubectl
## Moon Deployment
### Initiate K8S
```bash
-cd $MOON_HOME/tools/moon_kubernes
-sudo bash init_k8s.sh
+cd $MOON_HOME
+bash tools/moon_kubernes/init_k8s.sh
```
Wait until all the kubeadm containers are in the `running` state:
@@ -56,8 +56,8 @@ You must see something like this:
### Deploy Moon
```bash
-cd $MOON_HOME/tools/moon_kubernes
-sudo bash start_moon.sh
+cd $MOON_HOME
+sudo bash tools/moon_kubernes/start_moon.sh
```
Wait until all the Moon containers are in the `running` state:
diff --git a/tools/moon_kubernetes/init_k8s.sh b/tools/moon_kubernetes/init_k8s.sh
index fcfdfb5e..8ec1237c 100644
--- a/tools/moon_kubernetes/init_k8s.sh
+++ b/tools/moon_kubernetes/init_k8s.sh
@@ -20,7 +20,7 @@ kubectl apply -f http://docs.projectcalico.org/v2.4/getting-started/kubernetes/i
#kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl delete deployment kube-dns --namespace=kube-system
-kubectl apply -f templates/kube-dns.yaml
+kubectl apply -f tools/moon_kubernetes/templates/kube-dns.yaml
kubectl taint nodes --all node-role.kubernetes.io/master- # make the master also as a node
diff --git a/tools/moon_kubernetes/start_moon.sh b/tools/moon_kubernetes/start_moon.sh
index 3892a3fa..47d6998b 100644
--- a/tools/moon_kubernetes/start_moon.sh
+++ b/tools/moon_kubernetes/start_moon.sh
@@ -3,21 +3,22 @@
set -x
kubectl create namespace moon
-kubectl create configmap moon-config --from-file conf/moon.conf -n moon
+kubectl create configmap moon-config --from-file tools/moon_kubernetes/conf/moon.conf -n moon
kubectl create configmap config --from-file ~/.kube/config -n moon
-kubectl create secret generic mysql-root-pass --from-file=conf/password_root.txt -n moon
-kubectl create secret generic mysql-pass --from-file=conf/password_moon.txt -n moon
+kubectl create configmap moon-policy-templates --from-file tests/functional/scenario_tests -n moon
+kubectl create secret generic mysql-root-pass --from-file=tools/moon_kubernetes/conf/password_root.txt -n moon
+kubectl create secret generic mysql-pass --from-file=tools/moon_kubernetes/conf/password_moon.txt -n moon
-kubectl create -n moon -f templates/consul.yaml
-kubectl create -n moon -f templates/db.yaml
-kubectl create -n moon -f templates/keystone.yaml
+kubectl create -n moon -f tools/moon_kubernetes/templates/consul.yaml
+kubectl create -n moon -f tools/moon_kubernetes/templates/db.yaml
+kubectl create -n moon -f tools/moon_kubernetes/templates/keystone.yaml
echo =========================================
kubectl get pods -n moon
echo =========================================
sleep 10
-kubectl create -n moon -f templates/moon_forming.yaml
+kubectl create -n moon -f tools/moon_kubernetes/templates/moon_forming.yaml
echo Waiting for jobs forming
sleep 5
@@ -25,11 +26,11 @@ kubectl get jobs -n moon
kubectl logs -n moon jobs/forming
sleep 5
-kubectl create -n moon -f templates/moon_manager.yaml
+kubectl create -n moon -f tools/moon_kubernetes/templates/moon_manager.yaml
sleep 2
-kubectl create -n moon -f templates/moon_orchestrator.yaml
+kubectl create -n moon -f tools/moon_kubernetes/templates/moon_orchestrator.yaml
-kubectl create -n moon -f templates/moon_gui.yaml
+kubectl create -n moon -f tools/moon_kubernetes/templates/moon_gui.yaml
diff --git a/tools/moon_kubernetes/templates/moon_forming.yaml b/tools/moon_kubernetes/templates/moon_forming.yaml
index efcc51d8..334ee175 100644
--- a/tools/moon_kubernetes/templates/moon_forming.yaml
+++ b/tools/moon_kubernetes/templates/moon_forming.yaml
@@ -10,22 +10,21 @@ spec:
spec:
containers:
- name: forming
- image: wukongsun/moon_forming:v1.3
+ image: wukongsun/moon_forming:latest
env:
- name: POPULATE_ARGS
value: "--verbose" # debug mode: --debug
volumeMounts:
- name: config-volume
mountPath: /etc/moon
- - name: test-volume
+ - name: templates-volume
mountPath: /data
volumes:
- name: config-volume
configMap:
name: moon-config
- - name: test-volume
- hostPath:
- path: tests/functional/scenario_enabled
- type: Directory
+ - name: templates-volume
+ configMap:
+ name: moon-policy-templates
restartPolicy: Never
#backoffLimit: 4 \ No newline at end of file