Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit fde8fc2

Browse files
authored
Fixed some issues I found during dry-run (#61)
* Link not working from setup instructions * Remove GitHub download approval In my testing it doesn't happen on AL2 Cloud9 on SAM CLI version 1.16.0 * git global config already preconfigured on Cloud9 AL2 * Use codecommit:// path for git remote * Make resize.sh work on xfs volumes as well * Commit the pipeline definition after creating it Otherwise it is only pushed as part of the next lab section * SAM deploy guided arguments have changed; updated screenshot * Updated screenshot; was still showing node v10 * Some minor issues found by Thomas in his dry-run today Co-authored-by: Gerhard Poul <gpoul@amazon.at>
1 parent a320c98 commit fde8fc2

File tree

10 files changed

+33
-27
lines changed

10 files changed

+33
-27
lines changed

workshop/content/java/buildpipe/credhelper/_index.en.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@ weight = 10
66

77
One of the cool things about CodeCommit is the support for IAM authentication. And if you are running this workshop from a Cloud9 workspace, you can leverage the fact that your terminal is already pre-authenticated with valid AWS credentials.
88

9-
Run the following commands from your terminal:
10-
11-
```
12-
git config --global credential.helper '!aws codecommit credential-helper $@'
13-
git config --global credential.UseHttpPath true
14-
```
15-
16-
Now configure the git client with username and email, so your commits have an author defined.
9+
Configure the git client with username and email, so your commits have an author defined.
1710

1811
```
1912
git config --global user.name "Replace with your name"
@@ -22,4 +15,4 @@ git config --global user.email "replace_with_your_email@example.com"
2215

2316
Example:
2417

25-
![CredsHelper](/images/java/chapter4/credhelper/cred-helper.png)
18+
![CredsHelper](/images/java/chapter4/credhelper/cred-helper.png)

workshop/content/java/buildpipe/gitpush/_index.en.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,10 @@ Example:
4242
![GitCommit](/images/java/chapter4/gitpush/initial-commit.png)
4343

4444
### Push the code
45-
Add your CodeCommit repository URL as a _remote_ on your local git project. This is the `cloneUrlHttp` value that you got back after creating the repository in Step 1 of this chapter.
46-
47-
{{% notice tip %}}
48-
If you can't find the CodeCommit repository URL, you can find it by running this command: `aws codecommit get-repository --repository-name sam-app`.
49-
{{% /notice %}}
45+
Add your CodeCommit repository URL as a _remote_ on your local git project.
5046

5147
```
52-
git remote add origin REPLACE_WITH_HTTP_CLONE_URL
48+
git remote add origin codecommit://sam-app
5349
```
5450

5551
{{% notice tip %}}
@@ -69,4 +65,4 @@ Example:
6965
### Verify in CodeCommit
7066
Navigate to the [AWS CodeCommit console](https://console.aws.amazon.com/codesuite/codecommit/home), find your _sam-app_ repository and click on it to view its contents. Make sure your code is there. You should see a screen like the following:
7167

72-
![VerifyCodeCommit](/images/java/chapter4/gitpush/code-commit.png)
68+
![VerifyCodeCommit](/images/java/chapter4/gitpush/code-commit.png)

workshop/content/javascript/buildpipe/done/_index.en.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,14 @@ Let your pipline run every stage. After it finishes it will look all green like
88

99
![VerifyPipelineRunning](/images/chapter4/screenshot-pipeline-verify-3.png)
1010

11-
#### Congratulations! You have created a CI/CD pipeline for a Serverless application!
11+
### Push the changes
12+
13+
In the terminal, run the following commands from the root directory of your `sam-app` project.
14+
15+
```
16+
git add .
17+
git commit -m "CI/CD Pipeline definition"
18+
git push
19+
```
20+
21+
#### Congratulations! You have created a CI/CD pipeline for a Serverless application!

workshop/content/javascript/manualdeploy/deploy/_index.en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ The guided deployment does few things for you. Let's take a quick look at what h
3434
**1)** Your codebase gets packaged in a zip file.
3535
**2)** SAM creates an S3 bucket in your account, if it doesn't already exist.
3636
**3)** Zip file is uploaded to the S3 bucket.
37-
**4)** SAM creates the [packaged template](/manualdeploy/bucket.html) that references the location of the zip file on S3.
37+
**4)** SAM creates the [packaged template](/javascript/manualdeploy/bucket.html#the-packaged-template) that references the location of the zip file on S3.
3838
**5)** This template is also uploaded to the S3 bucket.
3939
**6)** SAM starts the deployment via CloudFormation ChangeSets.
4040

4141
The first time you do a guided deployment, a new file `samconfig.toml` is created in the root of your project with your specified deployment parameters, this is so that the next time you execute `sam deploy`, it uses the same parameters without having you to enter them again.
4242

4343
![SamDeploy](/images/screenshot-sam-config-toml.png)
4444

45-
If you want to learn more about guided deployments and the samconfig.toml file, here is a good Blog Post: https://aws.amazon.com/blogs/compute/a-simpler-deployment-experience-with-aws-sam-cli.
45+
If you want to learn more about guided deployments and the samconfig.toml file, here is a good Blog Post: https://aws.amazon.com/blogs/compute/a-simpler-deployment-experience-with-aws-sam-cli.

workshop/content/javascript/sam/init/_index.en.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ It will prompt for project configuration parameters:
2525
#### Leave default `sam-app` for project name
2626
![samInit](/images/screenshot-sam-init-2.png)
2727

28-
#### Type `Y` to accept download from GitHub
29-
![samInit](/images/screenshot-sam-init-3.png)
30-
3128
#### Type `1` to select the `Hello World Example`
3229
![samInit](/images/screenshot-sam-init-5.png)
3330

@@ -40,4 +37,4 @@ This command supports cookiecutter templates, so you could write your own custom
4037
You should see a new folder `sam-app` created with a basic Hello World scaffolding.
4138
![samInit](/images/screenshot-sam-init-7.png)
4239

43-
If you are interested in learning more about initializing SAM projects, you can find the full reference for the `sam init` command in the [SAM CLI reference](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-init.html).
40+
If you are interested in learning more about initializing SAM projects, you can find the full reference for the `sam init` command in the [SAM CLI reference](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-init.html).

workshop/content/javascript/setup/_index.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ If you prefer to run the workshop from your local computer without using Cloud9,
3232
* [Git Client](https://git-scm.com/downloads) - To interact with the CodeCommit repository by pushing code changes.
3333
* [NodeJS and npm](https://www.npmjs.com/get-npm) - The sample app you will create is NodeJs-based.
3434

35-
Once you have installed all requirements, you can start the workshop here: [Start workshop](/sam.html).
35+
Once you have installed all requirements, you can start the workshop here: [Start workshop](/javascript/sam.html).

workshop/static/assets/resize.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,22 @@ then
3131
sudo growpart /dev/xvda 1
3232

3333
# Expand the size of the file system.
34-
sudo resize2fs /dev/xvda1
34+
if [ $(mount |grep xvda1 | cut -d " " -f 5) = "xfs" ]
35+
then
36+
sudo xfs_growfs /dev/xvda1
37+
else
38+
sudo resize2fs /dev/xvda1
39+
fi
3540

3641
else
3742
# Rewrite the partition table so that the partition takes up all the space that it can.
3843
sudo growpart /dev/nvme0n1 1
3944

4045
# Expand the size of the file system.
41-
sudo resize2fs /dev/nvme0n1p1
42-
fi
46+
if [ $(mount |grep nvme0n1 | cut -d " " -f 5) = "xfs" ]
47+
then
48+
sudo xfs_growfs /dev/nvme0n1p1
49+
else
50+
sudo resize2fs /dev/nvme0n1p1
51+
fi
52+
fi
36.9 KB
Loading
16.2 KB
Loading
-63 KB
Binary file not shown.

0 commit comments

Comments
 (0)