PoC - Running Swirl in an Azure Container Instance #1008
erikspears
started this conversation in
Show and tell
Replies: 1 comment
-
|
Kudos to @dhdnicodemus and @TempleJason for the hard work on this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Prerequisites
Instructions
Azure Setup
Note
In this example, we name the Azure Resource Group
swlat00-rg; however, that specific name isn't meaningful to the deployment. You may use another name for your Resource Group.az loginaz account set --subscription "name or ID of your subscription"az group create --name <resource-group-name> --location eastusaz acr create --resource-group <resource-group-name> --name <acr-name> --sku Basicaz acr login --name <acr-name>Docker Setup
Pull the necessary Docker images:
docker pull swirlai/swirl-search:latestdocker pull redis:latestTag the pulled Docker images:
docker tag swirlai/swirl-search:latest <acr-name>.azurecr.io/swirl:latestdocker tag redis:latest <acr-name>.azurecr.io/redis:latestPush the Docker images:
docker push <acr-name>.azurecr.io/swirl:latestdocker push <acr-name>.azurecr.io/redis:latestCreate an Azure Container Instance (ACI) context in Docker and use it by default:
docker context create aci swlat00-aci-ctxdocker context use swlat00-aci-ctxOptional Setup
Microsoft 365
Follow the steps in the Swirl M365 Guide to add a new App Registration in your Azure Portal
Export the environment variables as below with information from that process:
ChatGPT
If you intent to use Swirl's ChatGPT integrations, including Retrieval Augmented Generation (RAG), export your OpenAI API key:
Check out OpenAI's YouTube video if you don't have an OpenAI API Key and want to obtain one.
Docker Container Setup
Create the following Docker Compose file locally and name it:
docker-compose.yamlBring the containers up in Azure (Note: this will take some time!):
docker compose upGet the Container group name:
az container list --resource-group <resource-group-name> --query "[].name" --output tsvGet the IP address of the Container instance:
az container show --resource-group
<resource-group-name>--name<output-from-previous-step>--query ipAddress.ip --output tsvUpdate the deployment with the instance IP address:
ALLOWED_HOSTin the Docker Compose to have be the IP address from the previous step:ALLOWED_HOSTS=<ip-address-from-previous-step>MSAL_HOSTvalue to the IP address from the previous step:export MSAL_HOST=<ip-address-from-previous-step>Redeploy the applications:
docker compose upOpen the Swirl URLs
You should now be able to go to the following URLs to use the installed Swirl application:
http://<ip-address>:8000/swirlhttp://<ip-address>:8000/galaxyOpen the Containers in Azure
swirl-search-org-dev-2below):Warning
Once the above steps are completed, your deployment is open to the public internet with no SSL and Swirl's default admin user credentials in place! Please change the Swirl
adminaccount password immediately: https://docs.swirl.today/Admin-Guide.html#changing-a-super-user-passwordBeta Was this translation helpful? Give feedback.
All reactions