The following instruction must be performed from within your workshop repo qs-workshop
Each Quick Start should allow users to deploy the workload into an existing VPC and in a new VPC which is created as part of the Quick Start. Which means, you need to provide two deployment options to cover both the scenarios:
To cover both the above scenarios, we will structure our templates in a modular fashion, as shown below.
master.template is the entry point to deploy the Quick Start into a new VPC. It creates a VPC, a Linux bastion, and the workload, as nested stacks.
workload.template is the entry point to deploy the workload into an existing VPC.
To deploy the Quick Start into a new VPC, user will launch master.template. And to deploy Quick Start into an already existing VPC, user will launch workload.template. Workload template will require VPC information to be passed in as parameters.
Let’s create the master templete now.
Master template will create one or many nested stacks, depending upon the Quick Start architecture.
For this workshop’s Quick Start architecture, master template will create three nested stacks - VPC stack, Linux bastion stack and a workload stack, as shown in the image above.
Create the master template by creating a file called
master.template.yaml in templates/ directory, copy the below contents into the file, and save.
--- AWSTemplateFormatVersion: 2010-09-09 Description: This template creates the VPC and workload as nested stacks. Parameters: set of parameters Mappings: set of mappings Conditions: set of conditions Resources: set of resources Outputs: set of outputs
Right now the master.template.yaml is incomplete. It doesn’t do much at this point. You will be filling in different sections of the templates as you follow along rest of the workshop.