blob: ee0bc4871bae5981abeca5e6825042f3d5796304 [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001MYFLATLANIF:=$(shell netstat -i |grep "flat"|awk '{print $$1}' )
2ifndef MYFLATLANIF
3$(error MYFLATLANIF is empty)
4endif
5MYFLATLANIP:=$(shell ifconfig $(MYFLATLANIF) | grep "inet addr" | awk -F: '{print $$2}' | awk '{print $$1}' )
6SETUPDIR:=../setup
7
8all: prereqs admin-openrc flat_name nodes_yaml public_key private_key ceilometer_url other_keys
9
10prereqs:
11 make -f Makefile.prereqs
12 mkdir -p $(SETUPDIR)
Scott Baker8ed63bb2016-07-07 14:20:08 -070013 sudo ./check_docker_version.sh
Scott Baker50421662016-06-27 22:09:48 -070014
15admin-openrc:
16 sudo cat /root/setup/admin-openrc.sh > $(SETUPDIR)/admin-openrc.sh
17 sudo cat /root/setup/settings > $(SETUPDIR)/controller_settings
18 echo 'CONTROLLER_FLAT_LAN_IP=$(MYFLATLANIP)' >> $(SETUPDIR)/controller_settings
19
20flat_name:
21 bash -c "source $(SETUPDIR)/admin-openrc.sh ; neutron net-list" |grep flat|awk '{printf "%s",$$4}' > $(SETUPDIR)/flat_net_name
22 [ -s $(SETUPDIR)/flat_net_name ] # throw error if flat_net_name is empty
23
24nodes_yaml:
25 export SETUPDIR=$(SETUPDIR); bash ./make-nodes-yaml.sh
26
27ceilometer_url:
28 echo http://`hostname -i`/xosmetering/ > $(SETUPDIR)/ceilometer_url
29
30public_key: ~/.ssh/id_rsa.pub
31 cp ~/.ssh/id_rsa.pub $(SETUPDIR)
32
33private_key: ~/.ssh/id_rsa
34 cp ~/.ssh/id_rsa $(SETUPDIR)
35
36~/.ssh/id_rsa.pub:
37 cat /dev/zero | ssh-keygen -q -N ""
38
39other_keys: public_key private_key
40 sudo cat /root/setup/id_rsa > $(SETUPDIR)/node_key
41 sudo cat /root/setup/id_rsa.pub > $(SETUPDIR)/node_key.pub
42 sudo cp $(SETUPDIR)/id_rsa.pub $(SETUPDIR)/padmin_public_key