Remove controller config from templates

Upon further reflection, I think it's more flexible and maintainable
to simply do this using a separate stack.  If the prefixes are
chosen appropriately (say baremetal and baremetal_controller), the
build-nodes-json script will include all of the nodes in the json
file, so we end up with essentially the same thing, but you can
reasonably do this for an arbitrary number of different nodes types.

This also doesn't play nicely with the single BMC changes, so that's
another motivation for making the change.  We could fix the single
BMC case, but as noted above I prefer the multi-stack method
anyway.

For convenience, I added a deploy-controller script that takes its
environment configuration from a controller.yaml file instead of
env.yaml.
This commit is contained in:
Ben Nemec 2015-11-17 12:42:55 -06:00
parent 699b14a363
commit a329325fa4
5 changed files with 6 additions and 56 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
nodes.json
*/env.yaml
env.yaml
*/controller.yaml
controller.yaml

4
bin/deploy-controller Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
op=${1:-create}
heat stack-$op -f templates/virtual-baremetal.yaml -e controller.yaml -e templates/resource-registry.yaml controller

View File

@ -12,8 +12,6 @@ parameters:
bmc_prefix: bmc
baremetal_prefix: baremetal
node_count: 2
controller_node_count: 0
controller_flavor: baremetal
# virtual-baremetal-specific params ignored by quintupleo.yaml
public_net: public
provision_net: provision

View File

@ -32,16 +32,6 @@ parameters:
type: number
default: 2
controller_node_count:
type: number
default: 0
description: Number of additional nodes to deploy with alternate controller flavor
controller_flavor:
type: string
default: baremetal
description: Alternate flavor specific to controller nodes
private_net:
type: string
default: private

View File

@ -30,16 +30,6 @@ parameters:
type: number
default: 1
controller_node_count:
type: number
default: 0
description: Number of additional nodes to deploy with alternate controller flavor
controller_flavor:
type: string
default: baremetal
description: Alternate flavor specific to controller nodes
public_net:
type: string
default: public
@ -185,37 +175,3 @@ resources:
os_password: {get_param: os_password}
os_tenant: {get_param: os_tenant}
os_auth_url: {get_param: os_auth_url}
openstack_controller_servers:
type: OS::Heat::ResourceGroup
properties:
count: {get_param: controller_node_count}
resource_def:
type: OS::OVB::ServerPair
properties:
bmc_flavor: {get_param: bmc_flavor}
bmc_image: {get_param: bmc_image}
baremetal_flavor: {get_param: controller_flavor}
baremetal_image: {get_param: baremetal_image}
key_name: {get_param: key_name}
public_net: {get_param: public_net}
public_sg: {get_resource: public_sg}
private_net: {get_param: private_net}
private_sg: {get_resource: private_sg}
provision_net: {get_param: provision_net}
provision_sg: {get_resource: provision_sg}
suffix: _%index%
bmc_prefix:
list_join:
- '_'
- - {get_param: bmc_prefix}
- 'controller'
baremetal_prefix:
list_join:
- '_'
- - {get_param: baremetal_prefix}
- 'controller'
os_user: {get_param: os_user}
os_password: {get_param: os_password}
os_tenant: {get_param: os_tenant}
os_auth_url: {get_param: os_auth_url}