Giter Site home page Giter Site logo

prabhatsharma / eks-kubeflow-cloudformation-quick-start Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/aws-deeplearning-labs

0.0 2.0 0.0 1.63 MB

CloudFormation to setup Kubeflow and Sagemaker Operators on EKS

License: MIT No Attribution

Shell 100.00%

eks-kubeflow-cloudformation-quick-start's Introduction

eks-kubeflow-cloudformation-quick-start

Why?

For people who wish to start using KubeFlow and Sagemaker operators for Kubernetes without spending any time on installation of underlying infrastructure and tools can use the CloudFormation in this git repo.

The scripts in this git repo are referenced from https://eksworkshop.com/ and https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_operators_for_kubernetes.html. Please check these links if you wish to see step by step process.

Steps#

  1. Clone the git repo locally on your workstation and execute the Cloudformation template (we assume that you have already setup awscli)

aws cloudformation create-stack --stack-name myteststack --template-body file://cfv1.json --capabilities CAPABILITY_IAM

ScreenShot1

You can also run the Cloudformation from AWS Console.

  1. The Cloudformation will run for about 20-25 minutes and will setup a) A Linux Jump Box with eksctl and kubectl b) EKS, KubeFlow and Sagemaker operators for k8s. c) install Cloud9 components

You can watch the installation process by logging into the Linux Jump Server (using EC2 instance connect) and tailing the log file at /var/log/cloud-init-output.log.

Go to Cloudformation service in AWS Console and check the stack which you just created-

Image2

Go to resources tab in the CF-

Image3

Select the WebServerInstance to go to the Linux Jump Box in EC2 console.

Image4

Hit Connect with EC2 Instance Connect. This will open SSH shell in browser. If you are not able to open EC2 instance connect for some reason you can also choose Session Manager. We are showing screenshots from EC2 instance connect.

Image5

Once connected to the Jump Box you can watch the installation of EKS, KubeFlow, Sagemaker operators and Cloud9 at /var/log/cloud-init-output.log

tail-cloud-init

Wait for the installation to complete (should take approx 20-25 minutes). You will see below message at the end of bootstrapping.

Cloud-Init-Finish

  1. Connect to the Linux Jump Box from Cloud9 for accessing Kubeflow dashboard.

Open Cloud9 Console and create a new environment.

Create-Cloud-9

Give Name and Description-

Cloud9-Screenshot2

In next screen choose, "Connect and run in remote server" and Enter Public DNS of the Linux Jump Server and Port as 22.

Cloud9-Screenshot3

Before moving to next screen, we need to copy the Cloud9 public SSH key into our Linux jump server. Click on "Copy Key to Clipboard" and go SSH console of Linux Jump Server and update the file at /home/ec2-user/.ssh/authorized_keys.

LinuxServer1

LinuxServer2

LinuxServer3

Once the SSH key is copied to authorized_keys file, go back to the Cloud9 screen and complete creating the environment.

You should see Cloud9 console in a few moments.

Cloud9-1

From Cloud9 console, we can run eksctl and kubectl commands and also open Kubeflow dashboard.

Cloud9-2

Cloud9-3

Cloud9-4

Cloud9-5

On Cloud9, open a new terminal and run command-

kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80

Keep this command running and continue your work in other tabs/terminal within Cloud9

Cloud9-6

You can open KubeFlow dashboard by selecting Preview --> Preview running applications.

Cloud9-7

Cloud9-8

Cloud9-9

Cloud9-10

Deletion/Roll-Back steps-

  1. eksctl delete cluster
  2. Delete IAM OIDC
  3. Delete IAM Roles.
  4. Delete/Disable the AWS KMS Custom Key (optional)
  5. Delete the Cloudformation templates . There will be total three templates ( 2 from eksctl and 1 which you created at the beginning of the lab).

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

eks-kubeflow-cloudformation-quick-start's People

Contributors

kalawat avatar amazon-auto avatar prabhatsharma avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.