-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add azure deploy to marketplace files (#83)
* add terraform files * fix gitignore and files * terraform script * fix terraform script * fix terraform script * fix terraform script * fix terraform script * fix terraform script * fix terraform script * fix main tf * fix main tf * fix main tf * fix main tf * fix main tf * fix main tf * fix main tf * fix main tf * fix main tf * fix sh * fix main tf * fix main tf * fix main tf * fix main tf * fix main tf * fix main tf * add example bicep * fix bicep * add latest templates ARM * add openai instructions * add app reg on readme * fix * add warning for version update * fix authDisabled and plan * fix * fix version * add tf file back * fix gitgnore * fix * fix embedding default * change default models * fix template
- Loading branch information
Showing
13 changed files
with
549 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,4 +55,4 @@ app/wkhtmltox/*.exe | |
**/studio_tests/ | ||
.venv | ||
|
||
**/dist/* | ||
**/dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# OpenAI or Azure OpenAI Instance | ||
Before you can deploy the application, you need to have an OpenAI or Azure OpenAI instance. This instance will provide the AI capabilities required by the application. Below are the steps to create an OpenAI or Azure OpenAI instance. | ||
|
||
## Creating an OpenAI Instance | ||
See pricing details [here](https://openai.com/api/pricing/) | ||
1. **Sign Up for OpenAI**: | ||
- Go to the [OpenAI website](https://platform.openai.com/login/). | ||
- Login or sign in (you can use your ChatGPT account) | ||
- You will need a phone number to confirm your account. | ||
|
||
2. **Create the project** | ||
- Click on Create a new project. | ||
- Give it an identifiable name and click create. | ||
|
||
3. **Add billing details** | ||
- On the top bar on the right, click on your profile. | ||
- Click on `Billing` on the left panel. | ||
- Add your payment details. | ||
|
||
4. **Get API Key**: | ||
- On the top bar on the right, click on your profile. | ||
- Click on `API keys` on the left panel. | ||
- Click on `+ Create new secret key` on the top right. | ||
- Give it an identifiable name and select the project you created. | ||
- Click `Create secret key`. | ||
- Copy your key and store it safely. It won't show again and if lost you'll need to create a new one. | ||
- Use these to configure your access when deploying intelligence-toolkit app or using the `Settings` page. | ||
|
||
|
||
|
||
|
||
## Creating an Azure OpenAI Instance | ||
See pricing details [here](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/) | ||
|
||
1. **Log in to the Azure portal**: | ||
- Go to the [Azure portal](https://portal.azure.com). | ||
- If you don't have an account, click on "Create one" and follow the steps to set up your account. | ||
|
||
2. **Create the resource**: | ||
- Click on "Create a resource" and search for "Azure OpenAI". | ||
- Select "Azure OpenAI Service" and click "Create". | ||
- Fill in the required details (subscription, resource group, region, etc.). | ||
- Click next until the Review + submit step. | ||
- If validation passes, click create. | ||
|
||
3. **Deploy the models**: | ||
- Go to the resource page. | ||
- Click on `Go to Azure AI Foundry portal` | ||
- Click on `Deployments` on the left panel. | ||
- Create the AI model | ||
- Click on `Deploy model` and `Deploy base model`. | ||
- Choose `gpt-4o-mini` then `Confirm` and `Deploy` | ||
- Create the embedding model | ||
- Click on `Deploy model` and `Deploy base model`. | ||
- Choose `text-embedding-3-small` then `Confirm` and `Deploy` | ||
|
||
4. **Get the Azure OpenAI key**: | ||
- In the resource page on Azure portal, go to "Keys and Endpoint" section. | ||
- Copy one of the keys (KEY 1 or KEY 2) and Endpoint URL. | ||
- Use these to configure your access when deploying intelligence-toolkit app or using the `Settings` page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Deploying the App Using Azure Marketplace | ||
This guide will help you deploy your application using Azure Marketplace, even if you're not a technical expert. | ||
|
||
### Prerequisites | ||
Before you start, make sure you have the following: | ||
|
||
1. **Azure Subscription**: An active Azure subscription. | ||
1. **OpenAI or Azure OpenAI instance**: This will provide the AI capabilities required by the application. If you don't have one, you can find [instructions here](../../OPENAI.md) | ||
2. **Azure Account**: At minimum `Contributor` role assignment to deploy the resources in your Azure subscription. | ||
|
||
### Steps to Deploy the App | ||
|
||
It is recommended that you use Entra ID for authentication. | ||
|
||
#### Creating an app registration for website authentication | ||
|
||
- Open your web browser and go to [Microsoft Entra admin center](https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) | ||
- On the left panel click on `Applications` then `App registrations` | ||
- Click on `+ New registration`. | ||
- **Give it an identifiable name** | ||
- **Supported account types**: | ||
- Accounts in this organizational directory only (Microsoft only - Single tenant) | ||
- **Redirect URI**: | ||
- Select `Web` as platform and in the URL insert the following URL, being `[webAppName]` the name you'll give to the app on the next steps: | ||
- `https://[webAppName].azurewebsites.net/.auth/login/aad/callback` | ||
- Click on `Register` | ||
- Copy the value of `Application (client) ID` to be used when creating the app in the next steps. | ||
|
||
#### Deploy | ||
See details on pricing [here](https://azure.microsoft.com/en-us/pricing/details/app-service/linux/) (We default to `Premium v3 P0v3` Plan) | ||
|
||
1. **Go to Azure Marketplace**: | ||
- Open your web browser and go to [Azure portal](https://portal.azure.com), search in the top bar for `Marketplace`. | ||
- If you're not logged in, you may need to log in to your Azure account. | ||
- Use the search bar to find the `Intelligence Toolkit` application. | ||
|
||
2. **Select the Application**: | ||
- Click on the application from the search results to open its details page. | ||
|
||
3. **Click "Create"**: | ||
- Click the "Create" button with Plan `Web App` selected to start the deployment process. | ||
|
||
4. **Configure Deployment Settings**: | ||
- You will be redirected to the [Azure portal](https://portal.azure.com) to set up the deployment. | ||
- Fill in the required information: | ||
- **Subscription**: Choose your Azure subscription. | ||
- **Resource Group**: Select an existing group or create a new one. | ||
- **Region**: Choose the region where you want to deploy the app (the closer to y ou, the better). | ||
- **Web App Name**: Enter a unique name for your web app. | ||
- This will create the URl you'll access: | ||
`webappname`.azurewebsites.net | ||
- **Service Principal Type**: | ||
- To create a new authentication app, leave as `Create New` | ||
- Click change Selection to change its name or leave it as the default. | ||
- **AI Settings**: | ||
- This will configure how the app will access an AI instance. | ||
- **AI Type**: | ||
- OpenAI or Azure OpenAI | ||
- **Use Managed Identity**: | ||
- Check this if type is Azure OpenAI and you don't have a key, but the user accessing the app have permission to it. | ||
- **Endpoint**: | ||
- If Azure OpenAI, insert the endpoint for it. | ||
- **Key**: | ||
- Only if Managed Identity is not checked, insert your OpenAI or Azure OpenAI key here. | ||
- **Tags** (Optional): Add any tags you want to use to organize your resources. | ||
|
||
5. **Review and Create**: | ||
- Review the settings you entered to make sure everything is correct. | ||
- Click the "Review + create" button to validate the settings. | ||
- Once validation is complete, click the "Create" button to start the deployment. | ||
|
||
6. **Monitor Deployment**: | ||
- The deployment process will begin, and you can watch its progress in the Azure portal. | ||
- When the deployment is finished, you will get a notification. | ||
|
||
7. **Access the Deployed Application**: | ||
- Go to the resource group where the application was deployed. | ||
- Find the web application resource and click on it to open its details page. | ||
- It takes a few minutes for the application to be ready. Wait about 5-10 and then use the provided URL (`webappname`.azurewebsites.net) to access your deployed application. | ||
|
||
By following these steps, you can successfully deploy your application using Azure Marketplace. |
Oops, something went wrong.