# 1. Create a stack with a seed node

$ STACK_NAME=kaas-seed-test1
$ openstack stack create -t ./kaas-vm-seed-node.hot ${STACK_NAME}
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| id                  | dae930ca-9ff0-47fa-87c8-ef29ff0f07a5 |
| stack_name          | kaas-seed-test1                      |
| description         | MCP2.0 KaaS seed node                |
| creation_time       | 2019-06-27T15:51:12Z                 |
| updated_time        | None                                 |
| stack_status        | CREATE_IN_PROGRESS                   |
| stack_status_reason | Stack CREATE started                 |
+---------------------+--------------------------------------+

# 2. Wait until the stack is created

$ openstack stack show ${STACK_NAME} -f value -c stack_status
CREATE_COMPLETE

# 3. Get the floating IP of the seed node

$ jenkins_slave_ip_value_name="seed_floating_ip"
$ SEED_FLOATING_IP=$(openstack stack output show ${STACK_NAME} ${jenkins_slave_ip_value_name} -f value -c output_value)

# 4. Connect to the seed node using user 'ubuntu' and the key specified in the template

$ ssh ubuntu@{SEED_FLOATING_IP}

# 5. Remove the stack if not needed:

$ openstack stack delete -y ${STACK_NAME}
