blob: 932cc5b38ed33066a58533c0fa620fac635d8e0a [file] [log] [blame]
{% from 'k8s-ha-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
- description: Install etcd
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@etcd:server' state.sls etcd.server.service
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Check the etcd health
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@etcd:server' cmd.run '. /var/lib/etcd/configenv && etcdctl cluster-health'
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
# Opencontrail Control Plane
- description: Install Opencontrail db on ctl01
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:database and *01*' state.sls opencontrail.database
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 2, delay: 20}
skip_fail: false
- description: Install Opencontrail db on all nodes
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:database' state.sls opencontrail.database
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 2, delay: 20}
skip_fail: false
- description: Install Opencontrail control on ctl01
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:control and *01*' state.sls opencontrail exclude=opencontrail.client
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install Opencontrail control on all nodes
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:control' state.sls opencontrail exclude=opencontrail.client
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install Opencontrail on collector
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:collector' state.sls opencontrail exclude=opencontrail.client
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
# OpenContrail vrouters
- description: Install Opencontrail client
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:database:id:1' state.sls opencontrail.client
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install Opencontrail on computes
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:compute' state.sls opencontrail exclude=opencontrail.client
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 2, delay: 5}
skip_fail: false
- description: Wake up vhost0
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@nova:compute' cmd.run 'exec 0>&-; exec 1>&-; exec 2>&-;
nohup bash -c "ip link | grep vhost && echo no_reboot || sleep 5 && reboot & "'
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install Opencontrail client on computes
cmd: sleep 300 && salt --timeout=60 --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:compute' state.sls 'opencontrail.client'
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install Opencontrail on computes #2
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@opencontrail:compute' state.sls opencontrail
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 2, delay: 5}
skip_fail: false
# Kubernetes
- description: Install Kubernetes Addons
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: true
- description: Install Kubernetes components
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@kubernetes:pool' state.sls kubernetes.pool
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 5, delay: 60}
skip_fail: false
# NOTE(vryzhenkin): There is nothing to setup at this model
#- description: Setup etcd server on primary controller
# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
# -C 'I@kubernetes:master and *01*' state.sls etcd.server.setup
# node_name: {{ HOSTNAME_CFG01 }}
# retry: {count: 1, delay: 5}
# skip_fail: false
- description: Run Kubernetes master without setup
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@kubernetes:master' state.sls kubernetes exclude=kubernetes.master.setup
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 3, delay: 5}
skip_fail: true
- description: Run Kubernetes master setup
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@kubernetes:master and *01*' state.sls kubernetes.master.setup
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: true
- description: Restart Kubelet
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@kubernetes:pool' service.restart 'kubelet'
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: true
- description: Renew hosts file on a whole cluster
cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C '*' state.sls linux.network.host;
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false