diff --git a/content/000_pre/00_page1.md b/content/000_pre/00_page1.md index 119817d..ee023f4 100644 --- a/content/000_pre/00_page1.md +++ b/content/000_pre/00_page1.md @@ -4,32 +4,29 @@ chapter = false weight = 10 +++ -You will use AWS Appstream to connect to your lab environment. You will find the Appstream URL in your team dashboard. +Once you are logged in, you will see the event Engine Team dashboard. For most of this lab you will be +using a preconfigured IDE streamed to your browser using AppStream. To launch the development environment, click on the **IDE** link in the **Modules** section of the dashboard. + +![ide-button](/images/click-ide.png) -@TODO Screenshot ## Lab information The AWS Appstream session that you are using for this hands on lab has the following programs pre-installed: -- Python3 (taskcat is Python program) +- Python3 (taskcat is a Python program) - taskcat (pip install taskcat) -- Vscode with plugins pre-installed +- Vscode with following plugins pre-installed - taskcat config validation - cfn-lint validation - CloudFormation template auto-complete and doc links from the cfn-resource-spec -## Copy paste +#### Copy paste -Copy and paste should work out of the box on all browsers, in some browsers you may get -a dialog box requesting clipboard access which must be allowed to enable copy-paste. +When using IDE, copy and paste should work out of the box on all browsers, however, in some browsers you may get a dialog box requesting clipboard access which must be allowed to enable copy-paste. -The AppStream also provides a tool in the top left of the window that enables placing -data into the AppStream session's clipboard. This is recommended for pasting large -blocks of text. +The AppStream also provides a tool in the top left of the window that enables placing data into the AppStream session's clipboard. This is recommended for pasting large blocks of text. -### MAC OS +#### MAC OS -On Mac OS the function of the Command key is swapped with that of the Control key, so -to copy/paste in the appstream environment the shortcuts are control-c and control-v -respectively. +On Mac OS the function of the Command key is swapped with that of the Control key, so to copy/paste in the appstream environment the shortcuts are control-c and control-v respectively. diff --git a/content/000_pre/_index.md b/content/000_pre/_index.md index 0725e69..84027e9 100755 --- a/content/000_pre/_index.md +++ b/content/000_pre/_index.md @@ -14,8 +14,4 @@ To login to that AWS Account, you will be given a unique **hash**, something as To login - open a web browser, navigate to https://dashboard.eventengine.run/ and enter the **hash** to proceed. -Once logged in you will see the event Engine dashboard, for most of this lab we will be -using a preconfigured IDE streamed to your browser using AppStream. To launch the -environment, click on the **IDE** link in the **Modules** section of the dashboard. - -![fig0.1](images/fig0.1.png) +![fig0.1](/images/fig0.1.png) diff --git a/content/050_concepts/00_page1.md b/content/050_concepts/00_page1.md index 6d7e48d..711315a 100644 --- a/content/050_concepts/00_page1.md +++ b/content/050_concepts/00_page1.md @@ -5,7 +5,7 @@ weight = 60 +++ -Taskcat uses two config files: _**Global config**_ and _**Project config**_ +Taskcat uses two config files: _**Project config**_ and _**Global config**_. ## Project Config This config file provides project-specific configurations. diff --git a/content/050_concepts/00_page2.md b/content/050_concepts/00_page2.md index 00fad07..ef9fd87 100644 --- a/content/050_concepts/00_page2.md +++ b/content/050_concepts/00_page2.md @@ -8,9 +8,9 @@ weight = 70 Parameter Overrides were added to the taskcat to solve a couple of common problems. First, many templates share common parameters that are unique to an AWS account, like a KeyPair name -or an S3 Bucket, overrides provided a way to store those centrally for all your projects. +or an S3 Bucket; Overrides provided a way to store those centrally for all your projects. Second, we didn't want to add sensitive data (usernames, passwords, tokens) to a git -repository. The idea was to store sensitive/unique data outside of a git repository, but still +repository. The idea is to store sensitive/unique data outside of a git repository, but still execute a test using this data. To that end, *any parameter defined in the global config will take precedence over the same parameter in a project-level config*. diff --git a/content/100_lab1/children1/10_page3.md b/content/100_lab1/children1/10_page3.md index 7a66dd2..69f1a46 100644 --- a/content/100_lab1/children1/10_page3.md +++ b/content/100_lab1/children1/10_page3.md @@ -8,7 +8,7 @@ First, you will create a project section in your project configuration file. ## Add a project section -To add a project section, copy and paste the following in **.taskcat.yml** file. +To add a project section, copy and paste the following in your **.taskcat.yml** file. ```yaml project: diff --git a/content/100_lab1/children1/10_page4.md b/content/100_lab1/children1/10_page4.md index eb668a5..ef21601 100644 --- a/content/100_lab1/children1/10_page4.md +++ b/content/100_lab1/children1/10_page4.md @@ -19,7 +19,7 @@ project: name: cfn-project tests: mytest: - template: templates/lab1.template.yamls + template: templates/lab1.template.yaml ``` diff --git a/content/100_lab1/children1/10_page5.md b/content/100_lab1/children1/10_page5.md index 7c7274e..b08c6e1 100644 --- a/content/100_lab1/children1/10_page5.md +++ b/content/100_lab1/children1/10_page5.md @@ -8,11 +8,9 @@ Now, you will define in which AWS regions you want to test your cloudformation t ## Add regions to your test -The **regions:** key is optional for the tests. By default **regions** inherit from the global -configuration (We will conver global configs later in this lab) +The **regions:** key is optional for the tests. By default **regions** inherit from the global configuration (We will conver global configs later in this lab). -The regions key takes a _list_ of regions. When defined in a test, taskcat will -limit test to those regions +The regions key takes a _list_ of regions. When defined in a test, taskcat will limit test to those regions. For now, specifiy only one region **us-east-1**. diff --git a/content/100_lab1/children1/_index.md b/content/100_lab1/children1/_index.md index b37d134..e0fb486 100644 --- a/content/100_lab1/children1/_index.md +++ b/content/100_lab1/children1/_index.md @@ -13,7 +13,6 @@ From the vscode file browser, navigate to **lab1/cfn-project**, and open **.tas The file will be empty, let's start by adding the sections needed for a basic configuration. -@TODO Screen shoot need updated to show appstream ![fig1.1](/images/fig_lab1.1.png) diff --git a/content/100_lab1/children2/_index.md b/content/100_lab1/children2/_index.md index b01a7ca..bc31e23 100644 --- a/content/100_lab1/children2/_index.md +++ b/content/100_lab1/children2/_index.md @@ -11,6 +11,7 @@ weight = 101 From your vscode terminal change directory to your project root for **lab1** __(lab1/cfn-project)__ Under cfn-project you will see the following files + ``` cfn-project ├── lambda_functions/source/GenRandom/ @@ -18,23 +19,7 @@ cfn-project └── .taskcat.yml ``` -The provided template for this lab uses a Lambda backed custom resource. - -**source/GenRandom** contains the lambda source. - -When lambda source is detected taskcat will package the lambda zip file and then save it -to lambda_functions/packages/. This zip file is referenced in our lambda function. - -{{% notice tip %}} -The default source and package folders can be changed by setting values in your -[project_config](https://aws-quickstart.github.io/taskcat/#project-config) file. -{{% /notice %}} - -taskcat is able to build dependencies for your lambda so that you don't need to -check them into source control. This can be done by providing a Dockerfile that -contains the in the build steps in source folder. Or, for python functions, if a -requirements.txt file is found, taskcat will package the dependencies defined in it -into your zip. +The provided template for this lab (**lab1.template.yaml**) uses a Lambda backed custom resource, as shown below. **source/GenRandom** contains the lambda source code. ``` GenRandomLambda: @@ -50,10 +35,18 @@ into your zip. S3Key: !Sub '${S3KeyPrefix}lambda_functions/packages/GenRandom/lambda.zip' ``` -Experiment a bit with the template by adding another resource. You will notice that the -IDE provides autocomplete (Ctrl+Space to get a list of available properties). Also every -time the file is saved, validation is done and any errors detected in the template are -displayed inline and in the **PROBLEMS** tab to the left of the terminal. +When lambda source is detected, taskcat will package the lambda function into a zip file and then save it +to lambda_functions/packages/. This zip file is referenced in our lambda function. *HINT: Check S3Key in the lambda function resource above.* + +{{% notice tip %}} +The default source and package folders can be changed by setting values in your +[project_config](https://aws-quickstart.github.io/taskcat/#project-config) file. +{{% /notice %}} + +taskcat is able to build dependencies for your lambda so that you don't need to +check them into source control. This can be done by providing a Dockerfile that +contains the in the build steps in source folder. Or, for python functions, if a +requirements.txt file is found, taskcat will package the dependencies defined in it, into your zip. {{% notice tip %}} If you want to run packaging step on its own you can run `taskcat package` diff --git a/content/200_lab2/20_page1.md b/content/200_lab2/20_page1.md index 03f7875..3f78e57 100644 --- a/content/200_lab2/20_page1.md +++ b/content/200_lab2/20_page1.md @@ -6,32 +6,32 @@ weight = 210 ## Add Psuedo-Parameters to your project-level taskcat config -* Edit your `cfn_project/.taskcat.yml` parameters to include psuedo-parameters. -[Please see the Taskcat Concepts section for more details on psuedo-parameters](../00_concepts.html) +Edit your `cfn_project/.taskcat.yml` parameters to include psuedo-parameters. +Please see the [Getting Started](/050_concepts/00_page2.html#psuedo-parameters) section for more details on psuedo-parameters. -* Example project config file: +Following code sample shows an example project config file: ```yaml - project: - name: cfn-project - tests: - mytest: - template: templates/lab2.template.yaml - regions: - - us-east-1 - parameters: - S3BucketName: '$[taskcat_autobucket]' - S3KeyPrefix: 'cfn-project/' - LicenseToken: 'value-to-be-overriden-by-global-config' - AvailabilityZones: '$[taskcat_genaz_2]' +project: + name: cfn-project +tests: + mytest: + template: templates/lab2.template.yaml + regions: + - us-east-1 + parameters: + S3BucketName: '$[taskcat_autobucket]' + S3KeyPrefix: 'cfn-project/' + LicenseToken: 'value-to-be-overriden-by-global-config' + AvailabilityZones: '$[taskcat_genaz_2]' ``` ## Add Psuedo-parameters to your global taskcat config. -* Edit your parameters to include psuedo-parameters. +Edit your parameters to include psuedo-parameters. -* Note: For the purposes of this lab, we've created a shortcut command to access to the -file, in the IDE terminal type: +**Note:** For the purposes of this lab, we've created a shortcut command to provide access to the +global config file. Running the following command from your IDE terminal, to open it in the editor. ```bash open-taskcat-global-config diff --git a/content/200_lab2/20_page2.md b/content/200_lab2/20_page2.md index 564deb2..4748bca 100644 --- a/content/200_lab2/20_page2.md +++ b/content/200_lab2/20_page2.md @@ -8,11 +8,11 @@ weight = 220 ## Start a test -From the **cfn-project** dir run you taskcat test +From the **lab2/cfn-project** dir run you taskcat test ``` taskcat test run ``` -Estimated runtime (5 mins) +Estimated test run time (5 mins) ![fig2.2](/images/taskcat_execution2.gif) diff --git a/content/200_lab2/20_page3.md b/content/200_lab2/20_page3.md index e693fe2..9ab65c9 100644 --- a/content/200_lab2/20_page3.md +++ b/content/200_lab2/20_page3.md @@ -4,11 +4,10 @@ chapter = false weight = 230 +++ - ## Login to the AWS Console -1. from the [Event Engine dashboard](https://dashboard.eventengine.run/) click login to AWS console -2. navigate to the CloudFormation console in us-east-1 (N. Virginia) +1. From the [Event Engine dashboard](https://dashboard.eventengine.run/) click login to AWS console +2. Navigate to the CloudFormation console in us-east-1 (N. Virginia) 3. Change the filter to view **Deleted** stacks 3. Select the top stack ( they are ordered by creation date) 4. Click on the **"Outputs"** tab @@ -16,9 +15,8 @@ weight = 230 Notice that the values for the **LicenseToken** parameter has been replaced with the value specified in the global override. -Notice that the value for **AvailablityZones** has been replaced with 2 az names from the -us-east-1 region - +Notice that the value for **AvailablityZones** has been replaced with 2 AZ names from the +us-east-1 region. ![fig1.4](/images/stack_outputs.png) diff --git a/content/200_lab2/_index.md b/content/200_lab2/_index.md index c324f0f..d63bcd4 100644 --- a/content/200_lab2/_index.md +++ b/content/200_lab2/_index.md @@ -8,9 +8,9 @@ weight = 200 Using the provided cloudformation template build a taskcat config that uses **psuedo-parameters** We will use override to inject a `LicenseToken` and dynamically inject `AvailiblityZone` -values during testing +values during testing. -- Use taskcat overrides pass inputs into the stack that you do not want in the +- **Overrides** are used to pass inputs into the stack that you do not want in the project_root/gitrepo _(secrets like `LicenseKeys` or `APITokens`, etc. Or account specific values like EC2 KeyPair names, or Rooute53 domain names)_ diff --git a/content/300_lab3/_index.md b/content/300_lab3/_index.md index 6f50b7c..640689c 100644 --- a/content/300_lab3/_index.md +++ b/content/300_lab3/_index.md @@ -6,7 +6,7 @@ weight = 300 ### Testing in multiple regions -An important part of building high-confidence CloudFormation is multi-region testing. +An important part of building high-confidence CloudFormation is testing in multiple regions. In this lab, we will see how **taskcat** can help uncover common issues when deploying in different regions. @@ -16,9 +16,9 @@ To test this template we will add 2 more regions to the test definition. - After running the test, we will see that the **us-east-1** region deploys properly, while we _receive failures in other regions._ -Looking at the logs we can see that lambda source is not accessible from the other regions. +Looking at the logs you will see that lambda source is not accessible from the other regions. -- We will then modify the our template to include a child stack. This child stack will pre-stage the Lambda source in each region. +- We will then modify our template to include a child stack. This child stack will pre-stage the Lambda source in each region. - Finally, we'll kick off our **taskcat** test again to validate the fix we implemented! diff --git a/static/images/click-ide.png b/static/images/click-ide.png new file mode 100644 index 0000000..cd2550f Binary files /dev/null and b/static/images/click-ide.png differ