Simon Pasquier | d3a0b91 | 2017-05-02 15:32:20 +0200 | [diff] [blame] | 1 | #!/bin/bash -x |
| 2 | exec > >(tee -i /tmp/"$(basename "$0" .sh)"_"$(date '+%Y-%m-%d_%H-%M-%S')".log) 2>&1 |
| 3 | |
| 4 | CWD="$(dirname "$(readlink -f "$0")")" |
| 5 | |
| 6 | # Import common functions |
| 7 | COMMONS="$CWD"/common_functions.sh |
| 8 | if [ ! -f "$COMMONS" ]; then |
| 9 | echo "File $COMMONS does not exist" |
| 10 | exit 1 |
| 11 | fi |
| 12 | . "$COMMONS" |
| 13 | |
| 14 | # OVS deployment |
| 15 | salt -C 'I@nova:compute' state.sls nova |
| 16 | # If the compute nodes aren't in the default 'nova' AZ, the previous run will |
| 17 | # fail because adding compute nodes to their AZ requires the compute services |
| 18 | # to be registered. |
| 19 | # So wait a bit and run the state once again |
| 20 | sleep 10 |
| 21 | salt -C 'I@nova:compute' state.sls nova |
| 22 | salt -C 'I@cinder:volume' state.sls cinder |
| 23 | salt -C 'I@neutron:compute' state.sls neutron |
| 24 | salt -C 'I@ceilometer:agent' state.sls ceilometer |