Skip to content

Commit 627b1a7

Browse files
authored
Merge pull request MSUSAzureAccelerators#49 from dantelmomsft/github-actions-documentation
notebook9 updated with github actions documentation
2 parents 4c83375 + c3c75cd commit 627b1a7

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

09-Building-Apps.ipynb

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
56
"id": "1ccf7ea5-1abe-4401-a8c7-64bbfc057425",
67
"metadata": {},
@@ -9,6 +10,7 @@
910
]
1011
},
1112
{
13+
"attachments": {},
1214
"cell_type": "markdown",
1315
"id": "78574a83-1d13-4e99-be84-ddcc5f2c011e",
1416
"metadata": {},
@@ -23,6 +25,7 @@
2325
]
2426
},
2527
{
28+
"attachments": {},
2629
"cell_type": "markdown",
2730
"id": "0a8858d8-c89c-4985-9164-b79cf9c530e3",
2831
"metadata": {},
@@ -31,6 +34,7 @@
3134
]
3235
},
3336
{
37+
"attachments": {},
3438
"cell_type": "markdown",
3539
"id": "3db318f3-f0f1-4328-a82e-9bb7f2a0eddf",
3640
"metadata": {},
@@ -48,6 +52,7 @@
4852
]
4953
},
5054
{
55+
"attachments": {},
5156
"cell_type": "markdown",
5257
"id": "e398cb34-3735-40ca-8dbf-3c50582e2213",
5358
"metadata": {},
@@ -56,6 +61,7 @@
5661
]
5762
},
5863
{
64+
"attachments": {},
5965
"cell_type": "markdown",
6066
"id": "f2905d00-c1c4-4fa8-8b4e-23c6fd0c1acc",
6167
"metadata": {},
@@ -68,6 +74,7 @@
6874
]
6975
},
7076
{
77+
"attachments": {},
7178
"cell_type": "markdown",
7279
"id": "25987e8c-c5fe-45c2-8547-b0f66b3faf0d",
7380
"metadata": {},
@@ -76,6 +83,7 @@
7683
]
7784
},
7885
{
86+
"attachments": {},
7987
"cell_type": "markdown",
8088
"id": "d31a7289-ca58-4bec-a977-aac3f755ea7f",
8189
"metadata": {},
@@ -84,6 +92,7 @@
8492
]
8593
},
8694
{
95+
"attachments": {},
8796
"cell_type": "markdown",
8897
"id": "20c1936c-d084-4694-97eb-1ebd21fd5fe1",
8998
"metadata": {},
@@ -107,6 +116,7 @@
107116
]
108117
},
109118
{
119+
"attachments": {},
110120
"cell_type": "markdown",
111121
"id": "8ba1f125-2cc7-48ca-a047-5054f2f4ed37",
112122
"metadata": {},
@@ -115,6 +125,7 @@
115125
]
116126
},
117127
{
128+
"attachments": {},
118129
"cell_type": "markdown",
119130
"id": "b9cb19fc-cd64-428c-8f2b-1963ff9fc4fb",
120131
"metadata": {},
@@ -132,6 +143,43 @@
132143
]
133144
},
134145
{
146+
"attachments": {},
147+
"cell_type": "markdown",
148+
"id": "e6f4abc9",
149+
"metadata": {},
150+
"source": [
151+
"# Build and deploy with GitHub Actions"
152+
]
153+
},
154+
{
155+
"attachments": {},
156+
"cell_type": "markdown",
157+
"id": "c8cc7d8e",
158+
"metadata": {},
159+
"source": [
160+
"if you don't want to build and deploy all the components manually, a GitHub automated CI pipeline is provided in `.github/workflows/main_gptsmartsearch_apps.yml`. Some notes about the CI pipeline design:\n",
161+
"- It uses a \"branch per environment approach\". The deploy environment name is computed at 'runtime' based on a branch/env-name mapping logic in the \"set environment for branch\" step (line 29). The current implemented logic maps everything to a dev like environment. Therefore on each git push on the `main branch` the pipeline is triggered trying to deploy to an environment called `Development`. For more info about GitHub environments and how to set specific env variables and secrets read [here](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment).\n",
162+
"- GitHub environment variables and secrets are used to configure development environment specific configuration. They need to be configured manually in github repository settings:\n",
163+
" - `secrets.AZUREAPPSERVICE_X_PUBLISHPROFILE` is used to store the azure app service publish profile configuration securely.\n",
164+
" - `vars.AZURE_WEBAPP_X_NAME` is used to store the azure web app resource name generated during infra arm deployment.\n",
165+
"- Python dependencies installation is disabled during build phase as azure web apps are currently configured with SCM_DO_BUILD_DURING_DEPLOYMENT. There is an env properties that can be used to activate dependencies resolution during build job. Just set `DO_BUILD_DURING_DEPLOYMENT : false `.\n",
166+
"\n",
167+
"To properly configure automated build and deploy for both backend and frontend components follow below steps:\n",
168+
" \n",
169+
" 1. Go to your forked repository in GitHub and create an [environment]((https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)) called 'Development' (yes this exact name; don't change it). If you want to change the environment name, add new branches and environments or change the current branch/env mapping you can do that, but make sure to change the pipeline code accordingly in `.github/workflows/main_gptsmartsearch_apps.yml` (starting line 29)\n",
170+
" 2. Create 'Development' environment [secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) for both frontend and backend azure web apps [publish profiles]((https://learn.microsoft.com/en-us/visualstudio/azure/how-to-get-publish-profile-from-azure-app-service?view=vs-2022)). You'll need to copy paste the xml content from the .PublishSettings file into the secret value:\n",
171+
" - Create a secret with name `AZUREAPPSERVICE_BACKEND_PUBLISHPROFILE` and set the Value field to publish profile of the azure web app you created using 'Deploy to Azure' button in `apps/backend/README.md`\n",
172+
" - Create a secret with name `AZUREAPPSERVICE_FRONTEND_PUBLISHPROFILE` and set the Value field to publish profile of the azure web app you created using 'Deploy to Azure' button in `apps/frontend/README.md`\n",
173+
"3. Create 'Development' environment [variables](https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-an-environment) for both frontend and backend azure web app resource names:\n",
174+
" - Create a variable with name `AZURE_WEBAPP_BACKEND_NAME` and set the Value field to the azure web app resource name you created using 'Deploy to Azure' button in `apps/backend/README.md`\n",
175+
" - Create a variable with name `AZURE_WEBAPP_FRONTEND_NAME` and set the Value field to the azure web app resource name you created using 'Deploy to Azure' button in `apps/frontend/README.md`\n",
176+
"4. For each commit you push check the status of the triggered pipeline in the GitHub Actions tab, you should see a pipeline has been triggered for the specific commit. If everything is ok you should see green checkmark on both build and deploy jobs in the pipeline detail like below:\n",
177+
"\n",
178+
"![pipeline success](./images/github-actions-pipeline-success.png)\n"
179+
]
180+
},
181+
{
182+
"attachments": {},
135183
"cell_type": "markdown",
136184
"id": "e0301fa7-1eb9-492a-918d-5c36ca5cce90",
137185
"metadata": {},
@@ -140,6 +188,7 @@
140188
]
141189
},
142190
{
191+
"attachments": {},
143192
"cell_type": "markdown",
144193
"id": "bdcdefab-7056-4990-b938-8e82b8dd9501",
145194
"metadata": {},

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# 3 or 5 days POC VBD powered by: Azure Search + Azure OpenAI + Bot Framework + Langchain + Azure SQL + CosmosDB + Bing Search API
44
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MSUSAzureAccelerators/Azure-Cognitive-Search-Azure-OpenAI-Accelerator?quickstart=1)
5+
[![Open in VS Code Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/MSUSAzureAccelerators/Azure-Cognitive-Search-Azure-OpenAI-Accelerator)
56

67
Your organization requires a Multi-Channel Smart Chatbot and a search engine capable of comprehending diverse types of data scattered across various locations. Additionally, the conversational chatbot should be able to provide answers to inquiries, along with the source and an explanation of how and where the answer was obtained. In other words, you want **private and secured ChatGPT for your organization that can interpret, comprehend, and answer questions about your business data**.
78

49.2 KB
Loading

0 commit comments

Comments
 (0)