Version ≥ 1.19
COSMO is targeting to run on any Kubernetes distribution.
COSMO uses Traefik Ingress Controller and Host-header routing for each Workspaces.
Configure a wildcard-host domain record like *.YOUR_DOMAIN.com
in your name server targeting to your Load Balancer for Traefik Proxy.
For example in Amazon EKS using AWS Load Balancer Controller and Route53 for a name server
To persist workspace data, each workspace templates should include a Persistent Volume Claim.
You need to configure Dynamic Provisioning in Kubernetes, which does not require a Persistent Volume manually created by administrator.
-
On-prem or self-installed cluster
See Storage Class or install storage extentions suporting Dynamic Provisioning such as Longhorn or OpenEBS.
-
Cloud providers's cluster
See the official docs. Almost all cloud providers supports their own storage driver.
For example:
Confirm followings before installation.
- kubectl and helm is installed in PATH.
- kubectl current context to the cluster where you install COSMO.
2-1. Install cert-manager
COSMO requires a lot of TLS certificates.
The easiest way to prepare certificates is to use cert-manager
(>=v1.0.0)
See the offical install docs https://cert-manager.io/docs/installation/
kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml
Add helm repo
helm repo add cosmo https://cosmo-workspace.github.io/charts
Install cosmo
WORKSPACE_DOMAIN=YOUR_DOMAIN.com
# When you configured TLS cert '*.YOURDOMAIN.com' for traefik
helm upgrade --install -n cosmo-system --create-namespace cosmo-controller-manager cosmo/cosmo-controller-manager \
--set domain=$WORKSPACE_DOMAIN
# When you did't configured TLS cert '*.YOURDOMAIN.com' for traefik
helm upgrade --install -n cosmo-system --create-namespace cosmo-controller-manager cosmo/cosmo-controller-manager \
--set domain=$WORKSPACE_DOMAIN \
--set protocol=http
Output:
### Example Output
Release "cosmo" does not exist. Installing it now.
NAME: cosmo
LAST DEPLOYED: Tue Jul 18 02:37:15 2023
NAMESPACE: cosmo-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
COSMO is installed!
* Your Environment Infomation
+-----------------------+------------------------------------------------------------
| DOMAIN | *.YOUR_DOMAIN.com
| DASHBOARD_URL | https://dashboard.YOUR_DOMAIN.com/#/signin
| WORKSPACE_URLBase | https://{{NETRULE}}-{{WORKSPACE}}-{{USER}}.YOUR_DOMAIN.com
+-----------------------+------------------------------------------------------------
Now access COSMO Dashboard URL you configured from your browser.
💡 See charts repository for more information on helm installation options.
Download binary from latest release and extract it into PATH.
Use cosmoctl to create first User.
cosmoctl user create admin --privileged
Output:
### Example Output
Successfully created user admin
Default password: DEFAULT_PASSWORD
Access the dashboard with a browser and login as admin with the output password.
Now you are ready to use COSMO 🚀
However there is still NO Template. Create example Templates.
kubectl create -f https://raw.githubusercontent.com/cosmo-workspace/cosmo/main/example/workspaces/code-server.yaml
Now you are ready to use Template code-server-example
🙌
From browser, create a example workspace with created Template.
get-start-demo1.mp4
Uninstall COSMO.
helm uninstall -n cosmo-system cosmo
Uninstall COSMO CRD.
This will remove all Workspaces and Templates.
kubectl delete -k https://github.com/cosmo-workspace/cosmo/config/crd/