Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5935af0
Content review and edits. Added Challenge Questions
oak2278 Nov 20, 2018
58c5c4f
added challenge question for user to retrieve the elb URL
vjsikha Nov 21, 2018
d5097ef
updated the shortcode to fix the launch button for codepipeline
vjsikha Nov 21, 2018
146c6be
Merge branch 'master' into 157-cicd-challenge-question
vjsikha Nov 21, 2018
d490e3a
Merge branch 'master' into 157-cicd-challenge-question
dalbhanj Nov 21, 2018
3c95cf4
Batch Processing (redux) (#133)
buzzsurfr Nov 20, 2018
6ea5e05
Link fixes (#135)
brentley Nov 20, 2018
3e05da7
Tracing with X-Ray module (#132)
rnzsgh Nov 20, 2018
bb010e6
Fix links (#137)
rnzsgh Nov 20, 2018
fcb3f6a
added documentation and examples to demo readiness and liveness probe…
vjsikha Nov 20, 2018
172990c
remove duplicate page (using.md/rolling_back.md) (#140)
brentley Nov 20, 2018
bf439eb
Dynamic Volume Provisioning hyperlink (#141)
nikipat Nov 20, 2018
b83312a
Update _index.md (#144)
oak2278 Nov 20, 2018
7d41d70
Challenge question and answer to Monitoring Chapter (#146)
dalbhanj Nov 20, 2018
781e875
Remove region (#148)
rnzsgh Nov 21, 2018
978bff1
adding a region selector (#154)
brentley Nov 21, 2018
6ded661
Added challenge question to installnginx.md (#145)
trevorrobertsjr Nov 21, 2018
e7b3820
Istiotweaks (#153)
geremyCohen Nov 21, 2018
c6bafee
fixing typo in health checks (#155)
dalbhanj Nov 21, 2018
08e73ea
update Batch cleanup.md (#142)
oak2278 Nov 21, 2018
d38a893
Simplify CFN stack creation (#156)
rnzsgh Nov 21, 2018
93d6ff4
Calico logo, note in StatefulSets -- Test scaling and Batch -- simple…
nikipat Nov 21, 2018
cfafc6d
added challenge question for user to retrieve the elb URL
vjsikha Nov 21, 2018
9ae013c
resolved conflicts after rebasing from master
vjsikha Nov 21, 2018
fda5fbb
added hint to challenge question
vjsikha Nov 21, 2018
6c38f5b
Content review and edits. Added Challenge Questions (#147)
oak2278 Nov 21, 2018
6326204
resolved conflicts
vjsikha Nov 21, 2018
88222ec
Merge branch 'master' into 157-cicd-challenge-question
brentley Nov 21, 2018
0c3bd33
readiness probe update
oak2278 Nov 21, 2018
df2666d
Merge branch '157-cicd-challenge-question' of https://github.com/vjsi…
oak2278 Nov 21, 2018
2962c37
fixed typo in role name. moved challenge question. cleaned up typos.
oak2278 Nov 21, 2018
d4aa988
Merge branch 'master' into vjsikha-157-cicd-challenge-question
brentley Nov 21, 2018
8091e1d
reverted cf-launch.html changes
vjsikha Nov 21, 2018
0e06942
reverted codepipeline.md changes for launch button
vjsikha Nov 21, 2018
a18fe8b
Merge branch 'master' into vjsikha-157-cicd-challenge-question
dalbhanj Nov 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions content/codepipeline/change.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ date: 2018-10-087T08:30:11-07:00
weight: 15
draft: false
---
#### Update Our Application

So far we have walked through setting up CI/CD for EKS using AWS CodePipeline and now we are going to
make a change to the GitHub repository so that we can see a new release built and delivered.
Expand All @@ -22,21 +23,11 @@ You should leave the master branch selected.
The main.go application needs to be compiled, so please ensure that you don't accidentally break the build :)
{{% /notice %}}


![GitHub Modify](/images/codepipeline/github_modify.png)

After you modify and commit your change in GitHub, in approximately one minute you will see a new build triggered in the [AWS Management Console](https://console.aws.amazon.com/codesuite/codepipeline/pipelines)
![CodePipeline Running](/images/codepipeline/codepipeline_building.png)

![CodePiepline Running](/images/codepipeline/codepipeline_building.png)

Once the service is built and delivered, run the following command to get the Elastic Load Balancer (ELB) endpoint and open it in a browser.
If the message is not updated immediately, give Kubernetes some time to deploy the change.

```
kubectl get services hello-k8s -o wide
```

{{% notice info %}}
The EXTERNAL-IP column contains a value that ends with "elb.amazonaws.com" - the full value is the DNS record.
{{% /notice %}}
#### Confirm the Change

If you still have the ELB URL open in your browser, refresh to confirm the update. If you need to retrieve the URL again, use `kubectl get services hello-k8s -o wide`
10 changes: 5 additions & 5 deletions content/codepipeline/cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight: 16
draft: false
---

Congratulations on completing the CI/CD with CodePipline module.
Congratulations on completing the CI/CD with CodePipeline module.

This module is not used in subsequent steps, so you can remove the resources now, or at the end of the workshop.

Expand All @@ -17,13 +17,13 @@ kubectl delete deployments hello-k8s
kubectl delete services hello-k8s
```

Next, we are going to delete the CloudFormation stack created. Open CloudFormation the [AWS Managemnt Console](https://console.aws.amazon.com/cloudformation).
Next, we are going to delete the CloudFormation stack created. Open CloudFormation the [AWS Management Console](https://console.aws.amazon.com/cloudformation).

Check the box next to the **eksws-codepipeline** stack, select the **Actions** dropdown menu and then click **Delete stack**:

![CloudFormation Delete](/images/codepipeline/cloudformation_delete.png)

Now we are going to delete the [ECR respository](https://console.aws.amazon.com/ecs/home#/repositories):
Now we are going to delete the [ECR repository](https://console.aws.amazon.com/ecs/home#/repositories):

![ECR Delete](/images/codepipeline/ecr_delete.png)

Expand All @@ -35,7 +35,7 @@ select the bucket, then empty the bucket and finally delete the bucket:
Finally, we are going to delete the IAM role created for CodeBuild to permit changes to the EKS cluster:

```
aws iam delete-role-policy --role-name EksWorkshopCodeBuilKubectldRole --policy-name eks-describe
aws iam delete-role-policy --role-name EksWorkshopCodeBuildKubectlRole --policy-name eks-describe

aws iam delete-role --role-name EksWorkshopCodeBuilKubectldRole
aws iam delete-role --role-name EksWorkshopCodeBuildKubectlRole
```
20 changes: 13 additions & 7 deletions content/codepipeline/codepipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,23 @@ For the status of the service, run the following command:
kubectl describe service hello-k8s
```

Once the service is built and delivered, run the following command to get the Elastic Load Balancer (ELB) endpoint and open it in a browser.
#### Challenge:
**How can we view our exposed service?**

```
kubectl get services hello-k8s -o wide
```
**HINT:** Which kubectl command will get you the Elastic Load Balancer (ELB) endpoint for this app?

{{%expand "Expand here to see the solution" %}}

Once the service is built and delivered, we can run the following command to get the Elastic Load Balancer (ELB) endpoint and open it in a browser.
If the message is not updated immediately, give Kubernetes some time to deploy the change.

```
kubectl get services hello-k8s -o wide
```

{{% notice info %}}
This service was configured with a [LoadBalancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/) so,
an [AWS Elastic Load Balancer](https://aws.amazon.com/elasticloadbalancing/) is launched by Kubernetes for the service.
The EXTERNAL-IP column contains a value that ends with "elb.amazonaws.com" - the full value is the DNS address.
{{% /notice %}}



{{% /expand %}}
2 changes: 1 addition & 1 deletion content/codepipeline/configmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Once the ConfigMap includes this new role, kubectl in the CodeBuild stage of the
```
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)

ROLE=" - rolearn: arn:aws:iam::$ACCOUNT_ID:role/EksWorkshopCodeBuilKubectldRole\n username: build\n groups:\n - system:masters"
ROLE=" - rolearn: arn:aws:iam::$ACCOUNT_ID:role/EksWorkshopCodeBuildKubectlRole\n username: build\n groups:\n - system:masters"

kubectl get -n kube-system configmap/aws-auth -o yaml | awk "/mapRoles: \|/{print;print \"$ROLE\";next}1" > /tmp/aws-auth-patch.yml

Expand Down
4 changes: 2 additions & 2 deletions content/codepipeline/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TRUST="{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Effect\": \"Allow\",

echo '{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "eks:Describe*", "Resource": "*" } ] }' > /tmp/iam-role-policy

aws iam create-role --role-name EksWorkshopCodeBuilKubectldRole --assume-role-policy-document "$TRUST" --output text --query 'Role.Arn'
aws iam create-role --role-name EksWorkshopCodeBuildKubectlRole --assume-role-policy-document "$TRUST" --output text --query 'Role.Arn'

aws iam put-role-policy --role-name EksWorkshopCodeBuilKubectldRole --policy-name eks-describe --policy-document file:///tmp/iam-role-policy
aws iam put-role-policy --role-name EksWorkshopCodeBuildKubectlRole --policy-name eks-describe --policy-document file:///tmp/iam-role-policy
```
2 changes: 1 addition & 1 deletion layouts/shortcodes/cf-launch.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a
href="https://console.aws.amazon.com/cloudformation/home?#/stacks/quickcreate?stackName={{ .Get 1 }}&templateURL=https://s3.amazonaws.com/{{ $.Site.Params.template_bucket }}/templates/{{ $.Site.Params.branch }}/{{ .Get 0 }}"
href="https://console.aws.amazon.com/cloudformation/home?#/stacks/quickcreate?stackName={{ .Get 1 }}&templateURL=https://s3.amazonaws.com/{{ $.Site.Params.template_bucket }}/templates/{{ $.Site.Params.branch }}/{{ .Get 0 }}"
target="_blank" class="btn btn-default">
<i class="fas fa-cloud-upload-alt"></i>
Launch
Expand Down