{"id":13858971,"url":"https://github.com/openfaas-incubator/workshop-vscode","last_synced_at":"2025-07-14T01:32:28.229Z","repository":{"id":53589064,"uuid":"195778227","full_name":"openfaas-incubator/workshop-vscode","owner":"openfaas-incubator","description":"Pre-installed Kubernetes Lab for your browser with VSCode","archived":false,"fork":false,"pushed_at":"2021-03-22T21:28:47.000Z","size":17,"stargazers_count":130,"open_issues_count":0,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-06T03:06:31.889Z","etag":null,"topics":["k3s","kubernetes","vm","vscode","workshop","workshop-automation"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfaas-incubator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-08T09:17:40.000Z","updated_at":"2024-04-14T14:33:45.000Z","dependencies_parsed_at":"2022-09-19T03:40:47.540Z","dependency_job_id":null,"html_url":"https://github.com/openfaas-incubator/workshop-vscode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfaas-incubator%2Fworkshop-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfaas-incubator%2Fworkshop-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfaas-incubator%2Fworkshop-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfaas-incubator%2Fworkshop-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfaas-incubator","download_url":"https://codeload.github.com/openfaas-incubator/workshop-vscode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225938734,"owners_count":17548543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["k3s","kubernetes","vm","vscode","workshop","workshop-automation"],"created_at":"2024-08-05T03:02:28.023Z","updated_at":"2024-11-22T17:30:34.093Z","avatar_url":"https://github.com/openfaas-incubator.png","language":"Shell","readme":"# workshop-vscode\n\nOpenFaaS Workshop with in-browser version of VSCode from [coder.com](https://coder.com)\n\nAll tools are pre-installed with OpenFaaS on Kubernetes with k3s available in the browser terminal.\n\n## How it works\n\n1) A Virtual Machine will be provisioned with a cloud hosting provider using cloudinit\n2) [Kubernetes](https://kubernetes.io/) with [k3s](https://k3s.io/) will be installed on the VM\n3) [OpenFaaS](https://www.openfaas.com/) will be installed into the k3s cluster\n4) A Docker image will be run which provides [VSCode](https://k3s.io/) via a web-browser\n5) The login password for VSCode will be obtained via `ssh`\n6) VSCode can now be used in web-browser via your VM's IP. The self-signed certificate will provide encryption and the login password will protect against tampering.\n\n## Why do we need this?\n\nThis project provides a pre-installed Kubernetes environment within a VM so that your students can focus on your workshop.\n\nThe example in this repository is for [The OpenFaaS Workshop](https://github.com/openfaas/workshop). It is estimated that it would save students 1.5-2 hours of set-up time. Instructors could also pre-provision a set amount of VMs ahead of time and then give out IP address and password combinations.\n\n## Quick-start\n\nYou can run the instructions above on any cloud that supports cloudinit, or if you have a VM platform that does not allow, or support cloudinit, you can simply run the contents of \"cloudinit.txt\" as root on the VM after it has booted up.\n\n### Provision on DigitalOcean\n\n* [Get 100 USD free credit for 60 days](https://m.do.co/c/8d4e75e9886f)\n* Create a DigitalOcean VM size 4GB RAM in your local region\n* Add \"user data\" from `cloudinit.txt`\n* Pick \"ssh\" login or via root password over email\n* Deploy the VM\n\nSkip to \"After the deployment\"\n\n### Provision on Civo\n\n* [Get 50 USD credits for new sign-ups](https://bit.ly/2Lx9d2o)\n* Create a Medium sized VM and get your login details\n* `cloudinit` is not available on Civo at this time, but you can log in after the VM is ready and run the script manually instead\n* Use `ssh` to connect to the instance, now paste in the content from `cloudinit.txt` into your terminal\n\nSkip to \"After the deployment\"\n\n### After the deployment\n\n* Locate the public IP given and navigate to `https://IP:8443` in a web-browser. This will open VSCode.\n* You will need to accept the self-signed certificate, which will display as \"insecure\". Despite the warning, it will provide encryption for your connection.\n* You may have to wait for several minutes before the endpoint to comes up. See the second on Debugging if you want to check the logs.\n* Open a Terminal within VSCode and run through the files in ~/project/openfaas/\n* Next start the workshop from [Lab 2](https://github.com/openfaas/workshop)\n\n## Get your password\n\nGet the container's logs with:\n\n```sh\nexport IP=\"\"\nssh root@$IP \"docker logs vscode | grep Password\"\n\nINFO  Password: 7d6ae6958e8d7e882ba08f57\n```\n\n\u003e Note: the password shown is an example, you will have your own password.\n\n## Debug / get the cloudinit logs\n\n* Log into instance `ssh root@IP`\n* View the logs for cloudinit\n\nEither run `/root/logs.sh` or `tail -f /var/log/cloud-init-output.log`\n\n## Automation\n\nSetup a VM using a script in the London region:\n\n```sh\n# ./provision-digitalocean.sh\n\nCreating: of-workshop-ebddfcaf\n==============================\nDroplet: of-workshop-ebddfcaf has been created\nIP: 178.128.42.184\nURL: https://178.128.42.184:8443\nLogin: ssh root@178.128.42.184\n==============================\nTo destroy this droplet run: doctl compute droplet delete -f 150218836\n\n```\n\nYou'll be emailed the root password, which you can use to log in and get the VSCode password.\n\n## Customize for your own workshops and training sessions\n\nThere are two parts you can customize:\n\n* The Docker image: `alexellis2/coder:2021-03-22`, which is built from [Dockerfile](./Dockerfile)\n\nThe Docker image provides the VSCode hosting _and_ the CLI tools within the built-in terminal. The Docker image is derrived from [coder.com](https://coder.com).\n\n* The [./cloudinit.txt](./cloudinit.txt) which configures the VM\n\nFor instance, if you wanted to run a workshop on *How to design helm charts* - you may comment out the references to OpenFaaS and install helm/tiller into the Docker image.\n\n\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfaas-incubator%2Fworkshop-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfaas-incubator%2Fworkshop-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfaas-incubator%2Fworkshop-vscode/lists"}