Andy Bavier | 941c932 | 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 | |
| 5 | test: common_cloudlab images |
| 6 | echo "# Autogenerated -- do not edit" > Dockerfile |
| 7 | cat ../common/Dockerfile.common Dockerfile.kilo-install >> Dockerfile |
| 8 | cd ../../..; sudo docker build -t xos -f xos/configurations/kilo-install/Dockerfile . |
| 9 | sudo docker run -d --add-host="0.0.0.0:$(MYIP)" -p 9999:8000 -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro xos |
| 10 | bash ../common/wait_for_xos.sh |
| 11 | |
| 12 | common_cloudlab: |
| 13 | make -C ../common -f Makefile.cloudlab |
| 14 | |
| 15 | stop: |
| 16 | sudo docker stop $(RUNNING_CONTAINER) |
| 17 | |
| 18 | showlogs: |
| 19 | sudo docker logs $(LAST_CONTAINER) |
| 20 | |
| 21 | enter: |
| 22 | sudo docker exec -t -i $(RUNNING_CONTAINER) bash |
| 23 | |
| 24 | images: |
| 25 | sudo bash -c "source /root/setup/admin-openrc.sh; \ |
| 26 | glance image-show trusty-server-multi-nic || \ |
| 27 | glance image-create --name trusty-server-multi-nic \ |
| 28 | --disk-format qcow2 \ |
| 29 | --file /proj/xos-PG0/acb/images/trusty-server-multi-nic.img \ |
| 30 | --container-format bare" |