Andy Bavier | 61869df | 2015-10-05 17:08:41 -0400 | [diff] [blame] | 1 | MYIP:=$(shell hostname -i) |
| 2 | RUNNING_CONTAINER:=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}') |
| 3 | LAST_CONTAINER=$(shell sudo docker ps -l -q) |
| 4 | |
Andy Bavier | dd20d33 | 2015-10-06 12:57:40 -0400 | [diff] [blame] | 5 | # For installing XOS on a node that is not the OpenStack head node |
| 6 | MGMT_SUBNET="192.168.122.0/24" |
| 7 | HEAD_NODE_IP="130.127.133.61" |
| 8 | |
Andy Bavier | 61869df | 2015-10-05 17:08:41 -0400 | [diff] [blame] | 9 | test: common_cloudlab images |
| 10 | echo "# Autogenerated -- do not edit" > Dockerfile |
| 11 | cat ../common/Dockerfile.common Dockerfile.kilo-install >> Dockerfile |
| 12 | cd ../../..; sudo docker build -t xos -f xos/configurations/kilo-install/Dockerfile . |
Andy Bavier | f928379 | 2015-10-06 14:33:34 -0400 | [diff] [blame] | 13 | sudo docker run -d -p 9999:8000 -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro xos |
Andy Bavier | 61869df | 2015-10-05 17:08:41 -0400 | [diff] [blame] | 14 | bash ../common/wait_for_xos.sh |
| 15 | |
| 16 | common_cloudlab: |
| 17 | make -C ../common -f Makefile.cloudlab |
| 18 | |
| 19 | stop: |
| 20 | sudo docker stop $(RUNNING_CONTAINER) |
| 21 | |
| 22 | showlogs: |
| 23 | sudo docker logs $(LAST_CONTAINER) |
| 24 | |
| 25 | enter: |
| 26 | sudo docker exec -t -i $(RUNNING_CONTAINER) bash |
| 27 | |
| 28 | images: |
| 29 | sudo bash -c "source /root/setup/admin-openrc.sh; \ |
| 30 | glance image-show trusty-server-multi-nic || \ |
| 31 | glance image-create --name trusty-server-multi-nic \ |
| 32 | --disk-format qcow2 \ |
| 33 | --file /proj/xos-PG0/acb/images/trusty-server-multi-nic.img \ |
| 34 | --container-format bare" |
Andy Bavier | dd20d33 | 2015-10-06 12:57:40 -0400 | [diff] [blame] | 35 | |
| 36 | remote_head_node: |
| 37 | sudo iptables -t nat -A OUTPUT -p tcp -d $MGMT_SUBNET -j DNAT --to-destination $HEAD_NODE_IP |
| 38 | sudo iptables -t nat -A PREROUTING -p tcp -d $MGMT_SUBNET -j DNAT --to-destination $HEAD_NODE_IP |