--- AWSTemplateFormatVersion: 2010-09-09 Description: Launches a Titian Mosaic application server and database. (qs-1pjap3spf) Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Titian configuration Parameters: - pDNSName - Label: default: Network configuration Parameters: - pAvailabilityZones - pVPCCIDR - pPublicSubnet1CIDR - pPublicSubnet2CIDR - pPrivateSubnet1CIDR - pPrivateSubnet2CIDR - pDnsHostedZoneID - pDnsHostedZoneApexDomain - pLoadBalancerType - pSecurityGroupForWebAccess - pWebAccessCIDR - Label: default: Amazon EC2 configuration Parameters: - pEC2KeyPair - pAppServerInstanceType - Label: default: Amazon RDS configuration Parameters: - pDBName - pDBUsername - pDBTimezone - pDBPassword - pDBInstanceType - pDBAllocatedStorage - pDBEngine - pDBEngineLicenseModel - pDBMultiAZ - Label: default: AWS quick start configuration Parameters: - QSS3BucketName - QSS3BucketRegion - QSS3KeyPrefix ParameterLabels: pDBTimezone: default: DB time zone pAppServerInstanceType: default: App server instance type pAvailabilityZones: default: Availability zones pDBAllocatedStorage: default: Database storage capacity pDBEngine: default: Database engine pDBEngineLicenseModel: default: Database license model pDBInstanceType: default: Database instance type pDBMultiAZ: default: Multi-AZ amazon RDS pDBName: default: Database name pDBPassword: default: Database password pDBUsername: default: Database user/owner pDnsHostedZoneApexDomain: default: Internal DNS apex domain pDnsHostedZoneID: default: Internal DNS hosted zone ID pDNSName: default: Mosaic server DNS name pEC2KeyPair: default: Key pair for server pLoadBalancerType: default: Load balancer type pPrivateSubnet1CIDR: default: Private subnet 1 CIDR pPrivateSubnet2CIDR: default: Private subnet 2 CIDR pPublicSubnet1CIDR: default: Public subnet 1 CIDR pPublicSubnet2CIDR: default: Public subnet 2 CIDR pSecurityGroupForWebAccess: default: Web access security group pVPCCIDR: default: VPC CIDR pWebAccessCIDR: default: Web access CIDR (no SG) QSS3KeyPrefix: default: Quick start S3 key prefix QSS3BucketName: default: Quick start S3 bucket name QSS3BucketRegion: default: Quick start S3 bucket region Parameters: pDBTimezone: Description: The time zone to set the Mosaic FreezerManagement database to. Type: String AllowedValues: - Africa/Cairo - Africa/Casablanca - Africa/Harare - Africa/Lagos - Africa/Luanda - Africa/Monrovia - Africa/Nairobi - Africa/Tripoli - Africa/Windhoek - America/Araguaina - America/Argentina/Buenos_Aires - America/Asuncion - America/Bogota - America/Caracas - America/Chicago - America/Chihuahua - America/Cuiaba - America/Denver - America/Detroit - America/Fortaleza - America/Godthab - America/Guatemala - America/Halifax - America/Lima - America/Los_Angeles - America/Manaus - America/Matamoros - America/Mexico_City - America/Monterrey - America/Montevideo - America/New_York - America/Phoenix - America/Santiago - America/Sao_Paulo - America/Tijuana - America/Toronto - Asia/Amman - Asia/Ashgabat - Asia/Baghdad - Asia/Baku - Asia/Bangkok - Asia/Beirut - Asia/Calcutta - Asia/Damascus - Asia/Dhaka - Asia/Hong_Kong - Asia/Irkutsk - Asia/Jakarta - Asia/Jerusalem - Asia/Kabul - Asia/Karachi - Asia/Kathmandu - Asia/Kolkata - Asia/Krasnoyarsk - Asia/Magadan - Asia/Manila - Asia/Muscat - Asia/Novosibirsk - Asia/Rangoon - Asia/Riyadh - Asia/Seoul - Asia/Shanghai - Asia/Singapore - Asia/Taipei - Asia/Tehran - Asia/Tokyo - Asia/Ulaanbaatar - Asia/Vladivostok - Asia/Yakutsk - Asia/Yerevan - Atlantic/Azores - Atlantic/Cape_Verde - Australia/Adelaide - Australia/Brisbane - Australia/Darwin - Australia/Eucla - Australia/Hobart - Australia/Lord_Howe - Australia/Perth - Australia/Sydney - Brazil/DeNoronha - Brazil/East - Canada/Newfoundland - Canada/Saskatchewan - Europe/Amsterdam - Europe/Athens - Europe/Berlin - Europe/Dublin - Europe/Helsinki - Europe/Kaliningrad - Europe/London - Europe/Madrid - Europe/Moscow - Europe/Paris - Europe/Prague - Europe/Rome - Europe/Sarajevo - Pacific/Apia - Pacific/Auckland - Pacific/Chatham - Pacific/Fiji - Pacific/Guam - Pacific/Honolulu - Pacific/Kiritimati - Pacific/Marquesas - Pacific/Samoa - Pacific/Tongatapu - Pacific/Wake - US/Alaska - US/Central - US/East-Indiana - US/Eastern - US/Pacific pAppServerInstanceType: Description: Titian Mosaic app server EC2 instance type Type: String Default: t2.large AllowedValues: - t2.medium - t2.large - t2.xlarge - m5.large - m5.xlarge - m5.2xlarge - m4.large - m4.xlarge - m4.2xlarge pAvailabilityZones: Description: List of Availability Zones to use for the subnets in the VPC. Only two Availability Zones are used for this deployment, and the logical order of your selections is preserved. Type: List pDBEngine: Description: Amazon RDS Oracle Version. Recommend the default. Type: String Default: oracle-se2 AllowedValues: - oracle-se2 - oracle-ee pDBEngineLicenseModel: Description: Oracle license model. AllowedValues: - license-included - bring-your-own-license Type: String Default: license-included pDBAllocatedStorage: Description: Database total storage size in GB. Default is 50 GB. Type: String Default: 50 pDBInstanceType: Description: Database Size. Type: String Default: db.t3.large AllowedValues: - db.t3.medium - db.t3.large - db.t3.xlarge - db.t3.2xlarge - db.r4.large - db.r4.xlarge - db.r4.2xlarge - db.m4.large - db.m4.xlarge - db.m4.2xlarge pDBMultiAZ: Description: Multi-AZ Amazon RDS configuration. true/false - default is false. Type: String AllowedValues: - "true" - "false" Default: "false" pDBName: Description: Titian Mosaic database name Type: String MaxLength: 8 Default: mosaic pDBPassword: Description: Titian Mosaic database user/owner password Type: String NoEcho: true pDBUsername: Description: Titian Mosaic database user/owner Type: String Default: mosaicowner pDnsHostedZoneApexDomain: Description: (Optional) Internal DNS apex domain Type: String Default: "" pDnsHostedZoneID: Description: (Optional) Internal DNS hosted zone ID. Type: String Default: "" pDNSName: Description: The internal DNS CNAME to be used for the Mosaic server. Leave the default if you are unsure of what this does. Type: String Default: mosaic pEC2KeyPair: Description: Key Name for server. Type: AWS::EC2::KeyPair::KeyName pLoadBalancerType: Default: internet-facing Type: String AllowedValues: - internet-facing - internal pPrivateSubnet1CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.0.0/19 Description: CIDR block for private subnet 1 located in Availability Zone 1 Type: String pPrivateSubnet2CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.32.0/19 Description: CIDR block for private subnet 2 located in Availability Zone 2 Type: String pPublicSubnet1CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.128.0/20 Description: CIDR block for the public (DMZ) subnet 1 located in Availability Zone 1 Type: String pPublicSubnet2CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.144.0/20 Description: CIDR block for the public (DMZ) subnet 2 located in Availability Zone 2 Type: String pSecurityGroupForWebAccess: Description: Security group for web access. Default is empty string. Type: String Default: "" pVPCCIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.0.0/16 Description: CIDR block for the VPC Type: String pWebAccessCIDR: Description: Will only be used if web access security Group is not specified. Enter 0.0.0.0/0 if you want to open it to the world. Type: String Default: "10.0.0.0/16" QSS3BucketName: AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ ConstraintDescription: Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Default: aws-quickstart Description: S3 bucket name for the Quick Start assets. Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Type: String QSS3BucketRegion: Default: 'us-east-1' Description: 'The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.' Type: String QSS3KeyPrefix: AllowedPattern: ^[0-9a-zA-Z-/]*$ ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and a forward slash (/) at the end of the prefix. Description: S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). Default: quickstart-titian-mosaic/ Type: String Conditions: cDNSRecord: !Not [ !Or [ !Equals [!Ref pDnsHostedZoneID, ""] , !Equals [!Ref pDnsHostedZoneApexDomain, ""] ] ] UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] Resources: # Deploys a VPC in two availability zones with public and private subnets rVPCStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZones: !Join [ "," , !Ref pAvailabilityZones ] KeyPairName: !Ref pEC2KeyPair NumberOfAZs: 2 PrivateSubnet1ACIDR: !Ref pPrivateSubnet1CIDR PrivateSubnet2ACIDR: !Ref pPrivateSubnet2CIDR PublicSubnet1CIDR: !Ref pPublicSubnet1CIDR PublicSubnet2CIDR: !Ref pPublicSubnet2CIDR VPCCIDR: !Ref pVPCCIDR # Deploys Titian Mosaic into the VPC that was just created rTitianMosaic: Type: AWS::CloudFormation::Stack DependsOn: - rVPCStack Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/titian-mosaic.template' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: pAppServerInstanceType: !Ref pAppServerInstanceType pAppSubnetA: !GetAtt rVPCStack.Outputs.PublicSubnet1ID pAppSubnetB: !GetAtt rVPCStack.Outputs.PublicSubnet2ID pDBAllocatedStorage: !Ref pDBAllocatedStorage pDBEngine: !Ref pDBEngine pDBEngineLicenseModel: !Ref pDBEngineLicenseModel pDBInstanceType: !Ref pDBInstanceType pDBMultiAZ: !Ref pDBMultiAZ pDBName: !Ref pDBName pDBPassword: !Ref pDBPassword pDBTimezone: !Ref pDBTimezone pDBSubnetA: !GetAtt rVPCStack.Outputs.PrivateSubnet1AID pDBSubnetB: !GetAtt rVPCStack.Outputs.PrivateSubnet2AID pDBUsername: !Ref pDBUsername pDmzSubnetA: !GetAtt rVPCStack.Outputs.PublicSubnet1ID pDmzSubnetB: !GetAtt rVPCStack.Outputs.PublicSubnet2ID pDnsHostedZoneID: !Ref pDnsHostedZoneID pDnsHostedZoneApexDomain: !Ref pDnsHostedZoneApexDomain pDNSName: !Ref pDNSName pEC2KeyPair: !Ref pEC2KeyPair pLoadBalancerType: !Ref pLoadBalancerType pSecurityGroupForWebAccess: !Ref pSecurityGroupForWebAccess pVpcId: !GetAtt rVPCStack.Outputs.VPCID pWebAccessCIDR: !Ref pWebAccessCIDR Outputs: oLoadBalancerDNS: Description: DNS of Load Balancer to access Titian Mosaic Value: !GetAtt rTitianMosaic.Outputs.oLoadBalancerDNS oDNSUrl: Condition: cDNSRecord Description: URL to Load Balancer to access Titian Mosaic Value: !GetAtt rTitianMosaic.Outputs.oInternalDNSUrl