Skip to content

Commit

Permalink
Karpenter update tested and reduced to just focus on Karpenter throug…
Browse files Browse the repository at this point in the history
…h the cloudformation stack on event engine and regular accounts
  • Loading branch information
ruecarlo committed Sep 8, 2022
1 parent 4828171 commit c237751
Show file tree
Hide file tree
Showing 39 changed files with 82 additions and 443 deletions.
15 changes: 0 additions & 15 deletions content/karpenter/010_prerequisites/attach_workspaceiam.md

This file was deleted.

30 changes: 6 additions & 24 deletions content/karpenter/010_prerequisites/aws_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,20 @@ If you are at an AWS event, an AWS account was created for you to use throughout
You are now logged in to the AWS console in an account that was created for you, and will be available only throughout the workshop run time.

{{% notice info %}}
In the interest of time for shorter events we sometimes deploy the resources required as a prerequisite for you. If you were told so, please review the cloudformation outputs of the stack that was deployed by **expanding the instructions below**.
In the interest of time we have deployed everything required to run Karpenter for this workshop. All the pre-requisites and dependencies have been deployed. The resources deployed can befound in this CloudFormation Template (**[eks-spot-workshop-quickstarter-cnf.yml](https://raw.githubusercontent.com/awslabs/ec2-spot-workshops/master/content/using_ec2_spot_instances_with_eks/010_prerequisites/prerequisites.files/eks-spot-workshop-quickstart-cnf.yml)**). The template deploys resourcess such as (a) An [AWS Cloud9](https://console.aws.amazon.com/cloud9) workspace with all the dependencies and IAM privileges to run the workshop (b) An EKS Cluster with the name `eksworkshop-eksctl` and (c) a [EKS managed node group](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) with 2 on-demand instances.
{{% /notice %}}

{{%expand "Click to reveal detailed instructions" %}}
#### Getting access to Cloud9

#### What resources are already deployed {#resources_deployed}

We have deployed the below resources required to get started with the workshop using a CloudFormation Template (**[eks-spot-workshop-quickstarter-cnf.yml](https://raw.githubusercontent.com/awslabs/ec2-spot-workshops/master/content/using_ec2_spot_instances_with_eks/010_prerequisites/prerequisites.files/eks-spot-workshop-quickstart-cnf.yml)**), Please reference the below resources created by the stack.

+ An [AWS Cloud9](https://console.aws.amazon.com/cloud9) workspace with
- An IAM role created and attached to the workspace with Administrator access
- Kubernetes tools installed (kubectl, jq and envsubst)
- awscli upgraded to v2
- Created and imported a key pair to Amazon EC2
- [eksctl](https://eksctl.io/) installed, The official CLI for Amazon EKS

+ An EKS cluster with the name `eksworkshop-eksctl` and a [EKS managed node group](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) with 2 on-demand instances.


#### Use your resources

In this workshop, you'll need to reference the resources created by the CloudFormation stack that we setup for you.
In this workshop, you'll need to reference the resources created by the CloudFormation stack.

1. On the [AWS CloudFormation console](https://console.aws.amazon.com/cloudformation), select the stack name that starts with **mod-** in the list.

1. In the stack details pane, click the **Outputs** tab.
2. In the stack details pane, click the **Outputs** tab.

![cnf_output](/images/karpenter/prerequisites/cnf_output.png)

It is recommended that you keep this window open so you can easily refer to the outputs and resources throughout the workshop.
It is recommended that you keep this tab / window open so you can easily refer to the outputs and resources throughout the workshop.

{{% notice info %}}
you will notice additional Cloudformation stacks were also deployed which is the result of the stack that starts with **mod-**. One to deploy the Cloud9 Workspace and two other to create the EKS cluster and managed nodegroup.
Expand All @@ -78,9 +62,7 @@ aws sts get-caller-identity

{{% insert-md-from-file file="karpenter/010_prerequisites/at_an_aws_validaterole.md" %}}

Since we have already setup the prerequisites, **you can head straight to [Test the Cluster]({{< relref "/karpenter/020_eksctl/test.md" >}})**

{{% /expand%}}


You are now ready to **[Test the Cluster]({{< relref "/karpenter/test.md" >}})**

28 changes: 0 additions & 28 deletions content/karpenter/010_prerequisites/awscli.md

This file was deleted.

58 changes: 0 additions & 58 deletions content/karpenter/010_prerequisites/k8stools.md

This file was deleted.

55 changes: 53 additions & 2 deletions content/karpenter/010_prerequisites/self_paced.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ weight: 10
Only complete this section if you are running the workshop on your own. If you are at an AWS hosted event (such as re:Invent, Kubecon, Immersion Day, etc), go to [Start the workshop at an AWS event]({{< ref "/karpenter/010_prerequisites/aws_event.md" >}}).
{{% /notice %}}

### Running the workshop on your own
## Running the workshop on your own


### Creating an account to run the workshop

{{% notice warning %}}
Your account must have the ability to create new IAM roles and scope other IAM permissions.
Expand All @@ -33,5 +36,53 @@ as an IAM user with administrator access to the AWS account:
1. Take note of the login URL and save:
![Login URL](/images/karpenter/prerequisites/iam-4-save-url.png)

### Deploying CloudFormation

In the interest of time and to focus just on karpenter, we will install everything required to run this Karpenter workshop using cloudformation.

1. Download locally this cloudformation stack into a file (**[eks-spot-workshop-quickstarter-cnf.yml](https://raw.githubusercontent.com/awslabs/ec2-spot-workshops/master/content/using_ec2_spot_instances_with_eks/010_prerequisites/prerequisites.files/eks-spot-workshop-quickstart-cnf.yml)**).

1. Go into the CloudFormation console and select the creation of a new stack. Select **Template is ready**, and then **Upload a template file**, then select the file that you downloaded to your computer and click on **Next**

1. Fill in the **Stack Name** using 'karpenter-workshop', Leave all the settings in the parameters section with the default prarameters and click **Next**

1. In the Configure Stack options just scroll to the bottom of the page and click **Next**

1. Finally in the **Review karpenter-workshop** go to the bottom of the page and tick the `Capabilities` section *I acknowledge that AWS CloudFormation might create IAM resources.* then click **Create stack**

{{% notice warning %}}
The deployment of this stack may take up to 20minutes. You should wait until all the resources in the cloudformation stack have been completed before you start the rest of the workshop. The template deploys resourcess such as (a) An [AWS Cloud9](https://console.aws.amazon.com/cloud9) workspace with all the dependencies and IAM privileges to run the workshop (b) An EKS Cluster with the name `eksworkshop-eksctl` and (c) a [EKS managed node group](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) with 2 on-demand instances.
{{% /notice %}}

### Checking the completion of the stack deployment

One way to check your stack has been fully deployed is to check that all the cloudformation dependencies are green and succedded in the cloudformation dashboard; This should look similar to the state below.

![cnf_output](/images/karpenter/prerequisites/cfn_stak_completion.png)

#### Getting access to Cloud9

In this workshop, you'll need to reference the resources created by the CloudFormation stack.

1. On the [AWS CloudFormation console](https://console.aws.amazon.com/cloudformation), select the stack name that starts with **mod-** in the list.

2. In the stack details pane, click the **Outputs** tab.

![cnf_output](/images/karpenter/prerequisites/cnf_output.png)

It is recommended that you keep this tab / window open so you can easily refer to the outputs and resources throughout the workshop.

{{% notice info %}}
you will notice additional Cloudformation stacks were also deployed which is the result of the stack that starts with **mod-**. One to deploy the Cloud9 Workspace and two other to create the EKS cluster and managed nodegroup.
{{% /notice %}}

#### Launch your Cloud9 workspace

- Click on the url against `Cloud9IDE` from the outputs

{{% insert-md-from-file file="karpenter/010_prerequisites/workspace_at_launch.md" %}}

{{% insert-md-from-file file="karpenter/010_prerequisites/update_workspace_settings.md" %}}


Once you have completed the step above, **you can head straight to [Create a Workspace]({{< ref "/karpenter/010_prerequisites/workspace.md" >}})**
You are now ready to **[Test the Cluster]({{< relref "/karpenter/test.md" >}})**
25 changes: 0 additions & 25 deletions content/karpenter/010_prerequisites/sshkey.md

This file was deleted.

52 changes: 0 additions & 52 deletions content/karpenter/010_prerequisites/update_workspaceiam.md

This file was deleted.

43 changes: 0 additions & 43 deletions content/karpenter/010_prerequisites/workspace.md

This file was deleted.

13 changes: 0 additions & 13 deletions content/karpenter/020_eksctl/_index.md

This file was deleted.

Loading

0 comments on commit c237751

Please sign in to comment.