-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spin up AWS Kubernetes cluster for workshop #1
Comments
We will have AWS credits for the workshop but in the near term, I am using my own AWS account for testing. |
(Following the style of ESIPFed/esiphub-dev#26 (comment) here) https://zero-to-jupyterhub.readthedocs.io/en/latest/amazon/step-zero-aws-eks.html
I created an IAM Role (not a user) associated with EKS. I expect that soon AWS will automatically create a service-linked role for me, but for now I created a role called eksServiceRole. I added the AmazonEC2ContainerRegistryReadOnly policy after the role was created.
I followed the defaults given at https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html Called my VPC eks-vpc. After the VPC has been created the VpcID, SecurityGroups and the SubnetIds are available in the output tab.
I created a Kubernetes cluster PangeoC3DISKubernetesCluster. The default version of kubernetes on EKS with 1.11 so let's use that. The VPC, Subnets, and SecuritysGroups all have the root name eks-vpc in them so they were easy to identify. I left the public access API enabled and all of the logging disabled for now.
Instructions for installing kubectl were found at Instructions for installing aws-iam-authenticator were found at I also installed the AWS CLI tools at this point: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
To set up a
It took a couple of attempts to get the permissions sorted out. I initially tried to create a new IAM user and attached the AdministratorAccess policy to try and give access to everything. Then I found out that to access the new Kubernetes cluster, it has to be by the same role that created it. (Something about Kubernetes RBAC). There appeared to be ways of
At this point I am recognizing that AWS EKS still requires a fair amount of significant manual set up. I think this is good for me to go through to understand the nuts and bolts but I am tempted to use eksctl the next time through which may automate much of this for me. For creating the work-nodes, I followed the instructions here: https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html . Important to note that these seem to only be pangeo-worker-nodes Min Nodes 1, Default Nodes 2, Max Nodes 5, Choose AMI for us-west-1, used m5.large instances.
The NodeInstanceRole was available in the Output tab for the worker nodes stack. It only took about 1 minute for two nodes to be READY.
Created the new RBAC role as suggested:
The ZTJH instructions reference "Cluster Autoscaler See https://eksworkshop.com/scaling/deploy_ca/" which is something to check up on later. That completes the instructions for setting up a K8 cluster. Now for
Following the instructions at https://zero-to-jupyterhub.readthedocs.io/en/latest/setup-helm.html I installed helm on my new K8 cluster. Other than remembering to wait a minute for tiller to run on the cluster, helm looks like it installed just fine.
And quickly just going through https://zero-to-jupyterhub.readthedocs.io/en/latest/setup-jupyterhub.html results in JupyterHub being up and running. I've now shut down this node group and the EKS cluster. Some AWS credits have been made available on a CSIRO linked account. I'll try this again, but this time with |
I use MacOS locally, so Homebrew seems the easiest way to get the required CLI tools installed:
I already have an IAM user set up with an access key. Since we are setting up the cluster for an audience in Australia, it makes sense to me to use the region
Creating a K8 cluster requires setting up EKS, VPC, SecurityGroups, IAM roles, and NodeGroup. The claim is that
Took a few minutes, but it definitely appears we have a K8 cluster up and running. Now we set up helm on this new cluster.
Check that helm is up and running
Add pangeo helm repositories
Create
Find out the external IP for the public-proxy
Add the lines
to config.yaml. Then upgrade helm
Finally, get the IP to get to binderhub:
helm install pangeo/pangeo --devel
|
This is taken several kicks at the can but I now have BinderHub up and running on AWS. I could not manage to get AWS ECR working, so I am using DockerHub instead. I also don't have any autoscaling going on so my plan is to scale this cluster up for the training and bring it back down manually afterwards. The only remaining issue is to figure out how to do ingress properly with an Nginx server. Right now, the binderhub URL needs to be retrieved with
I should create DNS record that is not going to change and set up something that points to the ephemeral IP that AWS is assigning to me. |
Follow the installation instructions from ZeroToJupyterHub:
https://zero-to-jupyterhub.readthedocs.io/en/latest/amazon/step-zero-aws-eks.html
and Pangeo:
https://pangeo.io/setup_guides/cloud.html
Related issues with good suggestions/advice:
The text was updated successfully, but these errors were encountered: