diff --git a/content/codepipeline/change.md b/content/codepipeline/change.md index cbecb134f..989b15ff7 100644 --- a/content/codepipeline/change.md +++ b/content/codepipeline/change.md @@ -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. @@ -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` diff --git a/content/codepipeline/cleanup.md b/content/codepipeline/cleanup.md index 30b35fcf3..e99904e7f 100644 --- a/content/codepipeline/cleanup.md +++ b/content/codepipeline/cleanup.md @@ -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. @@ -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) @@ -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 ``` diff --git a/content/codepipeline/codepipeline.md b/content/codepipeline/codepipeline.md index 1f0aeed88..ceb14bc62 100644 --- a/content/codepipeline/codepipeline.md +++ b/content/codepipeline/codepipeline.md @@ -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 %}} diff --git a/content/codepipeline/configmap.md b/content/codepipeline/configmap.md index 6a79e759c..9ef8b5387 100644 --- a/content/codepipeline/configmap.md +++ b/content/codepipeline/configmap.md @@ -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 diff --git a/content/codepipeline/role.md b/content/codepipeline/role.md index ccde266c7..2a0e85466 100644 --- a/content/codepipeline/role.md +++ b/content/codepipeline/role.md @@ -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 ``` diff --git a/layouts/shortcodes/cf-launch.html b/layouts/shortcodes/cf-launch.html index 37a328864..64d7dedb2 100644 --- a/layouts/shortcodes/cf-launch.html +++ b/layouts/shortcodes/cf-launch.html @@ -1,5 +1,5 @@ Launch