diff --git a/ccp/ccp-deploy.sh b/ccp/ccp-deploy.sh index 2eacf41b9..36d42231c 100755 --- a/ccp/ccp-deploy.sh +++ b/ccp/ccp-deploy.sh @@ -3,10 +3,15 @@ set -e create_network_conf() { - ( echo "network:"; i=2; for ip in `cat /root/nodes `; do echo -e " node$i:\n private:\n iface: eth2\n address: $ip"; pip=`echo $ip | perl -pe 's/(\d+).(\d+).1/\${1}.\${2}.0/g'`; echo -e " public:\n iface: eth1\n address: $pip" ; i=$(( i+=1 )) ;done ) > /root/cluster-topology.yaml + # FIXME: hardcoded network topology: + # public_ip: \d+.\d+.0.\d+ pubcic_iface: eth1 + # private_ip: \d+.\d+.1.\d+ private_iface: eth2 + kubectl get nodes -o go-template='{{range .items}}{{range .status.addresses}}{{if or (eq .type "ExternalIP") (eq .type "LegacyHostIP")}}{{.address}}{{print "\n"}}{{end}}{{end}}{{end}}'> /tmp/nodes + ( echo "network:"; i=2; for ip in `cat /tmp/nodes `; do echo -e " node$i:\n private:\n iface: eth2\n address: $ip"; pip=`echo $ip | perl -pe 's/(\d+).(\d+).1/\${1}.\${2}.0/g'`; echo -e " public:\n iface: eth1\n address: $pip" ; i=$(( i+=1 )) ;done ) > /root/cluster-topology.yaml } assign_node_roles() { + # FIXME: hardcoded roles kubectl label nodes node2 openstack-controller=true kubectl label nodes node3 openstack-controller=true kubectl label nodes node4 openstack-controller=true diff --git a/playbooks/ccp-deploy.yaml b/playbooks/ccp-deploy.yaml index cc5e0dbbe..d8190cdd8 100644 --- a/playbooks/ccp-deploy.yaml +++ b/playbooks/ccp-deploy.yaml @@ -1,7 +1,5 @@ - hosts: kube-master pre_tasks: - - name: Rsync nodes list - synchronize: src=/root/nodes dest=/root/nodes - name: Rsync MCP scripts and repo synchronize: src: /root/ccp/