blob: 1e53e79488c3fe166eee5f1a57e9cda411cb066a [file] [log] [blame]
Andy Bavier4490ee92016-01-05 16:17:14 -05001SETUPDIR:=../setup
Andy Bavierf9eee262015-10-06 14:55:44 -04002MYIP:=$(shell hostname -i)
Andy Bavierf9eee262015-10-06 14:55:44 -04003
Srikanth Vavilapallic2c824a2016-03-04 17:55:24 -05004cloudlab: common_cloudlab cord acord
Andy Bavier4490ee92016-01-05 16:17:14 -05005
6devstack: upgrade_pkgs common_devstack devstack_net_fix cord
7
Srikanth Vavilapalli8099a162016-03-08 01:50:33 -05008cord: virtualbng_json vtn_network_cfg_json
Andy Bavier4490ee92016-01-05 16:17:14 -05009 sudo MYIP=$(MYIP) docker-compose up -d
Andy Bavierf9eee262015-10-06 14:55:44 -040010 bash ../common/wait_for_xos.sh
Andy Bavier4490ee92016-01-05 16:17:14 -050011 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
12 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
13 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
14 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/cord.yaml
Andy Bavierf9eee262015-10-06 14:55:44 -040015
Andy Bavier5144cc02016-01-20 13:18:38 -080016containers:
17 cd ../../../containers/xos; make devel
18 cd ../../../containers/synchronizer; make
19
Andy Bavierf9eee262015-10-06 14:55:44 -040020common_cloudlab:
21 make -C ../common -f Makefile.cloudlab
22
Andy Bavier4490ee92016-01-05 16:17:14 -050023common_devstack:
24 make -C ../common -f Makefile.devstack
25
Srikanth Vavilapalli8099a162016-03-08 01:50:33 -050026acord: cloudlab_ceilometer_custom_images ceilometer_cloudlab_cord_plugins
Srikanth Vavilapallic2c824a2016-03-04 17:55:24 -050027 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/ceilometer.yaml
28
Srikanth Vavilapalli8099a162016-03-08 01:50:33 -050029ceilometer_cloudlab_cord_plugins:
30 if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi
31 git clone https://github.com/srikanthvavila/ceilometer-plugins.git
32 sudo cp -r ceilometer-plugins/network/ext_services /usr/lib/python2.7/dist-packages/ceilometer/network/
33 sudo cp -r ceilometer-plugins/network/statistics/onos /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
34 sudo cp ceilometer-plugins/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
35 sudo cp ceilometer-plugins/entry_points.txt /usr/lib/python2.7/dist-packages/ceilometer-*egg-info/
36 sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/
37 echo "Restarting ceilometer-agent-notification"
38 sudo service ceilometer-agent-notification restart
39 echo "Restarting ceilometer-agent-central"
40 sudo service ceilometer-agent-central restart
41
42ceilometer_pub_sub:
43 if [ -d ./pub-sub ]; then rm -fr ./pub-sub; fi
44 git clone https://github.com/srikanthvavila/pub-sub.git
45 echo "Starting Ceilometer PUB/SUB service...Ensure zookeeper and kafka services are launched (if required)"
46 cd pub-sub/ceilometer_pub_sub/ ; python sub_main.py &
47 cd ../..
Srikanth Vavilapalli36158e82015-10-28 23:52:29 -040048
Scott Baker1b426a12015-12-02 20:00:20 -080049virtualbng_json:
Andy Bavier4490ee92016-01-05 16:17:14 -050050 export SETUPDIR=$(SETUPDIR); bash make-virtualbng-json.sh
Scott Baker1b426a12015-12-02 20:00:20 -080051
Scott Baker41fc11a2015-12-15 21:45:29 -080052vtn_network_cfg_json:
Andy Bavier4490ee92016-01-05 16:17:14 -050053 export SETUPDIR=$(SETUPDIR); bash make-vtn-networkconfig-json.sh
Scott Baker41fc11a2015-12-15 21:45:29 -080054
Andy Bavierf9eee262015-10-06 14:55:44 -040055stop:
Andy Bavier4490ee92016-01-05 16:17:14 -050056 sudo MYIP=$(MYIP) docker-compose stop
Andy Bavierf9eee262015-10-06 14:55:44 -040057
Andy Bavier0ef6aad2016-01-06 16:46:40 -050058rm:
59 sudo MYIP=$(MYIP) docker-compose rm
60
Andy Bavierf9eee262015-10-06 14:55:44 -040061showlogs:
Andy Bavier4490ee92016-01-05 16:17:14 -050062 sudo MYIP=$(MYIP) docker-compose logs
Andy Bavierde1707d2015-12-16 14:10:01 -050063
Andy Bavier0ef6aad2016-01-06 16:46:40 -050064ps:
65 sudo MYIP=$(MYIP) docker-compose ps
66
Andy Bavierde1707d2015-12-16 14:10:01 -050067dataplane: etc_hosts
68 cd dataplane; ./gen-inventory.sh > hosts
69 cd dataplane; ansible-playbook -i hosts dataplane.yaml
70
71dataplane_bm: dataplane
72 cd dataplane; bash -c "./generate-bm.sh > hosts-bm"
73 cd dataplane; sudo bash -c "ansible-playbook -i hosts-bm dataplane-bm.yaml"
74
75etc_hosts:
76 sudo bash -c "sed -i '/^10.11.10/ d' /etc/hosts"
77 cd dataplane; sudo bash -c "./gen-etc-hosts.sh >> /etc/hosts"
78
79setup_client:
80 # add subscriber to vOLT? Is there a REST API?
81 echo "Don't forget: add-subscriber-access of:0000000000000001 1 432"
82 cd dataplane; ansible -i hosts client -m shell -s -a "route del default gw 10.11.10.5; dhclient br-sub"
83 # reboot the vBNG ONOS
84 cd dataplane; ansible -i hosts onos_vbng -m shell -s -a "docker restart ONOS"
85
Andy Bavier0ef6aad2016-01-06 16:46:40 -050086cleanup: stop rm
Andy Bavierde1707d2015-12-16 14:10:01 -050087 cd dataplane; ./cleanup.sh
Andy Bavier4490ee92016-01-05 16:17:14 -050088 bash -c "source ../setup/admin-openrc.sh; nova list --all-tenants; neutron net-list"
Andy Bavier0ef6aad2016-01-06 16:46:40 -050089 echo "Don't forget to clean up vCPE containers"
Andy Bavier4490ee92016-01-05 16:17:14 -050090
91devstack_net_fix:
92 sudo ../common/devstack/net-fix.sh
93 sudo bash -c "source ../setup/admin-openrc.sh; neutron subnet-update private-subnet --dns-nameservers list=true 8.8.8.8 8.8.4.4"
94
95upgrade_pkgs:
96 sudo pip install httpie --upgrade
Srikanth Vavilapallic2c824a2016-03-04 17:55:24 -050097
98cloudlab_ceilometer_custom_images:
Srikanth Vavilapalli092d7192016-03-22 19:43:30 -060099 bash -c "source ../setup/admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || if test -f /proj/xos-PG0/images/ceilometer-trusty-server-multi-nic.compressed.qcow2 ; then glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file /proj/xos-PG0/images/ceilometer-trusty-server-multi-nic.compressed.qcow2 --container-format bare ; else mkdir -p /tmp/images && wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.compressed.qcow2 -P /tmp/images && glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file /tmp/images/ceilometer-trusty-server-multi-nic.compressed.qcow2 --container-format bare ; fi "