blob: 9c119278dc304c7d0289367b05884ab474245570 [file] [log] [blame]
Andy Bavierf0405252015-10-06 14:55:44 -04001MYIP:=$(shell hostname -i)
2RUNNING_CONTAINER:=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}')
3LAST_CONTAINER=$(shell sudo docker ps -l -q)
4
Scott Bakerd1001262015-12-15 21:45:29 -08005cord: common_cloudlab ceilometer_dashboard virtualbng_json vtn_network_cfg_json
Scott Bakercc599b52015-12-09 21:29:48 -08006 rm ../../xos_configuration/*
Andy Bavierf0405252015-10-06 14:55:44 -04007 echo "# Autogenerated -- do not edit" > Dockerfile
8 cat ../common/Dockerfile.common Dockerfile.cord >> Dockerfile
Scott Bakercc599b52015-12-09 21:29:48 -08009 cp ../common/xos_common_config ../../xos_configuration/
10 cp ./xos_cord_config ../../xos_configuration/
Andy Bavierf0405252015-10-06 14:55:44 -040011 cd ../../..; sudo docker build -t xos -f xos/configurations/cord/Dockerfile .
12 sudo docker run -d --add-host="ctl:$(MYIP)" -p 9999:8000 xos
13 bash ../common/wait_for_xos.sh
14
15common_cloudlab:
16 make -C ../common -f Makefile.cloudlab
17
Srikanth Vavilapallie9247d82015-10-28 23:52:29 -040018ceilometer_dashboard:
19 #NOTE: The below dashboard install scripts assume
20 #clouldlab openstack environment created using "OpenStack" profile
svavilapb9a987c2015-12-16 19:31:42 -060021 #bash install_xos_ceilometer_dashboard.sh
Scott Bakerb0a58072015-12-02 13:41:40 -080022 bash install_ceilometer_patch.sh
Srikanth Vavilapallie9247d82015-10-28 23:52:29 -040023
Scott Baker3b47c5f2015-12-02 20:00:20 -080024virtualbng_json:
25 bash make-virtualbng-json.sh
26
Scott Bakerd1001262015-12-15 21:45:29 -080027vtn_network_cfg_json:
28 bash make-vtn-networkconfig-json.sh
29
Andy Bavierf0405252015-10-06 14:55:44 -040030stop:
31 sudo docker stop $(RUNNING_CONTAINER)
32
33showlogs:
34 sudo docker logs $(LAST_CONTAINER)
35
36enter:
37 sudo docker exec -t -i $(RUNNING_CONTAINER) bash
Andy Bavier1aa49af2015-12-16 14:10:01 -050038
39dataplane: etc_hosts
40 cd dataplane; ./gen-inventory.sh > hosts
41 cd dataplane; ansible-playbook -i hosts dataplane.yaml
42
43dataplane_bm: dataplane
44 cd dataplane; bash -c "./generate-bm.sh > hosts-bm"
45 cd dataplane; sudo bash -c "ansible-playbook -i hosts-bm dataplane-bm.yaml"
46
47etc_hosts:
48 sudo bash -c "sed -i '/^10.11.10/ d' /etc/hosts"
49 cd dataplane; sudo bash -c "./gen-etc-hosts.sh >> /etc/hosts"
50
51setup_client:
52 # add subscriber to vOLT? Is there a REST API?
53 echo "Don't forget: add-subscriber-access of:0000000000000001 1 432"
54 cd dataplane; ansible -i hosts client -m shell -s -a "route del default gw 10.11.10.5; dhclient br-sub"
55 # reboot the vBNG ONOS
56 cd dataplane; ansible -i hosts onos_vbng -m shell -s -a "docker restart ONOS"
57
58cleanup: stop
59 cd dataplane; ./cleanup.sh
60 bash -c "source ../common/admin-openrc.sh; nova list --all-tenants; neutron net-list"
61 echo "Don't forget to clean up containers"