Home

Awesome

aurora (MySQL) CfHighlander component

Parameters

NameUseDefaultGlobalTypeAllowed Values
EnvironmentNameTaggingdevtruestring
EnvironmentTypeTaggingdevelopmenttruestring['development','production']
VPCIdSecurity GroupsNonefalseAWS::EC2::VPC::Id
DnsDomainDNS domain to useNonetruestring
SubnetIdsList of subnetsNonefalseCommaDelimitedList
KmsKeyIdKMS IDNonefalsestring (arn)
NamespaceIdService discovery namespace IDNonefalsestring
SnapshotIdSnapshot ID to provision fromNonefalsestring
WriterInstanceTypeWriter instance type if engine is set to provisionedNonefalsestring
ReaderInstanceTypeReader instance type if engine is set to provisionedNonefalsestring
AutoPauseWhether to auto-pause if engine is set to serverlesstruefalsebool
MaxCapacityMaximum serverless instances if engine is set to serverless2falseint
MinCapacityMinimum serverless instances if engine is set to serverless2falseint
SecondsUntilAutoPauseSeconds until autopause if engine is set to serverless3600 (1 hour)falseint

Outputs/Exports

NameValueExported
SecretCredentialsSecret password if set to auto generatetrue
SecurityGroupSecurity Group nametrue
ServiceRegistryCloudMap service registry IDtrue
DBClusterIdDatabase Cluster IDtrue

Included Components

lib-ec2

Example Configuration

Highlander

  Component name:'database', template: 'aurora-mysql' do
    parameter name: 'DnsDomain', value: root_domain
    parameter name: 'DnsFormat', value: FnSub("${EnvironmentName}.#{root_domain}")
    parameter name: 'SubnetIds', value: cfout('vpcv2', 'PersistenceSubnets')
    parameter name: 'WriterInstanceType', value: writer_instance
    parameter name: 'ReaderInstanceType', value: reader_instance
    parameter name: 'EnableReader', value: 'true'
    parameter name: 'StackOctet', value: '80'
    parameter name: 'NamespaceId', value: cfout('servicediscovery', 'NamespaceId')
  end

Aurora MySQL Configuration

hostname: db
db_name: appdb
dns_format: ${DnsFormat}

storage_encrypted: true
engine: aurora-mysql
engine_version: '5.7.mysql_aurora.2.09.2'

writer_instance: db.r3.large
reader_instance: db.r3.large

deletion_policy: Snapshot

secret_username: appuser

security_group:
  -
    rules:
      -
        IpProtocol: tcp
        FromPort: 3306
        ToPort: 3306
    ips:
      - stack
      - company_office
      - company_client_vpn

service_discovery:
  name: db

Cfhighlander Setup

install cfhighlander gem

gem install cfhighlander

or via docker

docker pull theonestack/cfhighlander

Testing Components

Running the tests

cfhighlander cftest aurora-mysql