arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

operating

users.md

hashtag
Requirements

  • kubectl Installation Guidearrow-up-right

  • terraform

  • AWS Credentials to AWS Route53

    • Access Key

    • Secret Key

hashtag
Setup

First obtain the users repo from .

Setup .env file by filling in all required fields:

It's better to use an IAM user group to create a new user associated with the clouddesktop user group. It will generate a access and secret key for you to put in the above file. The ingress IP is the ip address of the main node. Once everything is properly setup, do:

Setup terraform:

hashtag
Common Operations

To under what each of these commands do under the hood, see .

hashtag
Add a new user

id is the ID of the new user.

hashtag
Delete a user

Warning: This will remove any persisted data!!

hashtag
Change resources allocation for user

For user example, modify the file example-clouddesktop/deployment.yaml.

hashtag
To increase minimum resource

For detailed explanation of what units you can change it to, see .

hashtag
To increase maximum resource limit

For detailed explanation of what units you can change it to, see .

hashtag
Add GPU support

Note: Beware if we have enough free GPUs in the cluster

Note: Make sure the docker image is a CUDA enabled variant (ie. tb3-ros:v2.1.1-cuda)

hashtag
Apply changes

Warning: This will restart the cloud desktop container!!

To apply the previously changed values,

hashtag
Restarting a Desktop

To restart a desktop, you need to delete and redeploy the desktop.

This will NOT lead to loss of data.

cluster.md

We administrate all our operations through the use of kubectl.

hashtag
Prerequisites

Read up on the following materials,

Setup Instructions
Installation Guidearrow-up-right
herearrow-up-right
here
herearrow-up-right
herearrow-up-right
K8s Conceptsarrow-up-right
  • kubectl cheatsheetarrow-up-right

  • hashtag
    Requirements

    • kubectl Installation Guidearrow-up-right

    hashtag
    Setup

    To access the K8s cluster, you will need to have a k3s.yaml credential file. It can be obtained by ssh into the master node of the cluster, under the directory /etc/rancher/k3s/k3s.yaml.

    Once you have obtained the k3s.yaml file, make the following modification,

    After the modification, this file is ready for use. Update your shell to always use this file,

    To confirm it working,

    hashtag
    Common Operations

    hashtag
    See all nodes in cluster

    hashtag
    See a specific node

    hashtag
    See all deployed pods

    • Notice that -n clouddesktop-prod refers to the clouddesktop-prod k8s namespace

    hashtag
    See a specific pod

    hashtag
    Draining a node

    mv .env.sample .env
    export $(make env)
    terraform init
    make add-user id=example
    make delete-user id=example
    resources:
      requests:  # increase minimum to at least 4 cores
    -   cpu: 2
    +   cpu: 4
        memory: 2Gi
    resources:
      limits: # increase to maximum 16GB of ram
        cpu: 8
    -   memory: 8Gi
    +   memory: 16Gi
    resources:
      limits: # increase to maximum 16GB of ram
        cpu: 8
        memory: 8Gi
    +   nvidia.com/gpu: 1
    kubectl apply -k example-clouddesktop
    kubectl delete -k example-clouddesktop
    
    kubectl apply -k example-clouddesktop
    # Update with the IP of the master node
    - server: https://localhost:6443
    + server: https://123.123.123.123:6443
    export KUBECONFIG=/.../k3s.yaml
    kubectl get pods --all-namespaces
    kubectl get nodes
    kubectl describe node robotics-rover1
    kubectl -n clouddesktop-prod get pods
    kubectl -n clouddesktop-prod describe pod julianho-clouddesktop-deployment-abc123efg-123abc
    kubectl drain robotics-rover2