Skip to content

Commit f822a8a

Browse files
authored
Merge pull request #4314 from hhunter-ms/upmerge_08-14
Upmerge 1.14 --> 1.15
2 parents 3e98207 + b54f713 commit f822a8a

File tree

61 files changed

+2145
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2145
-395
lines changed

.github/iac/swa/readme.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ This assumes you have an existing [user-assigned managed identity](https://learn
3434

3535
2) Deploy using the Azure Dev CLI
3636

37-
The first time, and any updates to this environment
37+
Start by creating a create a side-by-side azd environment:
3838

3939
```bash
40-
azd up
40+
azd env new
4141
```
4242

43-
For subsequent environments/sites, create a side-by-side environment like this:
43+
For example, you can name the new environment something like: `dapr-docs-v1-15`.
44+
45+
Now, deploy the Dapr docs SWA in the new azd environment using the following command:
4446

4547
```bash
46-
azd env new
4748
azd up
4849
```
4950

.github/workflows/website-root.yml

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Azure Static Web App Root
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- v1.14
8+
pull_request:
9+
types: [opened, synchronize, reopened, closed]
10+
branches:
11+
- v1.14
12+
13+
concurrency:
14+
# Cancel the previously triggered build for only PR build.
15+
group: website-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build_and_deploy_job:
20+
name: Build Hugo Website
21+
if: github.event.action != 'closed'
22+
runs-on: ubuntu-latest
23+
env:
24+
SWA_BASE: 'proud-bay-0e9e0e81e'
25+
HUGO_ENV: production
26+
steps:
27+
- name: Checkout docs repo
28+
uses: actions/checkout@v3
29+
with:
30+
submodules: true
31+
- name: Setup Node
32+
uses: actions/setup-node@v2
33+
with:
34+
node-version: '14'
35+
- name: Setup Hugo
36+
uses: peaceiris/[email protected]
37+
with:
38+
hugo-version: 0.102.3
39+
extended: true
40+
- name: Setup Docsy
41+
run: |
42+
cd daprdocs
43+
git submodule update --init --recursive
44+
sudo npm install -D --save autoprefixer
45+
sudo npm install -D --save postcss-cli
46+
- name: Build Hugo Website
47+
run: |
48+
cd daprdocs
49+
git config --global --add safe.directory /github/workspace
50+
if [ $GITHUB_EVENT_NAME == 'pull_request' ]; then
51+
STAGING_URL="https://${SWA_BASE}-${{github.event.number}}.westus2.azurestaticapps.net/"
52+
fi
53+
hugo ${STAGING_URL+-b "$STAGING_URL"}
54+
- name: Deploy docs site
55+
uses: Azure/static-web-apps-deploy@v1
56+
with:
57+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }}
58+
repo_token: ${{ secrets.GITHUB_TOKEN }}
59+
action: "upload"
60+
app_location: "daprdocs/public/"
61+
api_location: "daprdocs/public/"
62+
output_location: ""
63+
skip_app_build: true
64+
skip_deploy_on_missing_secrets: true
65+
- name: Upload Hugo artifacts
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: hugo_build
69+
path: ./daprdocs/public/
70+
if-no-files-found: error
71+
72+
close_staging_site:
73+
if: github.event_name == 'pull_request' && github.event.action == 'closed'
74+
runs-on: ubuntu-latest
75+
name: Close Pull Request Job
76+
steps:
77+
- name: Close Pull Request
78+
id: closepullrequest
79+
uses: Azure/static-web-apps-deploy@v1
80+
with:
81+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }}
82+
action: "close"
83+
skip_deploy_on_missing_secrets: true
84+
85+
algolia_index:
86+
name: Index site for Algolia
87+
if: github.event_name == 'push'
88+
needs: ['build_and_deploy_job']
89+
runs-on: ubuntu-latest
90+
env:
91+
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
92+
ALGOLIA_API_WRITE_KEY: ${{ secrets.ALGOLIA_API_WRITE_KEY }}
93+
ALGOLIA_INDEX_NAME: daprdocs
94+
steps:
95+
- name: Checkout docs repo
96+
uses: actions/checkout@v2
97+
with:
98+
submodules: false
99+
- name: Download Hugo artifacts
100+
uses: actions/download-artifact@v3
101+
with:
102+
name: hugo_build
103+
path: site/
104+
- name: Install Python packages
105+
run: |
106+
pip install --upgrade bs4
107+
pip install --upgrade 'algoliasearch>=2.0,<3.0'
108+
- name: Index site
109+
run: python ./.github/scripts/algolia.py ./site

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dapr documentation
22

3-
[![GitHub License](https://img.shields.io/github/license/dapr/docs?style=flat&label=License&logo=github)](https://github.com/dapr/docs/blob/v1.13/LICENSE) [![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/docs?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/docs/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](http://bit.ly/dapr-discord) [![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev) [![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/daprdev?logo=x&style=flat)](https://twitter.com/daprdev)
3+
[![GitHub License](https://img.shields.io/github/license/dapr/docs?style=flat&label=License&logo=github)](https://github.com/dapr/docs/blob/v1.13/LICENSE) [![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/docs?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/docs/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](https://bit.ly/dapr-discord) [![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev) [![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/daprdev?logo=x&style=flat)](https://twitter.com/daprdev)
44

55
If you are looking to explore the Dapr documentation, please go to the documentation website:
66

@@ -16,14 +16,14 @@ The following branches are currently maintained:
1616

1717
| Branch | Website | Description |
1818
| ------------------------------------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------ |
19-
| [v1.13](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. |
20-
| [v1.14](https://github.com/dapr/docs/tree/v1.14) (pre-release) | https://v1-14.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.14+ go here. |
19+
| [v1.14](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. |
20+
| [v1.15](https://github.com/dapr/docs/tree/v1.15) (pre-release) | https://v1-15.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.15+ go here. |
2121

2222
For more information visit the [Dapr branch structure](https://docs.dapr.io/contributing/docs-contrib/contributing-docs/#branch-guidance) document.
2323

2424
## Contribution guidelines
2525

26-
Before making your first contribution, make sure to review the [contributing section](http://docs.dapr.io/contributing/) in the docs.
26+
Before making your first contribution, make sure to review the [contributing section](https://docs.dapr.io/contributing/) in the docs.
2727

2828
## Overview
2929

daprdocs/content/en/concepts/faq/service-mesh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: >
77
How Dapr compares to and works with service meshes
88
---
99

10-
Dapr uses a sidecar architecture, running as a separate process alongside the application and includes features such as service invocation, network security, and distributed tracing. This often raises the question: how does Dapr compare to service mesh solutions such as [Linkerd](https://linkerd.io/), [Istio](https://istio.io/) and [Open Service Mesh](https://openservicemesh.io/) among others?
10+
Dapr uses a sidecar architecture, running as a separate process alongside the application and includes features such as service invocation, network security, and [distributed tracing](https://middleware.io/blog/what-is-distributed-tracing/). This often raises the question: how does Dapr compare to service mesh solutions such as [Linkerd](https://linkerd.io/), [Istio](https://istio.io/) and [Open Service Mesh](https://openservicemesh.io/) among others?
1111

1212
## How Dapr and service meshes compare
1313
While Dapr and service meshes do offer some overlapping capabilities, **Dapr is not a service mesh**, where a service mesh is defined as a *networking* service mesh. Unlike a service mesh which is focused on networking concerns, Dapr is focused on providing building blocks that make it easier for developers to build applications as microservices. Dapr is developer-centric, versus service meshes which are infrastructure-centric.

daprdocs/content/en/concepts/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Dapr can be used from any developer framework. Here are some that have been inte
139139
| [.NET]({{< ref dotnet >}}) | [ASP.NET Core](https://github.com/dapr/dotnet-sdk/tree/master/examples/AspNetCore) | Brings stateful routing controllers that respond to pub/sub events from other services. Can also take advantage of [ASP.NET Core gRPC Services](https://docs.microsoft.com/aspnet/core/grpc/).
140140
| [Java]({{< ref java >}}) | [Spring Boot](https://spring.io/) | Build Spring boot applications with Dapr APIs
141141
| [Python]({{< ref python >}}) | [Flask]({{< ref python-flask.md >}}) | Build Flask applications with Dapr APIs
142-
| [JavaScript](https://github.com/dapr/js-sdk) | [Express](http://expressjs.com/) | Build Express applications with Dapr APIs
142+
| [JavaScript](https://github.com/dapr/js-sdk) | [Express](https://expressjs.com/) | Build Express applications with Dapr APIs
143143
| [PHP]({{< ref php >}}) | | You can serve with Apache, Nginx, or Caddyserver.
144144

145145
#### Integrations and extensions

daprdocs/content/en/contributing/docs-contrib/maintainer-guide.md

+95-70
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ After upmerge, prepare the docs branches for the release. In two separate PRs, y
8383

8484
- Archive the latest release.
8585
- Bring the preview/release branch as the current, live version of the docs.
86+
- Create a new preview branch.
8687

8788
#### Latest release
8889

@@ -193,79 +194,24 @@ These steps will prepare the upcoming release branch for promotion to latest rel
193194
| [v1.2](https://github.com/dapr/docs/tree/v1.2) (pre-release) | https://v1-2.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.2+ go here. |
194195
```
195196

196-
1. In VS Code, search for any `v1.0` references and replace them with `v1.1` as applicable.
197+
1. Update the `dapr-latest-version.html` shortcode partial to the new minor/patch version (in this example, `1.1.0` and `1.1`).
197198
1. Commit the staged changes and push to your branch (`release_v1.1`).
198199
1. Open a PR from `release/v1.1` to `v1.1`.
199200
1. Have a docs maintainer or approver review. Wait to merge the PR until release.
200201

201-
### Create new website for future release
202-
203-
Next, create a new website for the future Dapr release, which you point to from the latest website. To do this, you'll need to:
204-
205-
- Deploy an Azure Static Web App.
206-
- Configure DNS via request from CNCF.
207-
208-
These steps require authentication.
209-
210-
#### Deploy Azure Static Web App
202+
#### Future preview branch
211203

212-
Deploy a new Azure Static Web App for the future Dapr release. For this example, we use v1.2 as the future release.
213-
214-
{{% alert title="Important" color="primary" %}}
215-
You need Microsoft employee access to create a new Azure Static Web App.
216-
{{% /alert %}}
217-
218-
1. Use Azure PIM to [elevate into the Owner role](https://eng.ms/docs/cloud-ai-platform/devdiv/devdiv-azure-service-dmitryr/azure-devex-philon/dapr/dapr/assets/azure) for the Dapr Prod subscription.
219-
1. Navigate to the [docs-website](https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/38875a89-0178-4f27-a141-dc6fc01f183d/resourceGroups/docs-website/overview) resource group.
220-
1. Select **+ Create** and search for **Static Web App**. Select **Create**.
221-
1. Enter in the following information:
222-
- Subscription: `Dapr Prod`
223-
- Resource Group: `docs-website`
224-
- Name: `daprdocs-v1-2`
225-
- Hosting Plan: `Free`
226-
- Region: `West US 2`
227-
- Source: `Other`
228-
1. Select **Review + create**, and then deploy the static web app.
229-
1. Wait for deployment, and navigate to the new static web app resource.
230-
1. Select **Manage deployment token** and copy the value.
231-
1. Navigate to the docs repo **Secrets management** page under **Settings** and create a new secret named `AZURE_STATIC_WEB_APPS_V1_2`, and provide the value of the deployment token.
232-
233-
#### Configure DNS
234-
235-
{{% alert title="Important" color="primary" %}}
236-
This section can only be completed on a Secure Admin Workstation (SAW). If you do not have a SAW device, ask a team member with one to assist.
237-
238-
{{% /alert %}}
239-
240-
1. Ensure you are a member of the `DMAdaprweb` security group in IDWeb.
241-
1. Navigate to [https://prod.msftdomains.com/dns/form?environment=0](https://prod.msftdomains.com/dns/form?environment=0) on a SAW
242-
1. Enter the following details in the left-hand pane:
243-
- Team Owning Alias: `DMAdaprweb`
244-
- Business Justification/Notes: `Configuring DNS for new Dapr docs website`
245-
- Environment: `Internet/Public-facing`
246-
- Zone: `dapr.io`
247-
- Action: `Add`
248-
- Incident ID: Leave blank
249-
250-
1. Back in the new static web app you just deployed, navigate to the **Custom domains** blade and select **+ Add**
251-
1. Enter `v1-2.docs.dapr.io` under **Domain name**. Click **Next**.
252-
1. Keep **Hostname record type** as `CNAME`, and copy the value of **Value**.
253-
1. Back in the domain portal, enter the following information in the main pane:
254-
- Name: `v1-2.docs`
255-
- Type: `CNAME`
256-
- Data: Value you just copied from the static web app
204+
##### Create preview branch
257205

258-
1. Click **Submit** in the top right corner.
259-
1. Wait for two emails:
260-
- One saying your request was received.
261-
- One saying the request was completed.
262-
1. Back in the Azure Portal, click **Add**. You may need to click a couple times to account for DNS delay.
263-
1. A TLS certificate is now generated for you and the DNS record is saved. This may take 2-3 minutes.
264-
1. Navigate to `https://v1-2.docs.dapr.io` and verify a blank website loads correctly.
206+
1. In GitHub UI, select the branch drop-down menu and select **View all branches**.
207+
1. Click **New branch**.
208+
1. In **New branch name**, enter the preview branch version number. In this example, it would be `v1.2`.
209+
1. Select **v1.1** as the source.
210+
1. Click **Create new branch**.
265211

266-
### Configure future website branch
212+
##### Configure preview branch
267213

268-
1. Open VS Code to the Dapr docs repo.
214+
1. In a terminal window, navigate to the `docs` repo.
269215
1. Switch to the upcoming release branch (`v1.1`) and synchronize changes:
270216

271217
```bash
@@ -339,15 +285,94 @@ You need Microsoft employee access to create a new Azure Static Web App.
339285
url = "https://v1-0.docs.dapr.io"
340286
```
341287

342-
1. Commit the staged changes and push to the v1.2 branch.
343-
1. Navigate to the [docs Actions page](https://github.com/dapr/docs/actions) and make sure the build & release successfully completed.
344-
1. Navigate to the new `https://v1-2.docs.dapr.io` website and verify that the new version is displayed.
288+
1. Commit the staged changes and push to a new PR against the v1.2 branch.
289+
1. Hold on merging the PR until after release and the other `v1.0` and `v1.1` PRs have been merged.
290+
291+
### Create new website for future release
292+
293+
Next, create a new website for the future Dapr release. To do this, you'll need to:
294+
295+
- Deploy an Azure Static Web App.
296+
- Configure DNS via request from CNCF.
297+
298+
#### Prerequisites
299+
- Docs maintainer status in the `dapr/docs` repo.
300+
- Access to the active Dapr Azure Subscription with Contributor or Owner access to create resources.
301+
- [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd?tabs=winget-windows%2Cbrew-mac%2Cscript-linux&pivots=os-windows) installed on your machine.
302+
- Your own fork of the [`dapr/docs` repo](https://github.com/dapr/docs) cloned to your machine.
303+
304+
#### Deploy Azure Static Web App
305+
306+
Deploy a new Azure Static Web App for the future Dapr release. For this example, we use v1.1 as the future release.
307+
308+
1. In a terminal window, navigate to the `iac/swa` folder in the `dapr/docs` directory.
309+
310+
```bash
311+
cd .github/iac/swa
312+
```
313+
314+
1. Log into Azure Developer CLI (`azd`) using the Dapr Azure subscription.
315+
316+
```bash
317+
azd login
318+
```
319+
320+
1. In the browser prompt, verify you're logging in as Dapr and complete the login.
321+
322+
1. In a new terminal, replace the following values with the website values you prefer.
323+
324+
```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
328+
```
329+
330+
1. Create a new [`azd` environment](https://learn.microsoft.com/azure/developer/azure-developer-cli/faq#what-is-an-environment-name).
331+
332+
```bash
333+
azd env new
334+
```
335+
336+
1. When prompted, enter a new environment name. For this example, you'd name the environment something like: `dapr-docs-v1-1`.
337+
338+
1. Once the environment is created, deploy the Dapr docs SWA into the new environment using the following command:
339+
340+
```bash
341+
azd up
342+
```
343+
344+
1. When prompted, select an Azure subscription and location. Match these to the Dapr Azure subscription.
345+
346+
#### Configure the SWA in the Azure portal
347+
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.
349+
350+
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+
352+
#### Configure DNS
353+
354+
1. In the Azure portal, from the new SWA you just created, naviage to **Custom domains** from the left side menu.
355+
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`.
357+
358+
Request resolution may take some time.
359+
360+
1. Once the new domain has been confirmed, return to the static web app in the portal.
361+
1. Navigate to the **Custom domains** blade and select **+ Add**.
362+
1. Select **Custom domain on other DNS**.
363+
1. Enter `v1-1.docs.dapr.io` under **Domain name**. Click **Next**.
364+
1. Keep **Hostname record type** as `CNAME`, and copy the value of **Value**.
365+
1. Click **Add**.
366+
1. Navigate to `https://v1-1.docs.dapr.io` and verify a blank website loads correctly.
367+
368+
You can repeat these steps for any preview versions.
345369

346370
### On the new Dapr release date
347371

348372
1. Wait for all code/containers/Helm charts to be published.
349-
1. Merge the the PR from `release_v1.0` to `v1.0`. Delete the release/v1.0 branch.
350-
1. Merge the the PR from `release_v1.1` to `v1.1`. Delete the release/v1.1 branch.
373+
1. Merge the PR from `release_v1.0` to `v1.0`. Delete the release/v1.0 branch.
374+
1. Merge the PR from `release_v1.1` to `v1.1`. Delete the release/v1.1 branch.
375+
1. Merge the PR from `release_v1.2` to `v1.2`. Delete the release/v1.2 branch.
351376

352377
Congrats on the new docs release! 🚀 🎉 🎈
353378

0 commit comments

Comments
 (0)