Publish opnfvdocs pieman branch
[releng.git] / jjb / infra / infra-provision.sh
1 #!/bin/bash
2 set -xe
3
4 if [[ $(whoami) != "root" ]]; then
5     echo "Error: This script must be run as root!"
6     exit 1
7 fi
8
9 # remove previously cloned repos
10 /bin/rm -rf /opt/bifrost /opt/puppet-infracloud /opt/releng
11
12 # clone upstream repos
13 git clone https://git.openstack.org/openstack/bifrost /opt/bifrost
14 git clone https://git.openstack.org/openstack-infra/puppet-infracloud /opt/puppet-infracloud
15
16 # clone opnfv releng repo
17 git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
18
19 # combine opnfv and upstream scripts/playbooks
20 cp -R /opt/releng/prototypes/bifrost/* /opt/bifrost/
21
22 # cleanup remnants of previous deployment
23 cd /opt/bifrost
24 ./scripts/destroy-env.sh
25
26 # provision 3 VMs; jumphost, controller, and compute
27 cd /opt/bifrost
28 ./scripts/test-bifrost-deployment.sh
29
30 # list the provisioned VMs
31 cd /opt/bifrost
32 source env-vars
33 ironic node-list
34 virsh list