blob: 8cf9f293c468295a34944611be63db734993a08e [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001MYFLATLANIF:=$(shell netstat -i |grep "flat"|awk '{print $$1}' )
2MYFLATLANIP:=$(shell ifconfig $(MYFLATLANIF) | grep "inet addr" | awk -F: '{print $$2}' | awk '{print $$1}' )
3SETUPDIR:=../setup
4
5all: prereqs admin-openrc flat_name nodes_yaml public_key private_key ceilometer_url node_key
6
7prereqs:
8 make -f Makefile.prereqs
9 mkdir -p $(SETUPDIR)
10
11admin-openrc:
12 sudo cat /root/setup/admin-openrc.sh > $(SETUPDIR)/admin-openrc.sh
13 sudo cat /root/setup/settings > $(SETUPDIR)/controller_settings
14 echo 'CONTROLLER_FLAT_LAN_IP=$(MYFLATLANIP)' >> $(SETUPDIR)/controller_settings
15
16flat_name:
17 sudo bash -c "source /root/setup/admin-openrc.sh ; neutron net-list" |grep flat|awk '{printf "%s",$$4}' > $(SETUPDIR)/flat_net_name
18 [ -s $(SETUPDIR)/flat_net_name ] # throw error if flat_net_name is empty
19
20nodes_yaml:
21 bash ./make-nodes-yaml.sh > $(SETUPDIR)/nodes.yaml
22
23ceilometer_url:
24 echo http://`hostname -i`/xosmetering/ > $(SETUPDIR)/ceilometer_url
25
26public_key: ~/.ssh/id_rsa.pub
27 cp ~/.ssh/id_rsa.pub $(SETUPDIR)
28
29private_key: ~/.ssh/id_rsa
30 cp ~/.ssh/id_rsa $(SETUPDIR)
31
32~/.ssh/id_rsa.pub:
33 cat /dev/zero | ssh-keygen -q -N ""
34
35node_key:
36 sudo cat /root/setup/id_rsa > $(SETUPDIR)/node_key
37 sudo cat /root/setup/id_rsa.pub > $(SETUPDIR)/node_key.pub
38
39images:
40 source admin-openrc.sh; glance image-show trusty-server-multi-nic || glance image-create --name trusty-server-multi-nic --disk-format qcow2 --file /proj/xos-PG0/acb/images/trusty-server-multi-nic.img --container-format bare