blob: 108df7ad2ccc2a00c99a5bac3429a18c36f9a0f5 [file] [log] [blame]
Andy Bavier61869df2015-10-05 17:08:41 -04001MYIP:=$(shell hostname -i)
2RUNNING_CONTAINER:=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}')
3LAST_CONTAINER=$(shell sudo docker ps -l -q)
4
Andy Bavierdd20d332015-10-06 12:57:40 -04005# For installing XOS on a node that is not the OpenStack head node
6MGMT_SUBNET="192.168.122.0/24"
7HEAD_NODE_IP="130.127.133.61"
8
Andy Bavier61869df2015-10-05 17:08:41 -04009test: 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 Bavierf9283792015-10-06 14:33:34 -040013 sudo docker run -d -p 9999:8000 -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro xos
Andy Bavier61869df2015-10-05 17:08:41 -040014 bash ../common/wait_for_xos.sh
15
16common_cloudlab:
17 make -C ../common -f Makefile.cloudlab
18
19stop:
20 sudo docker stop $(RUNNING_CONTAINER)
21
22showlogs:
23 sudo docker logs $(LAST_CONTAINER)
24
25enter:
26 sudo docker exec -t -i $(RUNNING_CONTAINER) bash
27
28images:
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 Bavierdd20d332015-10-06 12:57:40 -040035
36remote_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