blob: ee0bc4871bae5981abeca5e6825042f3d5796304 [file] [log] [blame]
MYFLATLANIF:=$(shell netstat -i |grep "flat"|awk '{print $$1}' )
ifndef MYFLATLANIF
$(error MYFLATLANIF is empty)
endif
MYFLATLANIP:=$(shell ifconfig $(MYFLATLANIF) | grep "inet addr" | awk -F: '{print $$2}' | awk '{print $$1}' )
SETUPDIR:=../setup
all: prereqs admin-openrc flat_name nodes_yaml public_key private_key ceilometer_url other_keys
prereqs:
make -f Makefile.prereqs
mkdir -p $(SETUPDIR)
sudo ./check_docker_version.sh
admin-openrc:
sudo cat /root/setup/admin-openrc.sh > $(SETUPDIR)/admin-openrc.sh
sudo cat /root/setup/settings > $(SETUPDIR)/controller_settings
echo 'CONTROLLER_FLAT_LAN_IP=$(MYFLATLANIP)' >> $(SETUPDIR)/controller_settings
flat_name:
bash -c "source $(SETUPDIR)/admin-openrc.sh ; neutron net-list" |grep flat|awk '{printf "%s",$$4}' > $(SETUPDIR)/flat_net_name
[ -s $(SETUPDIR)/flat_net_name ] # throw error if flat_net_name is empty
nodes_yaml:
export SETUPDIR=$(SETUPDIR); bash ./make-nodes-yaml.sh
ceilometer_url:
echo http://`hostname -i`/xosmetering/ > $(SETUPDIR)/ceilometer_url
public_key: ~/.ssh/id_rsa.pub
cp ~/.ssh/id_rsa.pub $(SETUPDIR)
private_key: ~/.ssh/id_rsa
cp ~/.ssh/id_rsa $(SETUPDIR)
~/.ssh/id_rsa.pub:
cat /dev/zero | ssh-keygen -q -N ""
other_keys: public_key private_key
sudo cat /root/setup/id_rsa > $(SETUPDIR)/node_key
sudo cat /root/setup/id_rsa.pub > $(SETUPDIR)/node_key.pub
sudo cp $(SETUPDIR)/id_rsa.pub $(SETUPDIR)/padmin_public_key