blob: cd287e6847ec36c2368538b40a08e36c484e8a34 [file] [log] [blame]
Artem Panchenkoedf70ef2017-06-13 09:14:34 +03001{% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
vrovachev8a882d82017-06-21 12:56:19 +04003# Change environment configuration before deploy
4- description: Set k8s deploy parameters
5 cmd: |
6 {% for k8s_opt, value in config.k8s_deploy.items() %}
7 {% if value|string() %}
8 salt-call reclass.cluster_meta_set {{ k8s_opt }} {{ value }};
9 {% endif %}
10 {% endfor %}
11 node_name: {{ HOSTNAME_CFG01 }}
12 retry: {count: 1, delay: 1}
13 skip_fail: false
14
15# Kubernetes
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030016- description: Install etcd
17 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
18 -C 'I@etcd:server' state.sls etcd.server.service
19 node_name: {{ HOSTNAME_CFG01 }}
20 retry: {count: 1, delay: 5}
21 skip_fail: false
22
23- description: Check the etcd health
24 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
25 -C 'I@etcd:server' cmd.run '. /var/lib/etcd/configenv && etcdctl cluster-health'
26 node_name: {{ HOSTNAME_CFG01 }}
27 retry: {count: 1, delay: 5}
28 skip_fail: false
29
30- description: Install Kubernetes and Calico
31 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
32 -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons;
33 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' state.sls kubernetes.pool;
34 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' cmd.run 'calicoctl node status';
35 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 1, delay: 5}
37 skip_fail: false
38
39- description: Setup NAT for Calico
40 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
41 -C 'I@etcd:server' --subset 1 state.sls etcd.server.setup
42 node_name: {{ HOSTNAME_CFG01 }}
43 retry: {count: 1, delay: 5}
44 skip_fail: false
45
46- description: Run whole master to check consistency
47 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
48 -C 'I@kubernetes:master' state.sls kubernetes exclude=kubernetes.master.setup
49 node_name: {{ HOSTNAME_CFG01 }}
50 retry: {count: 1, delay: 5}
51 skip_fail: true
52
53- description: Register addons
54 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
55 -C 'I@kubernetes:master' --subset 1 state.sls kubernetes.master.setup
56 node_name: {{ HOSTNAME_CFG01 }}
57 retry: {count: 1, delay: 5}
58 skip_fail: false
Artem Panchenko0594cd72017-06-12 13:25:26 +030059
60# Run conformance tests
61- description: Run tests
62 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run "docker run --rm --net=host -e API_SERVER='http://127.0.0.1:8080' docker-dev-virtual.docker.mirantis.net/mirantis/kubernetes/k8s-conformance:v1.6.2-2_1493800192393 >> e2e.output"
63 node_name: {{ HOSTNAME_CFG01 }}
64 retry: {count: 1, delay: 5}
65 skip_fail: false