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: .github/iac/swa/readme.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,23 +14,27 @@ This folder contains a template and infrastructure as code to recreate and recon
14
14
15
15
1) Export any environment variables you want to override with your values using `./infra/main.parameters.json` as a reference for the variable names. e.g.
16
16
17
-
In a new terminal:
18
-
19
17
Bash/sh/zsh:
18
+
20
19
```bash
21
-
export AZURE_RESOURCE_GROUP=rg-dapr-docs-test
22
-
export IDENTITY_RESOURCE_GROUP=rg-my-identities
23
-
export AZURE_STATICWEBSITE_NAME=daprdocs-latest
20
+
export AZURE_RESOURCE_GROUP=docs-website
21
+
export IDENTITY_RESOURCE_GROUP=dapr-identities
22
+
export AZURE_STATICWEBSITE_NAME=daprdocs-v1-1
24
23
```
25
24
25
+
Where `daprdocs-v1-1` should be updated with the new preview version.
26
+
26
27
PowerShell
28
+
27
29
```PowerShell
28
-
setx AZURE_RESOURCE_GROUP "rg-dapr-docs-test"
29
-
setx IDENTITY_RESOURCE_GROUP "rg-my-identities"
30
-
setx AZURE_STATICWEBSITE_NAME "daprdocs-latest"
30
+
setx AZURE_RESOURCE_GROUP "docs-website"
31
+
setx IDENTITY_RESOURCE_GROUP "dapr-identities"
32
+
setx AZURE_STATICWEBSITE_NAME "daprdocs-v1-1"
31
33
```
32
34
33
-
This assumes you have an existing [user-assigned managed identity](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp) (see L39 in `./infra/main.bicep` to use or modify name) in a resource group that you can reference as the runtime identity of this static web app. We recommend storing this in a different resource group from your application, to keep the permissions and lifecycles separate of your identity and your web app. We also recommend narrowly limiting who has access to view, contribute or own this identity, and also only apply it to single resource scopes, not to entire resource groups or subscriptions, to avoid elevation of priviledges.
35
+
Where `daprdocs-v1-1` should be updated with the new preview version.
36
+
37
+
This assumes you have an existing [user-assigned managed identity](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp) (see L39 in `./infra/main.bicep` to use or modify name) in a resource group that you can reference as the runtime identity of this static web app. We recommend storing this in a different resource group from your application, to keep the permissions and lifecycles separate of your identity and your web app. We also recommend narrowly limiting who has access to view, contribute or own this identity, and also only apply it to single resource scopes, not to entire resource groups or subscriptions, to avoid elevation of priviledges.
34
38
35
39
2) Deploy using the Azure Dev CLI
36
40
@@ -40,15 +44,15 @@ Start by creating a create a side-by-side azd environment:
40
44
azd env new
41
45
```
42
46
43
-
For example, you can name the new environment something like: `dapr-docs-v1-15`.
47
+
For example, you can name the new environment something like: `dapr-docs-v1-1`.
44
48
45
49
Now, deploy the Dapr docs SWA in the new azd environment using the following command:
46
50
47
51
```bash
48
52
azd up
49
53
```
50
54
51
-
You will be prompted for the subscription and location (region) to use. The Resource Group and Static Web App will now be created and usable. Typical deployment times are only 20-60 seconds.
55
+
You will be prompted for the subscription and location (region) to use. The Resource Group and Static Web App will now be created and usable. Typical deployment times are only 20-60 seconds.
52
56
53
57
## Configure the Static Web App in portal.azure.com
54
58
@@ -58,4 +62,4 @@ You will be prompted for the subscription and location (region) to use. The Res
58
62
59
63
## Configure your CI/CD pipeline
60
64
61
-
You will need a rotatable token or ideally a managed identity (coming soon) for your pipeline to have Web publishing access grants to the Static Web App. Get the token from the Overview blade -> Manage Access Token command of the SWA, and store it in the vault/secret for the repo matching your Github Action (or other CI/CD pipeline)'s workflow file. One example for the current/main release of Dapr docs is [here](https://github.com/dapr/docs/blob/v1.13/.github/workflows/website-root.yml#L57). This is an elevated operation that likely needs an admin or maintainer to perform.
65
+
You will need a rotatable token or ideally a managed identity (coming soon) for your pipeline to have Web publishing access grants to the Static Web App. Get the token from the Overview blade -> Manage Access Token command of the SWA, and store it in the vault/secret for the repo matching your Github Action (or other CI/CD pipeline)'s workflow file. One example for the current/main release of Dapr docs is [here](https://github.com/dapr/docs/blob/v1.13/.github/workflows/website-root.yml#L57). This is an elevated operation that likely needs an admin or maintainer to perform.
Copy file name to clipboardExpand all lines: daprdocs/content/en/contributing/docs-contrib/maintainer-guide.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -296,6 +296,7 @@ Next, create a new website for the future Dapr release. To do this, you'll need
296
296
- Configure DNS via request from CNCF.
297
297
298
298
#### Prerequisites
299
+
299
300
- Docs maintainer status in the `dapr/docs` repo.
300
301
- Access to the active Dapr Azure Subscription with Contributor or Owner access to create resources.
301
302
- [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd?tabpane=winget-windows%2Cbrew-mac%2Cscript-linux&pivots=os-windows) installed on your machine.
@@ -310,7 +311,7 @@ Deploy a new Azure Static Web App for the future Dapr release. For this example,
310
311
```bash
311
312
cd .github/iac/swa
312
313
```
313
-
314
+
314
315
1. Log into Azure Developer CLI (`azd`) using the Dapr Azure subscription.
315
316
316
317
```bash
@@ -319,47 +320,49 @@ Deploy a new Azure Static Web App for the future Dapr release. For this example,
319
320
320
321
1. In the browser prompt, verify you're logging in as Dapr and complete the login.
321
322
322
-
1. In a new terminal, replace the following values with the website values you prefer.
323
+
1. In the same terminal, set these environment variables:
323
324
324
325
```bash
325
-
export AZURE_RESOURCE_GROUP=rg-dapr-docs-test
326
-
export IDENTITY_RESOURCE_GROUP=rg-my-identities
327
-
export AZURE_STATICWEBSITE_NAME=daprdocs-latest
326
+
export AZURE_RESOURCE_GROUP=docs-website
327
+
export IDENTITY_RESOURCE_GROUP=dapr-identities
328
+
export AZURE_STATICWEBSITE_NAME==daprdocs-v1-1
328
329
```
329
-
330
+
331
+
Where `daprdocs-v1-1` should be updated with the new preview version.
332
+
330
333
1. Create a new [`azd` environment](https://learn.microsoft.com/azure/developer/azure-developer-cli/faq#what-is-an-environment-name).
331
-
334
+
332
335
```bash
333
336
azd env new
334
337
```
335
338
336
-
1. When prompted, enter a new environment name. For this example, you'd name the environment something like: `dapr-docs-v1-1`.
339
+
1. When prompted, enter a new environment name. For this example, you'd name the environment something like: `dapr-docs-v1-1`.
337
340
338
341
1. Once the environment is created, deploy the Dapr docs SWA into the new environment using the following command:
339
342
340
343
```bash
341
344
azd up
342
345
```
343
-
344
-
1. When prompted, select an Azure subscription and location. Match these to the Dapr Azure subscription.
346
+
347
+
1. When prompted, select an Azure subscription (Dapr Tests) and deployment location (West US 2).
345
348
346
349
#### Configure the SWA in the Azure portal
347
350
348
-
Head over to the Dapr subscription in the [Azure portal](https://portal.azure.com) and verify that your new Dapr docs site has been deployed.
351
+
Head over to the Dapr subscription in the [Azure portal](https://portal.azure.com) and verify that your new Dapr docs site has been deployed.
349
352
350
353
Optionally, grant the correct minimal permissions for inbound publishing and outbound access to dependencies using the **Static Web App** > **Access control (IAM)** blade in the portal.
351
354
352
355
#### Configure DNS
353
356
354
-
1. In the Azure portal, from the new SWA you just created, naviage to **Custom domains** from the left side menu.
357
+
1. In the Azure portal, from the new SWA you just created, naviage to **Custom domains** from the left side menu.
355
358
1. Copy the "CNAME" value of the web app.
356
-
1. Using your own account, [submit a CNCF ticket](https://jira.linuxfoundation.org/secure/Dashboard.jspa) to create a new domain name mapped to the CNAME value you copied. For this example, to create a new domain for Dapr v1.1, you'd request to map to `v1-1.docs.dapr.io`.
359
+
1. Using your own account, [submit a CNCF ticket](https://jira.linuxfoundation.org/secure/Dashboard.jspa) to create a new domain name mapped to the CNAME value you copied. For this example, to create a new domain for Dapr v1.1, you'd request to map to `v1-1.docs.dapr.io`.
357
360
358
361
Request resolution may take some time.
359
362
360
363
1. Once the new domain has been confirmed, return to the static web app in the portal.
361
364
1. Navigate to the **Custom domains** blade and select **+ Add**.
362
-
1. Select **Custom domain on other DNS**.
365
+
1. Select **Custom domain on other DNS**.
363
366
1. Enter `v1-1.docs.dapr.io` under **Domain name**. Click **Next**.
364
367
1. Keep **Hostname record type** as `CNAME`, and copy the value of **Value**.
0 commit comments