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
-
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 login
az account set --subscription "name or ID of your subscription"
az group create --name <resource-group-name> --location eastus
az acr create --resource-group <resource-group-name> --name <acr-name> --sku Basic
az acr login --name <acr-name>
Docker Setup
Pull the necessary Docker images:
docker pull swirlai/swirl-search:latest
docker pull redis:latest
Tag the pulled Docker images:
docker tag swirlai/swirl-search:latest <acr-name>.azurecr.io/swirl:latest
docker tag redis:latest <acr-name>.azurecr.io/redis:latest
Push the Docker images:
docker push <acr-name>.azurecr.io/swirl:latest
docker push <acr-name>.azurecr.io/redis:latest
Create an Azure Container Instance (ACI) context in Docker and use it by default:
docker context create aci swlat00-aci-ctx
docker context use swlat00-aci-ctx
Optional 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.yaml
Bring the containers up in Azure (Note: this will take some time!):
docker compose up
Get the Container group name:
az container list --resource-group <resource-group-name> --query "[].name" --output tsv
Get 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_HOST
in the Docker Compose to have be the IP address from the previous step:ALLOWED_HOSTS=<ip-address-from-previous-step>
MSAL_HOST
value to the IP address from the previous step:export MSAL_HOST=<ip-address-from-previous-step>
Redeploy the applications:
docker compose up
Open the Swirl URLs
You should now be able to go to the following URLs to use the installed Swirl application:
http://<ip-address>:8000/swirl
http://<ip-address>:8000/galaxy
Open the Containers in Azure
swirl-search-org-dev-2
below):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
admin
account password immediately: https://docs.swirl.today/Admin-Guide.html#changing-a-super-user-passwordBeta Was this translation helpful? Give feedback.
All reactions