AWSTemplateFormatVersion: '2010-09-09'
Description: PeopleSoft Environment - Will include the OpsWorks Stack, Layers, Instnaces, Apps, ELBs, ELB Attachements, Route 53 Entries, and RDS Entries
Parameters:
SecurityGroupCloudFormationName:
Description: CloudFormation Security Group Name
Type: String
Default: "PeopleSoftSG"
PillarLowerCase:
Description: Lower Case Environment Pillar Identifier (el, hr, or sa)
Type: String
Default: "el"
EnvironmentLowerCase:
Description: Loser Case Environment Identifier (dev, tst, stg, prd, etc.)
Type: String
Default: "dev"
PillarUpperCase:
Description: Upper Case Environment Pillar Identifier (EL, HR, or SA)
Type: String
Default: "EL"
EnvironmentUpperCase:
Description: Upper Case Environment Identifier (DEV, TST, STG, PRD, etc.)
Type: String
Default: "DEV"
RunPostRefresh:
Description: Y or N value, will indicate the Post Refresh script will need to be run
Type: String
Default: "N"
#Need to pull this value in from an output from PeopleSoftSG CF Template
HostedZoneName:
Description: Hosted Zone Name
Type: String
Default: "ps-nonprod-aws.arizona.edu"
AuthTokenDomain:
Description: Auth Token Domain
Type: String
Default: "uaccess.arizona.edu"
FQDNPrefix:
Description: Full Qualified Domain Prefix (i.e. learning or el-sup)
Type: String
Default: "learning"
BitbucketSSHKeyStackCookbook:
Description: Bitbucket SSH Key for the Stack Cookbook
Type: CommaDelimitedList
NoEcho: 'true'
WebELBListenerPolicyNames:
Description: Web ELB Listener Policy Names
Type: String
Default: "ELBSecurityPolicy-2016-08"
WebELBListenerSSLCertID:
Description: Web ELB Listener SSL Certificate ID
Type: String
Default: "arn:aws:iam::415418166582:server-certificate/ps-nonprod-aws.arizona.edu_2016"
AppDockerAccessKey:
Description: AWS Access Key to retrieve docker image
Type: String
NoEcho: 'true'
AppDockerSecretKey:
Description: AWS Secret Access Key to retrieve docker image
Type: String
NoEcho: 'true'
WebDockerImage:
Description: Web Instance Docker Image and Tag
Type: String
Default: "998687558142.dkr.ecr.us-west-2.amazonaws.com/eas-peoplesoft-web-dpk:CentOS6-PT85510"
WebProfileName:
Description: Web Instance Web Profile Name
Type: String
Default: "DEV"
PsReportsDirecory:
Description: Web Instance PS Reports Directory
Type: String
Default: "/u01/app/psreports"
AppDockerImage:
Description: App Instance Docker Image and Tag
Type: String
Default: "998687558142.dkr.ecr.us-west-2.amazonaws.com/eas-peoplesoft-app-batch-dpk:CentOS6-PT85510"
AppOrBatch:
Description: App or Batch or Both
Type: String
Default: "BOTH"
AppTemplate:
Description: App Server Template (small, medium, large, developer)
Type: String
Default: "small"
AppOprId:
Description: App OPRID used to start app/batch services
Type: String
Default: "UAZPRCS"
PSAppOpridPw:
Description: App OPRID Password used to start app/batch services
Type: String
NoEcho: 'true'
AppBitBucketBranch:
Description: App BitBucket Branch (devlopement, test, stage, or production)
Type: String
Default: "development"
AppSesServer:
Description: App SES Server Host Name
Type: String
Default: "sesdev.aws-pilots.arizona.edu"
AppSesDefns:
Description: App SES Definitions to include, a comma delimited list
Type: String
Default: "LS_LM_ACT_CI,LS_LM_LEARNING,LS_LM_OBJV,LS_LM_PRG,PTPORTALREGISTRY"
WebInstType:
Description: Web Instance AWS Server Type
Type: String
Default: "t2.medium"
AppInstType:
Description: App Instance AWS Server Type
Type: String
Default: "t2.medium"
DBSnapshotID:
Description: DB Snapshot from Which to Restore From
Type: String
Default: "peoplesoft-eldev-final-snapshot"
DBMultiAz:
Description: DB Multi Availibility Zone Deployment (boolean)
Type: String
Default: "false"
DBInstanceClass:
Description: DB Instance Class
Type: String
Default: "db.t2.medium"
DBStorageType:
Description: DB Storage Type (gp2-SSD, io1-Provisioned IOPS)
Type: String
Default: "gp2"
TagService:
Description: Refers to the application (Uaccess Learning, Uaccess Employee, Uaccess Student)
Type: String
Default: "Uaccess Learning"
TagContactNetid:
Description: NetID of person most familiar with resource
Type: String
Default: "kellehs"
TagAccountNumber:
Description: Identifies the financial system account number
Type: String
Default: "Human Resources Systems"
TagSubAccount:
Description: Identifies the financial system subaccount number
Type: String
Default: "Uaccess Learning"
TagTicketNumber:
Description: Jira Ticket Number
Type: String
Default: "CLOUD-15"
#Next is the Conditions section, these will be used to build additional infrastructure for production
Conditions:
ThisIsProd: !Equals [!Ref "EnvironmentUpperCase", "PRD"]
#Resources for this CloudFormation Stack
Resources:
EnvStack:
Type: AWS::OpsWorks::Stack
Properties:
Name: !Join ["",["PeopleSoft ",!Ref "PillarUpperCase",!Ref "EnvironmentUpperCase"]]
ConfigurationManager:
Name: "Chef"
Version: "12"
CustomCookbooksSource:
Type: "git"
Url: "git@bitbucket.org:ua-ecs/ecs-opsworks-cookbooks.git"
Revision: "CLOUD-15"
SshKey:
Fn::Join:
- "\n"
- !Ref "BitbucketSSHKeyStackCookbook"
ServiceRoleArn:
Fn::ImportValue:
!Sub "${SecurityGroupCloudFormationName}-OpsWorksIAMRoleARN"
DefaultInstanceProfileArn: !GetAtt "EnvInstanceProfile.Arn"
DefaultOs: "Amazon Linux 2017.03"
DefaultSshKeyName: "peoplesoft-keypair"
DefaultRootDeviceType: "ebs"
DefaultSubnetId:
Fn::ImportValue:
!Sub "${SecurityGroupCloudFormationName}-PrivSubNet1"
HostnameTheme: Layer_Dependent
UseCustomCookbooks: "true"
VpcId:
Fn::ImportValue:
!Sub "${SecurityGroupCloudFormationName}-VPCID"
This block was created by Mark and is a custom Lamda Function that will tag the OpsWorks instances properly