Skip to content

Commit cf84929

Browse files
authored
Merge pull request #20 from docusign/cvarma/updates-hosting-setup
2 parents 2bacbb4 + 6d9db21 commit cf84929

File tree

1 file changed

+108
-20
lines changed

1 file changed

+108
-20
lines changed

src/content/docs/infrastructure/hosting-setup.mdx

Lines changed: 108 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,92 @@ To enable continuous deployment from a GitHub repository, follow the steps in th
157157

158158
</section>
159159

160-
**Example Implementation:** [1fe Starter App CI Workflow](https://github.com/docusign/1fe-starter-app/blob/main/.github/workflows/ci.yml)
160+
### Example Implementation: [1fe Starter App CI Workflow](https://github.com/docusign/1fe-starter-app/blob/main/.github/workflows/ci.yml)
161+
162+
163+
##### GitHub Secrets Configuration for the 1fe Starter App CI Workflow
164+
165+
Your CI/CD workflow requires several secrets to deploy to Azure Web App hosting. These secrets are referenced in the [1fe-starter-app CI workflow](https://github.com/docusign/1fe-starter-app/blob/main/.github/workflows/ci.yml#L24-L30):
166+
167+
```yaml
168+
SSH_PRIVATE_1FE: ${{ secrets.SSH_PRIVATE_1FE }}
169+
AKAMAI_NS_SSH_PRIVATE_KEY: ${{ secrets.AKAMAI_NS_SSH_PRIVATE_KEY }}
170+
AZUREAPPSERVICE_CLIENTID: ${{ secrets.AZUREAPPSERVICE_CLIENTID }}
171+
AZUREAPPSERVICE_TENANTID: ${{ secrets.AZUREAPPSERVICE_TENANTID }}
172+
AZUREAPPSERVICE_SUBSCRIPTIONID: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID }}
173+
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
174+
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY_1FE }}
175+
```
176+
177+
### Required Secrets
178+
179+
<section>
180+
181+
**Azure Web App Deployment:**
182+
- `AZUREAPPSERVICE_CLIENTID` - Service Principal Client ID for Azure authentication
183+
- `AZUREAPPSERVICE_TENANTID` - Azure AD Tenant ID
184+
- `AZUREAPPSERVICE_SUBSCRIPTIONID` - Your Azure Subscription ID
185+
- `AZURE_RESOURCE_GROUP` - Resource group containing your Azure Web App
186+
187+
**SSH Keys:**
188+
- `SSH_PRIVATE_1FE` - Private SSH key for deployment access
189+
- `AKAMAI_NS_SSH_PRIVATE_KEY` - Akamai NetStorage SSH private key for CDN uploads
190+
191+
**Package Registry:**
192+
- `NPM_TOKEN_READONLY` - Read-only NPM token for accessing private packages
193+
194+
</section>
195+
196+
### How to Configure Secrets
197+
198+
<section>
199+
200+
1. **Navigate to Repository Settings**
201+
Go to your GitHub repository → **Settings** → **Secrets and variables** → **Actions**
202+
203+
2. **Add Each Secret**
204+
Click **"New repository secret"** and add each secret with the exact name shown above
205+
206+
3. **Obtain Secret Values:**
207+
208+
**Azure Service Principal Credentials:**
209+
210+
To get the Azure secrets, you need to create a Service Principal and gather Azure subscription information:
211+
212+
**Via Azure CLI:**
213+
```bash
214+
# Login to Azure
215+
az login
216+
217+
# Get your subscription ID
218+
az account show --query id --output tsv
219+
220+
# Get your tenant ID
221+
az account show --query tenantId --output tsv
222+
223+
# Create Service Principal with Contributor role
224+
az ad sp create-for-rbac --name "1fe-deployment-sp" \
225+
--role contributor \
226+
--scopes /subscriptions/{your-subscription-id}/resourceGroups/{your-resource-group-name}
227+
```
228+
229+
This command outputs JSON containing your `AZUREAPPSERVICE_CLIENTID` (`appId`) and creates the service principal.
230+
231+
**Via Azure Portal:**
232+
1. **Subscription ID**: Azure Portal → Subscriptions → Copy your subscription ID
233+
2. **Tenant ID**: Azure Portal → Azure Active Directory → Properties → Directory ID
234+
3. **Service Principal**: Azure Portal → Azure Active Directory → App registrations → New registration
235+
4. **Resource Group**: The name of your existing Azure resource group containing your Web App
236+
237+
**Other Credentials:**
238+
- **SSH keys**: Generate using `ssh-keygen -t rsa -b 4096` or obtain from your infrastructure team
239+
- **NPM token**: Create in NPM registry settings or obtain from your DevOps team
240+
241+
</section>
242+
243+
:::tip[Team Coordination]
244+
These secrets may already be configured by your DevOps or infrastructure team. Check with them before creating new credentials to avoid duplicating access keys.
245+
:::
161246

162247
#### <FaMicrosoft style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle', color: '#0078D4' }} /> Step 4: Add and Configure a Custom Domain
163248

@@ -166,33 +251,36 @@ Your Web App has a default domain (e.g., `1fe-demo.azurewebsites.net`), but you
166251

167252
**Setup Instructions:**
168253

169-
1. **Navigate to Your Web App Resource**
170-
- In the Azure Portal, navigate to your Web App resource
254+
<section>
171255

172-
2. **Access Custom Domains Section**
173-
- In the left-hand menu, select **Custom domains**
256+
1. **Navigate to Your Web App Resource**
257+
In the Azure Portal, navigate to your Web App resource
258+
259+
2. **Access Custom Domains Section**
260+
In the left-hand menu, select **Custom domains**
174261

175-
3. **Start Adding Custom Domain**
176-
- Click **+ Add custom domain**
262+
3. **Start Adding Custom Domain**
263+
Click **+ Add custom domain**
177264

178-
4. **Select Your DNS Provider**
179-
- **Domain provider**: Select your DNS provider (e.g., GoDaddy, Cloudflare)
265+
4. **Select Your DNS Provider**
266+
**Domain provider**: Select your DNS provider (e.g., GoDaddy, Cloudflare)
180267

181-
5. **Enter Your Domain Name**
182-
- Enter the domain name you want to use (e.g., `demo.yourdomain.com`)
268+
5. **Enter Your Domain Name**
269+
Enter the domain name you want to use (e.g., `demo.yourdomain.com`)
183270

184-
6. **Review DNS Record Requirements**
185-
- The portal will provide you with DNS record information to validate ownership
271+
6. **Review DNS Record Requirements**
272+
The portal will provide you with DNS record information to validate ownership
186273

187-
7. **Create Required DNS Records**
188-
- You will need to create a TXT and/or a CNAME record with your domain registrar
189-
- Use the DNS information provided by Azure
274+
7. **Create Required DNS Records**
275+
Create a TXT and/or a CNAME record with your domain registrar using the DNS information provided by Azure
190276

191-
8. **Validate Domain Ownership**
192-
- Once the DNS records are created, click **Validate** in the Azure Portal
277+
8. **Validate Domain Ownership**
278+
Once the DNS records are created, click **Validate** in the Azure Portal
193279

194-
9. **Complete Domain Addition**
195-
- After validation is successful, click **Add custom domain**
280+
9. **Complete Domain Addition**
281+
After validation is successful, click **Add custom domain**
282+
283+
</section>
196284

197285
:::note[App Service Plan Requirement]
198286
Your App Service plan must be a paid tier (e.g., Basic, Standard, Premium) to add a custom domain. The Free (F1) and Shared (D1) tiers do not support custom domains.

0 commit comments

Comments
 (0)