{"id":18837337,"url":"https://github.com/clarenceb/devspaces-demo","last_synced_at":"2025-08-26T06:36:31.016Z","repository":{"id":142072055,"uuid":"255459134","full_name":"clarenceb/devspaces-demo","owner":"clarenceb","description":"Azure Dev Spaces Demo","archived":false,"fork":false,"pushed_at":"2020-04-21T00:51:42.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-29T19:40:21.938Z","etag":null,"topics":["aks","azure","demo","devspaces"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clarenceb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-13T22:57:00.000Z","updated_at":"2020-04-21T00:51:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c21bd25-a711-4b07-bf2a-21a18c0c20e9","html_url":"https://github.com/clarenceb/devspaces-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clarenceb/devspaces-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarenceb%2Fdevspaces-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarenceb%2Fdevspaces-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarenceb%2Fdevspaces-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarenceb%2Fdevspaces-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clarenceb","download_url":"https://codeload.github.com/clarenceb/devspaces-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarenceb%2Fdevspaces-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272186211,"owners_count":24888333,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aks","azure","demo","devspaces"],"created_at":"2024-11-08T02:34:48.680Z","updated_at":"2025-08-26T06:36:30.994Z","avatar_url":"https://github.com/clarenceb.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Azure Dev Spaces - Demo Script\n==============================\n\nCreate an AKS cluster to test out Azure Dev Spaces:\n\n```sh\naz group create --name devspaces --location australiaeast\naz aks create -g devspaces -n devspaces --location australiaeast --generate-ssh-keys\n```\n\nRegister for Helm 3 preview (unless it has since gone GA) for Dev Spaces: https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/helm-3\n\nInstall Dev Spaces in your cluster:\n\n```sh\naz aks use-dev-spaces -g devspaces -n devspaces --space dev --yes\nazds show-context\nazds space list\n```\n\nClone Azure Dev Spaces Samples repository\n-----------------------------------------\n\n```sh\ngit clone https://github.com/Azure/dev-spaces\ncd dev-spaces\n```\n\nDemo 1 - Team development on AKS\n--------------------------------\n\n* Deploy bikesharingapp to `dev` namespace\n\n```sh\ncd samples/BikeSharingApp/\nazds show-context\n# Edit samples/BikeSharingApp/charts/values.yaml and replace placeholder with HostSuffix\ncd charts/\nhelm install bikesharingsampleappsampleapp . --dependency-update --namespace dev --atomic\n```\n\n* Create child dev spaces\n\n```sh\nazds space select -n dev/azureuser1 -y\nazds space select -n dev/azureuser2 -y\nazds space list\n```\n\n* Change into a service directory and make code changes\n\n```sh\nvim samples/BikeSharingApp/BikeSharingWeb/components/Header.js\n```\n\n* Deploy private changes to AKS\n\n```sh\nazds space select -n dev/azureuser2\ncd ../BikeSharingWeb/\nazds up\n# CTRL+C to stop streaming logs\n```\n\n* View the modified web app in yor local dev space:\n\nhttp://azureuser2.s.dev.bikesharingweb.XXXXXX.XXXXX.azds.io/\n\n* Verify existing web app in `dev` dev space is unchanged:\n\nhttp://dev.bikesharingweb.XXXXXX.XXXXX.azds.io/\n\n* Cleanup\n\n```sh\nazds down # cleanup child dev space\n```\n\nDemo 2 - Single nodeJS service\n------------------------------\n\n```sh\nazds space select -n dev/azureuser2 -y\n```\n\n```sh\ncd samples/nodejs/getting-started/webfrontend\ncode .\n```\n\nOpen Command Palette (CTRL+SHIFT+P):\n\n* Select `Azure Dev Spaces: Prepare configuration files for Azure Dev Spaces`\n* Choose `Yes` for public endpoint\n\nDebug app:\n\n* Debug with configuration - Launch Server (AZDS)\n* Examine generated files (Helm, Dockerfile, azds.yaml)\n* Access website URL\n\nUpdate code - `server.js`, line 13:\n\n* Stop Debugging\n* `res.send('Hello from webfrontend in Azure');`\n* Launch Server (AZDS)\n* Test changed in app\n* NOTE: Can also Restart Debugging (CTRL+SHIFT+F5) without stopping and relaunching server\n\nSet breakpoint:\n\n* Toggle breakpoint (F9)\n* Test app, see breakpoint hit\n* Examine vars, callstack\n* Toggle breakpoint (F9)\n* Continue debugging (F5)\n\nLive reload:\n\n* Stopping Debugging\n* Debug with configuration - Attach to a Server (AZDS)\n* Edit code, save file\n* See changes in browser\n\nCleanup:\n\n```sh\n# cd dev-spaces/samples/nodejs/getting-started/webfrontend\nazds down\nrm .dockerignore azds.yaml Dockerfile\nrm -rf charts\n```\n\nDemo 3 - Multiple dependent services\n------------------------------------\n\n```sh\nazds space select -n dev/azureuser2 -y\n```\n\nOpen follow two projects in VSCode windows:\n\n* `samples/nodejs/getting-started/mywebapi`\n* `samples/nodejs/getting-started/webfrontend`\n\nIn `webapi` vscode:\n\n* Select from Command Palette: `Azure Dev Spaces: Prepare configuration files for Azure Dev Spaces`\n* Set a breakpoint in the GET / handler\n* Debug with F5 - Launch Server (AZDS)\n\nIn `webfrontend` vscode:\n\n* Comment/uncomment sections of code in `server.js`\n* Uncomment `var request = require('request');`\n* Comment the existing code line: `app.get('/api', ...`\n* Uncomment the follow code snippet:\n\n```js\napp.get('/api', function (req, res) {\n   request({\n      uri: 'http://mywebapi',\n      headers: {\n         /* propagate the dev space routing header */\n         'azds-route-as': req.headers['azds-route-as']\n      }\n   }, function (error, response, body) {\n       res.send('Hello from webfrontend and ' + body);\n   });\n});\n```\n\nHere we are propagating the `azds-route-as` HTTP header so that we can route to another service running in our child space.\n\n* Set breakpoint in the GET / handler callback\n* Debug with F5 - Launch Server (AZDS)\n\nStop debugging both apps.\n\nCleanup:\n\n* Run `azds down` in both app directories (if required).\n* In `dev-spaces/samples/nodejs/getting-started/webfrontend`, run:\n\n```sh\nrm .dockerignore azds.yaml Dockerfile\nrm -rf charts\n```\n\nCommands\n--------\n\n* `azds show-context`\n* `azds list-uris`\n* `azds list-uris --all`\n* `azds space list`\n* `azds space select -n \u003cspace_name\u003e -y`\n* `azds list-up`\n* `azds controller list`\n\nUpgrading CLI\n-------------\n\nUpgrade `azds` on Linux:\n\n```sh\ncurl -L https://aka.ms/get-azds-linux | bash\n```\n\nReferences / Credits\n--------------------\n\n* [Official Azure Dev Spaces docs](https://docs.microsoft.com/en-us/azure/dev-spaces/about) - most of this demo is based on the official Azure Dev Spaces docs\n* [How Routing Works with Azure Dev Spaces](https://docs.microsoft.com/en-us/azure/dev-spaces/how-dev-spaces-works-routing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarenceb%2Fdevspaces-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclarenceb%2Fdevspaces-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarenceb%2Fdevspaces-demo/lists"}