Code Monkey home page Code Monkey logo

kubeflow-aws-appliance's Introduction

Steps to test the CloudFormation template

  1. Login to your aws console with admin priviledges account
  2. Set the region to us-east-1 go to CloudFormation service
  3. Choose the option to create stack (choose sub-option with new resources)
  4. In the Create stack page
    1. Choose Template is ready and Upload teamplate file options
    2. Navigate to cf_kubeflow_single_instance.yaml and submit.
  5. Next in Specify stack details page
    1. choose a name for your stack e.g kubeflow
    2. choose key-pair from dropdown to allow SSH (key must be created before template. You can create one in EC2 service > key pairs > create)
    3. Fill the KubeflowDashboardPassword field
  6. Next in Configure stack options you don't need to configure something
  7. Make sure all your settings are correct in the last page and deploy the stack
  8. Wait until the stack is in CREATE_COMPLETE state

To Understand other parameters of template please refer to technical documentation

Stack will create one EC2 instance with public vpc subnet and almost empty security group (per AWS appliance quidelines SSH access should be denied by default). To allow the ssh access to the instance go to EC2 service click on the instance (choose the one with the tag aws:cloudformation:stack-name: <name you speciffied>) click on the Security tab click on the security group. In the Inbounds rules tab click on Edit inbound rules add new rule for SSH (you can type ssh in the dropdown and choose CIDR 0.0.0.0/0 for every IP, or you can be specific with your IP).

SSH to the instance with provided keypair (make sure to proxy ports). You can get the ip in the EC2 service instances tab, by clicking on desired instance

$ ssh -i <key-pair>.pem -D 9999 ubuntu@<ec2-ip> 

Now you need to wait until the kubeflow is installed (approx. 40 mins). You can always check the progress of the script with

tail -f /var/log/cloud-init-output.log 

or you can check juju components at (following command will autorefresh every 5s).

juju status --watch 5s

After the juju components are in Active state, setup your browser Proxy (Firefox: Settings > Network Settings > Socks proxy set to 127.0.0.1 and port 9999, or the one you tunnel). Now you can wisit http://10.64.140.43.nip.io and use the default credentials ([email protected]/user123).

Further example testing

If you want to make sure that all the components of the Kubeflow are ready, you can try to run these examples. Tu run the exaples you can Login to Dashboard -> go to notebooks tab -> create notebook server (with at least 8GB RAM) and then you can clone the repository directly to your notebook.

Cost estimates

The only charged aws resource within the template is the ec2 instance t2.2xlarge with gp2 volume of size 100GB. You can find the cost caluculation at this link

Architecture

You can find the archytectural diagram for the template in the file template1-designer.png.

kubeflow-aws-appliance's People

Contributors

colmbhandal avatar kimwnasptd avatar misohu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubeflow-aws-appliance's Issues

Region Independence

Enable this stack to be created in any region, not just US-EAST-1. AWS users will likely want to create stacks in a region of their choice.

Implement a way to have a static IP address for the deployment

Why it needs to get done

We need to access the Kubeflow dashboard from outside of EC2 instance even when the instance is restarted or the IP is changed. We also want to access the dashboard without changing the security group after we deploy cloud formation template. One way is to create Elastic IP and associate it with the EC2 instance https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html

What needs to get done

With cloud formation:

  • create elastic ip address
  • associate the ip with the ec2 instance
  • make sure we can access the dashboard

When is the task considered done

After deployment of the appliance we can access the dashboard on IP addresss without the need to change the security group or the need of SOCKS proxy.

Integrate taskcat into CI

Amazon manages a tool called taskcat which tests cloudformation templates. This should be integrated into github actions as a way to validate the latest CFT prior to requesting marketplace entry updates.

Enable the NVIDIA GPU operator for the Appliance

Right now the NVIDIA GPU Operator is not enabled in MicroK8s. This means the K8s will not utilise a GPU even if one is present on the machine.

Let's aim to either

  • Provide users a way to toggle the NVIDIA Operator
  • Have it on all the time, if it can work even if no GPU is currently available

The goal is for users to be able to use the appliance with a GPU

Appliance proxy removal Spec

Why it needs to get done

We need a spec with details on how to remove socks proxy from appliance setup.

What needs to get done

Write a spec explaining how to connect to kubeflow in EC2 instance microk8s without the need of SOCKs proxy. MOre details:

  • Research how to maintain a static IP address for the deployment (load balancer?)
  • Research how the public-url will behave with non-metallb IP address
  • Research whether the loadbalancer service in microk8s can be set to AWS loadbalancer instead of metallb

When is the task considered done

Spec is written.

Juju 3.0: cannot load ssh client keys: mkdir /home/ubuntu/.local: permission denied

Same issue as reported on Launchpad. The CloudFormation template does not pin Juju version. So now it is getting Juju 3.x. All Juju commands fail with this error:

ERROR cannot load ssh client keys: mkdir /home/ubuntu/.local: permission denied

Workaround is to create this directory:

mkdir -p ~/.local/share

However, by the time the directory is created, Juju is working, but the CloudFormation script has failed to launch Kubeflow.

Juju version at the time of writing this bug:

juju version
3.1.5-genericlinux-amd64

Proposed fix: pin Juju to 2.9 - presumably this was the intended version for the CloudFormation template when it was created.

Expose Istio Ingressgateway service with ingress object

Why it needs to get done

We need to access the Istio Ingressgateway service on ip:port of the ec2 instance so we don't need to use SOCKs proxy.

What needs to get done

NOTE: in this case we need to enable port 80 in security group so we can access it on EC2.

When is the task considered done

User can access the dashboard on http://{ec2-intance-ip}:80

Enable Multiple Stack Creation by Stack Name Only

Today, if you want to create 2 stacks simultaneously using this template, the first succeeds but the second one fails because resource names are not unique. Resource name uniqueness uses the stack name and the AppName.

Proposed fix: use only the stack name for resource uniqueness, so that if someone creates two different stacks with two different names, then they will both succeed in their creation.

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.