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
The CD portion of CI/CD is continuous delivery or continuous deployment. In a nutshell, it's about taking the product you're building and putting it somewhere to be accessed by the people who need it. There's numerous ways to do this, and the process can become rather involved. We're going to focus on taking our application and deploying it to Azure.
4
7
5
8
> [!NOTE]
@@ -24,13 +27,13 @@ To streamline the process, we're going to work directly with the **main** branch
24
27
25
28
## Identity management
26
29
27
-
Whenever you're interacting with an external service, you of course need credentials to perform any actions. This holds true when you're creating any form of automated tasks, such as a workflow in GitHub. There are several ways to manage identities, including access tokens, shared passwords, and [Open ID Connect (OIDC)](https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect), with the latter being the newest and preferred mechanism. The advantage to OIDC is it uses short-lived tokens and provides granular control over the operations which can be performed.
30
+
Whenever you're interacting with an external service, you of course need credentials to perform any actions. This holds true when you're creating any form of automated tasks, such as a workflow in GitHub. There are several ways to manage identities, including access tokens, shared passwords, and [Open ID Connect (OIDC)][oidc-docs], with the latter being the newest and preferred mechanism. The advantage to OIDC is it uses short-lived tokens and provides granular control over the operations which can be performed.
28
31
29
32
Creating and setting up the credentials is typically a task performed by administrators. However, there are tools which can manage this for you, one of which we'll be taking advantage of!
30
33
31
34
## Asking Azure how to deploy to Azure
32
35
33
-
We previously talked about [extensions for GitHub Copilot chat](./5-context.md#chat-participants-and-extensions), which allow you to interact with external services. These external services could provide access to information about your DevOps flow, database, and other resources. One such extension is the [Azure extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot), which as the name implies allows you to interact with Azure. You can use the extension to get advice on how to deploy your application, check the status of services, and perform other operations. We'll use this extension to ask how to deploy our application.
36
+
We previously talked about [extensions for GitHub Copilot chat][extensions-copilot-chat], which allow you to interact with external services. These external services could provide access to information about your DevOps flow, database, and other resources. One such extension is the [Azure extension][azure-copilot-extension], which as the name implies allows you to interact with Azure. You can use the extension to get advice on how to deploy your application, check the status of services, and perform other operations. We'll use this extension to ask how to deploy our application.
34
37
35
38
As we've done with other tasks, we don't have a specific prompt to use when talking with Azure, as part of the experience is to learn how best to interact with GitHub Copilot. The requirements for the deployment are:
36
39
@@ -40,20 +43,20 @@ As we've done with other tasks, we don't have a specific prompt to use when talk
40
43
1. Open GitHub Copilot Chat.
41
44
2. Activate the Azure extension by typing `@azure`, selecting <kbd>Tab</kbd>then asking the extension how to perform the task you wish to perform (see the requirements above).
42
45
43
-
> [!NOTE]
44
-
> Since this is your first time using the extension, you will be prompted to signin to Azure. Follow the prompts as they appear.
46
+
> [!NOTE]
47
+
> Since this is your first time using the extension, you will be prompted to signin to Azure. Follow the prompts as they appear.
45
48
46
49
3. You should receive a response which highlights the `azd` command, which can be used to both initialize a cloud environment and create the workflow.
47
50
48
51
## Overview of the response from Copilot
49
52
50
53
The response from GitHub Copilot will likely contain instructions to use the following commands:
51
54
52
-
- `azd init --from-code` to create the Azure configuration files using [bicep](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview?tabs=bicep).
55
+
- `azd init --from-code` to create the Azure configuration files using [bicep][bicep-docs].
53
56
- `azd auth login` to authenticate to Azure.
54
57
- `azd pipeline config` to create the GitHub Workflow.
55
58
56
-
[azd](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/overview?tabs=windows) is a commandline utility to help streamline the deployment process to Azure. We'll use it to:
59
+
[azd][azd-docs] is a commandline utility to help streamline the deployment process to Azure. We'll use it to:
57
60
58
61
- generate the bicep file.
59
62
- create the workflow file.
@@ -101,8 +104,8 @@ Bicep is a domain specific language (DSL) for defining Azure resources. It's dyn
101
104
}
102
105
```
103
106
104
-
> [!NOTE]
105
-
> While the syntax resembles JSON, it's not JSON. As a result, resist the urge to add commas to separate the values!
107
+
> [!NOTE]
108
+
> While the syntax resembles JSON, it's not JSON. As a result, resist the urge to add commas to separate the values!
106
109
107
110
## Create the workflow
108
111
@@ -190,6 +193,18 @@ Work with the workshop leaders as needed to ask questions and get guidance as yo
190
193
191
194
## Resources
192
195
193
-
- [What is the Azure Developer CLI?](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/overview?tabs=linux)
194
-
- [About security hardening with OpenID Connect](https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
195
-
- [Deploying with GitHub Actions](https://docs.github.com/en/actions/use-cases-and-examples/deploying/deploying-with-github-actions)
196
+
- [About security hardening with OpenID Connect][oidc-docs]
0 commit comments