Skip to content

Commit

Permalink
Merge pull request #4314 from hhunter-ms/upmerge_08-14
Browse files Browse the repository at this point in the history
Upmerge 1.14 --> 1.15
  • Loading branch information
hhunter-ms authored Aug 14, 2024
2 parents 3e98207 + b54f713 commit f822a8a
Show file tree
Hide file tree
Showing 61 changed files with 2,145 additions and 395 deletions.
9 changes: 5 additions & 4 deletions .github/iac/swa/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ This assumes you have an existing [user-assigned managed identity](https://learn

2) Deploy using the Azure Dev CLI

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

```bash
azd up
azd env new
```

For subsequent environments/sites, create a side-by-side environment like this:
For example, you can name the new environment something like: `dapr-docs-v1-15`.

Now, deploy the Dapr docs SWA in the new azd environment using the following command:

```bash
azd env new
azd up
```

Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/website-root.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Azure Static Web App Root

on:
workflow_dispatch:
push:
branches:
- v1.14
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- v1.14

concurrency:
# Cancel the previously triggered build for only PR build.
group: website-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
build_and_deploy_job:
name: Build Hugo Website
if: github.event.action != 'closed'
runs-on: ubuntu-latest
env:
SWA_BASE: 'proud-bay-0e9e0e81e'
HUGO_ENV: production
steps:
- name: Checkout docs repo
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: 0.102.3
extended: true
- name: Setup Docsy
run: |
cd daprdocs
git submodule update --init --recursive
sudo npm install -D --save autoprefixer
sudo npm install -D --save postcss-cli
- name: Build Hugo Website
run: |
cd daprdocs
git config --global --add safe.directory /github/workspace
if [ $GITHUB_EVENT_NAME == 'pull_request' ]; then
STAGING_URL="https://${SWA_BASE}-${{github.event.number}}.westus2.azurestaticapps.net/"
fi
hugo ${STAGING_URL+-b "$STAGING_URL"}
- name: Deploy docs site
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "daprdocs/public/"
api_location: "daprdocs/public/"
output_location: ""
skip_app_build: true
skip_deploy_on_missing_secrets: true
- name: Upload Hugo artifacts
uses: actions/upload-artifact@v3
with:
name: hugo_build
path: ./daprdocs/public/
if-no-files-found: error

close_staging_site:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }}
action: "close"
skip_deploy_on_missing_secrets: true

algolia_index:
name: Index site for Algolia
if: github.event_name == 'push'
needs: ['build_and_deploy_job']
runs-on: ubuntu-latest
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_WRITE_KEY: ${{ secrets.ALGOLIA_API_WRITE_KEY }}
ALGOLIA_INDEX_NAME: daprdocs
steps:
- name: Checkout docs repo
uses: actions/checkout@v2
with:
submodules: false
- name: Download Hugo artifacts
uses: actions/download-artifact@v3
with:
name: hugo_build
path: site/
- name: Install Python packages
run: |
pip install --upgrade bs4
pip install --upgrade 'algoliasearch>=2.0,<3.0'
- name: Index site
run: python ./.github/scripts/algolia.py ./site
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dapr documentation

[![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)
[![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)

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

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

| Branch | Website | Description |
| ------------------------------------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------ |
| [v1.13](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. |
| [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. |
| [v1.14](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. |
| [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. |

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

## Contribution guidelines

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

## Overview

Expand Down
2 changes: 1 addition & 1 deletion daprdocs/content/en/concepts/faq/service-mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
How Dapr compares to and works with service meshes
---

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?
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?

## How Dapr and service meshes compare
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.
Expand Down
2 changes: 1 addition & 1 deletion daprdocs/content/en/concepts/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Dapr can be used from any developer framework. Here are some that have been inte
| [.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/).
| [Java]({{< ref java >}}) | [Spring Boot](https://spring.io/) | Build Spring boot applications with Dapr APIs
| [Python]({{< ref python >}}) | [Flask]({{< ref python-flask.md >}}) | Build Flask applications with Dapr APIs
| [JavaScript](https://github.com/dapr/js-sdk) | [Express](http://expressjs.com/) | Build Express applications with Dapr APIs
| [JavaScript](https://github.com/dapr/js-sdk) | [Express](https://expressjs.com/) | Build Express applications with Dapr APIs
| [PHP]({{< ref php >}}) | | You can serve with Apache, Nginx, or Caddyserver.

#### Integrations and extensions
Expand Down
165 changes: 95 additions & 70 deletions daprdocs/content/en/contributing/docs-contrib/maintainer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ After upmerge, prepare the docs branches for the release. In two separate PRs, y
- Archive the latest release.
- Bring the preview/release branch as the current, live version of the docs.
- Create a new preview branch.
#### Latest release
Expand Down Expand Up @@ -193,79 +194,24 @@ These steps will prepare the upcoming release branch for promotion to latest rel
| [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. |
```
1. In VS Code, search for any `v1.0` references and replace them with `v1.1` as applicable.
1. Update the `dapr-latest-version.html` shortcode partial to the new minor/patch version (in this example, `1.1.0` and `1.1`).
1. Commit the staged changes and push to your branch (`release_v1.1`).
1. Open a PR from `release/v1.1` to `v1.1`.
1. Have a docs maintainer or approver review. Wait to merge the PR until release.
### Create new website for future release
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:

- Deploy an Azure Static Web App.
- Configure DNS via request from CNCF.

These steps require authentication.

#### Deploy Azure Static Web App
#### Future preview branch
Deploy a new Azure Static Web App for the future Dapr release. For this example, we use v1.2 as the future release.

{{% alert title="Important" color="primary" %}}
You need Microsoft employee access to create a new Azure Static Web App.
{{% /alert %}}

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.
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.
1. Select **+ Create** and search for **Static Web App**. Select **Create**.
1. Enter in the following information:
- Subscription: `Dapr Prod`
- Resource Group: `docs-website`
- Name: `daprdocs-v1-2`
- Hosting Plan: `Free`
- Region: `West US 2`
- Source: `Other`
1. Select **Review + create**, and then deploy the static web app.
1. Wait for deployment, and navigate to the new static web app resource.
1. Select **Manage deployment token** and copy the value.
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.

#### Configure DNS

{{% alert title="Important" color="primary" %}}
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.

{{% /alert %}}

1. Ensure you are a member of the `DMAdaprweb` security group in IDWeb.
1. Navigate to [https://prod.msftdomains.com/dns/form?environment=0](https://prod.msftdomains.com/dns/form?environment=0) on a SAW
1. Enter the following details in the left-hand pane:
- Team Owning Alias: `DMAdaprweb`
- Business Justification/Notes: `Configuring DNS for new Dapr docs website`
- Environment: `Internet/Public-facing`
- Zone: `dapr.io`
- Action: `Add`
- Incident ID: Leave blank

1. Back in the new static web app you just deployed, navigate to the **Custom domains** blade and select **+ Add**
1. Enter `v1-2.docs.dapr.io` under **Domain name**. Click **Next**.
1. Keep **Hostname record type** as `CNAME`, and copy the value of **Value**.
1. Back in the domain portal, enter the following information in the main pane:
- Name: `v1-2.docs`
- Type: `CNAME`
- Data: Value you just copied from the static web app
##### Create preview branch
1. Click **Submit** in the top right corner.
1. Wait for two emails:
- One saying your request was received.
- One saying the request was completed.
1. Back in the Azure Portal, click **Add**. You may need to click a couple times to account for DNS delay.
1. A TLS certificate is now generated for you and the DNS record is saved. This may take 2-3 minutes.
1. Navigate to `https://v1-2.docs.dapr.io` and verify a blank website loads correctly.
1. In GitHub UI, select the branch drop-down menu and select **View all branches**.
1. Click **New branch**.
1. In **New branch name**, enter the preview branch version number. In this example, it would be `v1.2`.
1. Select **v1.1** as the source.
1. Click **Create new branch**.
### Configure future website branch
##### Configure preview branch
1. Open VS Code to the Dapr docs repo.
1. In a terminal window, navigate to the `docs` repo.
1. Switch to the upcoming release branch (`v1.1`) and synchronize changes:
```bash
Expand Down Expand Up @@ -339,15 +285,94 @@ You need Microsoft employee access to create a new Azure Static Web App.
url = "https://v1-0.docs.dapr.io"
```
1. Commit the staged changes and push to the v1.2 branch.
1. Navigate to the [docs Actions page](https://github.com/dapr/docs/actions) and make sure the build & release successfully completed.
1. Navigate to the new `https://v1-2.docs.dapr.io` website and verify that the new version is displayed.
1. Commit the staged changes and push to a new PR against the v1.2 branch.
1. Hold on merging the PR until after release and the other `v1.0` and `v1.1` PRs have been merged.
### Create new website for future release
Next, create a new website for the future Dapr release. To do this, you'll need to:

- Deploy an Azure Static Web App.
- Configure DNS via request from CNCF.

#### Prerequisites
- Docs maintainer status in the `dapr/docs` repo.
- Access to the active Dapr Azure Subscription with Contributor or Owner access to create resources.
- [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.
- Your own fork of the [`dapr/docs` repo](https://github.com/dapr/docs) cloned to your machine.

#### Deploy Azure Static Web App

Deploy a new Azure Static Web App for the future Dapr release. For this example, we use v1.1 as the future release.

1. In a terminal window, navigate to the `iac/swa` folder in the `dapr/docs` directory.

```bash
cd .github/iac/swa
```

1. Log into Azure Developer CLI (`azd`) using the Dapr Azure subscription.

```bash
azd login
```

1. In the browser prompt, verify you're logging in as Dapr and complete the login.
1. In a new terminal, replace the following values with the website values you prefer.
```bash
export AZURE_RESOURCE_GROUP=rg-dapr-docs-test
export IDENTITY_RESOURCE_GROUP=rg-my-identities
export AZURE_STATICWEBSITE_NAME=daprdocs-latest
```
1. Create a new [`azd` environment](https://learn.microsoft.com/azure/developer/azure-developer-cli/faq#what-is-an-environment-name).
```bash
azd env new
```
1. When prompted, enter a new environment name. For this example, you'd name the environment something like: `dapr-docs-v1-1`.

1. Once the environment is created, deploy the Dapr docs SWA into the new environment using the following command:

```bash
azd up
```

1. When prompted, select an Azure subscription and location. Match these to the Dapr Azure subscription.

#### Configure the SWA in the Azure portal

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.

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.

#### Configure DNS

1. In the Azure portal, from the new SWA you just created, naviage to **Custom domains** from the left side menu.
1. Copy the "CNAME" value of the web app.
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`.
Request resolution may take some time.
1. Once the new domain has been confirmed, return to the static web app in the portal.
1. Navigate to the **Custom domains** blade and select **+ Add**.
1. Select **Custom domain on other DNS**.
1. Enter `v1-1.docs.dapr.io` under **Domain name**. Click **Next**.
1. Keep **Hostname record type** as `CNAME`, and copy the value of **Value**.
1. Click **Add**.
1. Navigate to `https://v1-1.docs.dapr.io` and verify a blank website loads correctly.
You can repeat these steps for any preview versions.
### On the new Dapr release date
1. Wait for all code/containers/Helm charts to be published.
1. Merge the the PR from `release_v1.0` to `v1.0`. Delete the release/v1.0 branch.
1. Merge the the PR from `release_v1.1` to `v1.1`. Delete the release/v1.1 branch.
1. Merge the PR from `release_v1.0` to `v1.0`. Delete the release/v1.0 branch.
1. Merge the PR from `release_v1.1` to `v1.1`. Delete the release/v1.1 branch.
1. Merge the PR from `release_v1.2` to `v1.2`. Delete the release/v1.2 branch.
Congrats on the new docs release! 🚀 🎉 🎈
Expand Down
Loading

0 comments on commit f822a8a

Please sign in to comment.