blob: 184f2d5efd1056b6f86e9e125a633c8f8461f7a0 [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001SETUPDIR:=../setup
2MYIP:=$(shell hostname -i)
3
4cloudlab: common_cloudlab cord acord
5
6devstack: upgrade_pkgs common_devstack devstack_net_fix cord
7
8cord: virtualbng_json vtn_network_cfg_json
9 sudo MYIP=$(MYIP) docker-compose up -d
10 bash ../common/wait_for_xos.sh
11 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
12 sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
13 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-openstack.yaml
14 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
15 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/cord.yaml
16
17containers:
18 cd ../../../containers/xos; make devel
19 cd ../../../containers/synchronizer; make
20
21common_cloudlab:
22 make -C ../common -f Makefile.cloudlab
23
24common_devstack:
25 make -C ../common -f Makefile.devstack
26
27acord: cloudlab_ceilometer_custom_images ceilometer_cloudlab_cord_plugins
28 sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/ceilometer.yaml
29
30ceilometer_cloudlab_cord_plugins:
31 if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi
32 git clone https://github.com/srikanthvavila/ceilometer-plugins.git
33 sudo cp -r ceilometer-plugins/network/ext_services /usr/lib/python2.7/dist-packages/ceilometer/network/
34 sudo cp -r ceilometer-plugins/network/statistics/onos /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
35 sudo cp ceilometer-plugins/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
36 sudo cp ceilometer-plugins/entry_points.txt /usr/lib/python2.7/dist-packages/ceilometer-*egg-info/
37 sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/
38 echo "Restarting ceilometer-agent-notification"
39 sudo service ceilometer-agent-notification restart
40 echo "Restarting ceilometer-agent-central"
41 sudo service ceilometer-agent-central restart
42
43ceilometer_pub_sub:
44 if [ -d ./pub-sub ]; then rm -fr ./pub-sub; fi
45 git clone https://github.com/srikanthvavila/pub-sub.git
46 echo "Starting Ceilometer PUB/SUB service...Ensure zookeeper and kafka services are launched (if required)"
47 cd pub-sub/ceilometer_pub_sub/ ; python sub_main.py &
48 cd ../..
49
50virtualbng_json:
51 export SETUPDIR=$(SETUPDIR); bash make-virtualbng-json.sh
52
53vtn_network_cfg_json:
54 export SETUPDIR=$(SETUPDIR); bash make-vtn-networkconfig-json.sh
55
56stop:
57 sudo MYIP=$(MYIP) docker-compose stop
58
59rm:
60 sudo MYIP=$(MYIP) docker-compose rm
61
62showlogs:
63 sudo MYIP=$(MYIP) docker-compose logs
64
65ps:
66 sudo MYIP=$(MYIP) docker-compose ps
67
68dataplane: etc_hosts
69 cd dataplane; ./gen-inventory.sh > hosts
70 cd dataplane; ansible-playbook -i hosts dataplane.yaml
71
72dataplane_bm: dataplane
73 cd dataplane; bash -c "./generate-bm.sh > hosts-bm"
74 cd dataplane; sudo bash -c "ansible-playbook -i hosts-bm dataplane-bm.yaml"
75
76etc_hosts:
77 sudo bash -c "sed -i '/^10.11.10/ d' /etc/hosts"
78 cd dataplane; sudo bash -c "./gen-etc-hosts.sh >> /etc/hosts"
79
80setup_client:
81 # add subscriber to vOLT? Is there a REST API?
82 echo "Don't forget: add-subscriber-access of:0000000000000001 1 432"
83 cd dataplane; ansible -i hosts client -m shell -s -a "route del default gw 10.11.10.5; dhclient br-sub"
84 # reboot the vBNG ONOS
85 cd dataplane; ansible -i hosts onos_vbng -m shell -s -a "docker restart ONOS"
86
87cleanup: stop rm
88 cd dataplane; ./cleanup.sh
89 bash -c "source ../setup/admin-openrc.sh; nova list --all-tenants; neutron net-list"
90 echo "Don't forget to clean up vCPE containers"
91
92devstack_net_fix:
93 sudo ../common/devstack/net-fix.sh
94 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"
95
96upgrade_pkgs:
97 sudo pip install httpie --upgrade
98
99cloudlab_ceilometer_custom_images:
100 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 "