aboutsummaryrefslogtreecommitdiffstats
path: root/tools/moon_kubernetes/start_moon.sh
blob: 32d9740df928ecd7d87a16235d7c659b9fb88cc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash

set -x

kubectl create namespace 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 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 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 tools/moon_kubernetes/templates/moon_forming.yaml

echo Waiting for jobs forming
sleep 5
kubectl get jobs -n moon
kubectl logs -n moon jobs/forming

sleep 5
kubectl create -n moon -f tools/moon_kubernetes/templates/moon_manager.yaml

sleep 2
kubectl create -n moon -f tools/moon_kubernetes/templates/moon_orchestrator.yaml

kubectl create -n moon -f tools/moon_kubernetes/templates/moon_gui.yaml

# load moon_wrapper on both master and slaves
# moon_create_wrapper