summaryrefslogtreecommitdiffstats
path: root/deploy/post.sh
blob: 3fae69bc5b4e4f93c686ad7c8532dcbac88d032b (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
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash

SCRIPT_PATH=$(readlink -f $(dirname $0))

export PYTHONPATH=$SCRIPT_PATH/..

usage ()
{
cat << EOF
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
`basename $0`: post process after OpenStack is deployed

usage: `basename $0` -n network_config_file

OPTIONS:
  -n  network configuration path, necessary
  -h  Print this message and exit

Description:
  post process after OpenStack is deployed

Examples:
sudo `basename $0` -n /home/daisy/labs/zte/virtual1/daisy/config/network.yml
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
EOF
}

NETWORK=''

while getopts "n:h" OPTION
do
    case $OPTION in
        n)
            NETWORK=${OPTARG}
            ;;
        h)
            usage
            exit 0
            ;;
        *)
            echo "${OPTION} is not a valid argument"
            usage
            exit 0
            ;;
    esac
done

python $PYTHONPATH/deploy/post/execute.py -nw $NETWORK
openstack security group rule create --proto icmp default
openstack security group rule create --proto tcp --dst-port 22 default