Skip to content

Commit

Permalink
update the aws blueprint too
Browse files Browse the repository at this point in the history
  • Loading branch information
earthmant committed May 8, 2019
1 parent 2c43b95 commit 12a000c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
30 changes: 21 additions & 9 deletions db-lb-app/infrastructure/aws.yaml
Expand Up @@ -12,6 +12,22 @@ imports:

inputs:

resource_name_prefix:
description: A prefix for resource names for resources that will be created, for example, db or lb.
type: string

network_deployment_name:
description: >
The deployment ID of an existing deployment.
For example, aws-example-network.
The following capabilities should be exposed:
- external_network
- public_network_router
- public_network
- public_subnet
type: string
default: aws

instance_type:
description: >
The AWS instance_type.
Expand All @@ -22,16 +38,12 @@ inputs:
The username of the agent running on the instance created from the image.
default: 'ec2-user'

resource_name_prefix:
description: A prefix for resource names for resources that will be created, for example, db or lb.
type: string

dsl_definitions:

client_config: &client_config
aws_access_key_id: { get_secret: aws_access_key_id }
aws_secret_access_key: { get_secret: aws_secret_access_key }
region_name: { get_capability: [ aws, region_name ] }
region_name: { get_capability: [ { get_input: network_deployment_name }, region_name ] }

node_templates:

Expand All @@ -54,7 +66,7 @@ node_templates:
Ebs:
DeleteOnTermination: True
Placement:
AvailabilityZone: { get_capability: [ aws, availability_zone ] }
AvailabilityZone: { get_capability: [ { get_input: network_deployment_name }, availability_zone ] }
UserData: { get_attribute: [ cloud_init, cloud_config ] }
use_public_ip: true
relationships:
Expand Down Expand Up @@ -140,14 +152,14 @@ node_templates:
resource_config:
GroupName: { concat: [ { get_input: resource_name_prefix }, '-infra-group' ] }
Description: db lb app infra group
VpcId: { get_capability: [ aws, vpc_id ] }
VpcId: { get_capability: [ { get_input: network_deployment_name }, vpc_id ] }

subnet:
type: cloudify.nodes.aws.ec2.Subnet
properties:
client_config: *client_config
use_external_resource: true
resource_id: { get_capability: [ aws, public_subnet_id ] }
resource_id: { get_capability: [ { get_input: network_deployment_name }, public_subnet_id ] }
resource_config:
CidrBlock: 'N/A'
AvailabilityZone: 'N/A'
Expand All @@ -157,7 +169,7 @@ node_templates:
properties:
client_config: *client_config
use_external_resource: true
resource_id: { get_capability: [ aws, vpc_id ] }
resource_id: { get_capability: [ { get_input: network_deployment_name }, vpc_id ] }
resource_config:
CidrBlock: 'N/A'

Expand Down
8 changes: 4 additions & 4 deletions db-lb-app/infrastructure/openstack.yaml
Expand Up @@ -8,6 +8,10 @@ imports:

inputs:

resource_name_prefix:
description: A prefix for resource names for resources that will be created, for example, db or lb.
type: string

network_deployment_name:
description: >
The deployment ID of an existing deployment.
Expand Down Expand Up @@ -46,10 +50,6 @@ inputs:
type: string
default: { get_secret: base_flavor_id }

resource_name_prefix:
description: A prefix for resource names for resources that will be created, for example, db or lb.
type: string

dsl_definitions:

client_config: &client_config
Expand Down

0 comments on commit 12a000c

Please sign in to comment.