You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/guided-workshop/exercises/3-codespaces.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ One thing that's really great is the [default dev container](https://github.com/
20
20
21
21
Let's create our own dev container! The [dev container is configured](https://docs.github.com/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers) by creating the Docker files Codespaces will use to create and configure the container, and providing any customizations in the `devcontainer.json` file. Customizations provided in `devcontainer.json` can include ports to open, commands to run, and extension to install in Visual Studio Code (either running locally on the desktop or in the browser). This configuration becomes part of the repository. All developers who wish to contribute can then create a new instance of the container based on the configuration you provided.
22
22
23
-
1. Access the Command Palette (<kbd>F1</kbd>), then start typing **dev container**.
23
+
1. Access the Command Palette (<kbd>F1</kbd> or clicking ☰ → View → Command Palette), then start typing **dev container**.
24
24
1. Select **Codespaces: Add Development Container Configuration Files...** .
25
25
1. Select **Create a new configuration...**.
26
26
1. Select **From a predefined container configuration...**.
@@ -56,7 +56,7 @@ You've now defined a custom container!
56
56
57
57
Whenever someone uses the codespace you defined they'll have an environment with Node.js and Mongo DB, and the GitHub Copilot extension installed. Let's use this container!
58
58
59
-
1.Select <kbd>F1</kbd> to open the command palette.
59
+
1.Open the command palette.
60
60
1. Type **rebuild** and select **Codespaces: Rebuild container**.
61
61
1. Select **Rebuild Container** on the dialog box. Your container now rebuilds.
62
62
@@ -68,7 +68,7 @@ Custom containers for GitHub Codespaces become part of the source code for the r
68
68
69
69
> **IMPORTANT:** For purposes of this exercise we are pushing code updates directly to `main`, our default branch. Normally you would follow the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow), which we will do in a [later exercise](6-github-flow.md).
70
70
71
-
1. Open the terminal window in the codespace by selecting <kbd>Ctl</kbd> + <kbd>`</kbd>.
71
+
1. Open the terminal window in the codespace by selecting <kbd>Ctl</kbd> + <kbd>`</kbd> or clicking ☰ → View → Terminal.
72
72
1. Find the issue number for defining the codespace by entering the following command:
73
73
74
74
```bash
@@ -81,7 +81,7 @@ Custom containers for GitHub Codespaces become part of the source code for the r
81
81
82
82
```bash
83
83
git add .
84
-
git commit -m "Resolves <ISSUE_NUMBER>"
84
+
git commit -m "Resolves #<ISSUE_NUMBER>"
85
85
git push
86
86
```
87
87
@@ -107,7 +107,7 @@ Let's add an environment variable, refresh the codespace to update the environme
107
107
1. Select the **Settings** tab.
108
108
1. On the left, under the **Security** section, expand **Secrets and variables** and select **Codespaces**.
109
109
110
-

110
+

111
111
112
112
1. Select **New repository secret**.
113
113
1. Create a new secret by entering the following values and pressing **Add secret**.
@@ -132,6 +132,8 @@ Let's add an environment variable, refresh the codespace to update the environme
132
132
133
133
1. You will now see a new tab with your website running! Notice the URL at the top, which resembles the name of your codespace. Your website is running in the container you defined in the cloud!
134
134
135
+
> **NOTE:** If you close this tab, you can reopen it by clicking the "Ports" tab next to the Terminal, mousing over the "Forwarded Address" starting with `https://`, then clicking the globe icon
136
+
135
137
1. If you wish, you can add a pet to the database by selecting **Add pet**. On the form you will notice various fields to describe the pet. If you need a URL for images, you can use any of the following:
Copy file name to clipboardExpand all lines: content/guided-workshop/exercises/7-create-environment.md
+63Lines changed: 63 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,69 @@ You've prepped everything on both Azure and your repository, and created the wor
210
210
211
211
The workflow will now run and create the resources! This will take several minutes. You may need to refresh the page to see it start running. Once running, you can navigate into the workflow run to view the log and track the progress.
212
212
213
+
## Debugging the workflow
214
+
215
+
If you see error messages such as:
216
+
217
+
```
218
+
Code: MissingSubscriptionRegistration
219
+
Message: The subscription is not registered to use namespace {resource-provider-namespace}
Congratulations! You have new defined a workflow which uses infrastructure as code (IaC) to create the resources necessary for deployment. This allows you to quickly create a consistent environment, reducing overhead and errors. Let's close everything out by [implementing continuous deployment](8-deployment.md).
0 commit comments