Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

A feature to launch kubernetes cluster from Codespace.

GitHub Codespaces overview

A codespace is a development environment that's hosted in the cloud. You can customize your project for GitHub Codespaces by committing configuration files to your repository (often known as Configuration-as-Code), which creates a repeatable codespace configuration for all users of your project.

Each codespace runs on a virtual machine hosted by GitHub. You can choose the type of machine you want to use, depending on the resources you need. Various types of machine are available, starting with a 2-core processor, 4 GB of RAM, and 32 GB of storage.

You can connect to your codespaces from your browser, from Visual Studio Code, from the JetBrains Gateway application, or by using GitHub CLI.


To create cluster using codespace, follow the below steps :

  • Create a folder named .devcontainer at the root of the repository.

  • Create a new file named devcontainer.json inside .devcontainer, and add the below code snippets with the appropriate options.

Example Usage

"features": {
    "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {},
    "ghcr.io/zb-io/roost-codespace/roostcontroller:1.0.0": {
      "k8s_version": "1.22.2",
      "vendor": "aws",
      "aws_region": "ap-northeast-1",
      ...
    }
}

Options

Options Id

Description

Type

Default Value

Required / optional

aws_access_key_id

Aws access key ID

string

-

Required

aws_secret_access_key

Aws secret access key

string

-

Required

user_email

User email address

string

-

Required

username

User name

string

-

Required

roost_auth_token

Roost Authorization Token

string

7234741d-c3ba-4de9-bfc0-07b7e73e1545

optional

vendor

Cloud vendor

string

aws

optional

k8s_version

Kubernetes version

string

1.22.2

optional

cluster_expiration

Cluster expiry in Hrs

string

1

optional

num_workers

Number of worker nodes

string

1

optional

default_namespace

Default namespace

string

roost-codesapace

optional

aws_region

Aws region, to create cluster into

string

ap-northeast-1

optional

disk_size

Disk size in GB

string

30GB

optional

instance_type

Instance type

string

t3.small

optional

ami

AMI

string

ubuntu focal 20.04

optional

ent_server

Enterprise server IP

string

app.roost.ai

optional

  • Once the configuration files are added with above options, creating codespace will also create the cluster.

To stop and delete the cluster using codespace type the below commands in the terminal.

$ roost stop           // Stop the running cluster
$ roost delete         // Delete the cluster that is either in stop or running state

  • No labels