Azure
You can easily deploy gecholog
in your own Azure subscription. The recommended method is to use our One-click deployment to set up a pre-configured gecholog
container, storage for logs, and a powerful Azure Log Analytics Dashboard. Our deployment template is publicly available on GitHub and is easy to customize for expert users.
It is also possible to deploy gecholog
as a Standalone container on Azure.
"One click"-deployment
1. Click to deploy
2. Create a new resource group with a name of your choice, something like gecholog-eval
3. The AISERVICE_API_BASE
url
Add your AISERVICE_API_BASE
to the deployment form.
4. Proceed to Deploy
Review and create the deployment. Within a few minutes, all the resources will be deployed, and the gecholog
container will be connected, up, and running.
What's included in the deployment?
The deployment consists of:
- A pre-built but customizable
gecholog Dashboard DevOps
. - The standard
gecholog/gecholog:latest
container from the public Docker Hub repository. - An Azure Log Analytics workspace for ingesting logs.
- An Azure Storage Account.
Send your first api calls via gecholog
The Azure "One-click" deployment utilizes managed Azure Container Instances (ACI) to host the gecholog
container. ACI is configured to generate a fully qualified domain name (FQDN) for the container's endpoint, allowing immediate use of the gecholog
service. Locate the FQDN
of the gecholog
container in the Overview
section:
Follow the steps from Test You Configuration to send your first API call via gecholog
. It can look like this if you use Azure OpenAI:
setx OPENAI_API_KEY "your_api_key"
setx DEPLOYMENT "your_azure_deployment"
export OPENAI_API_KEY=your_api_key
export DEPLOYMENT=your_azure_deployment
Make the request
curl -X POST ^
-H "api-key: %OPENAI_API_KEY%" ^
-H "Content-Type: application/json" ^
-d "{\"messages\": [{\"role\": \"system\",\"content\": \"Assistant is a large language model trained by OpenAI.\"},{\"role\": \"user\",\"content\": \"Who are the founders of Microsoft?\"}],\"max_tokens\": 15}" ^
http://gecholog-y0urun1qu3url.northeurope.azurecontainer.io:5380/service/standard/openai/deployments/%DEPLOYMENT%/chat/completions?api-version=2023-12-01-preview
curl -X POST -H "api-key: $OPENAI_API_KEY" -H "Content-Type: application/json" -d '{
"messages": [
{
"role": "system",
"content": "Assistant is a large language model trained by OpenAI."
},
{
"role": "user",
"content": "Who are the founders of Microsoft?"
}
],
"max_tokens": 15
}' "http://gecholog-y0urun1qu3url.northeurope.azurecontainer.io:5380/service/standard/openai/deployments/$DEPLOYMENT/chat/completions?api-version=2023-12-01-preview"
Replace gecholog-y0urun1qu3url.northeurope.azurecontainer.io
with your FQDN
.
Powerful Dashboard
One of the resources deployed is the pre-built yet customizable gecholog Dashboard DevOps
. This is an Azure Log Analytics Workbook featuring a set of pre-made charts:
- Count Histogram
- Consumption Statistics
- Token Consumption Histogram
- Average Duration Histogram
- Duration Distribution
- Processor Executions
- Transaction Finder
Selecting different time periods and slicing the data by various fields is straightforward using the workbook parameters at the top.
Example of visualizations in the Dashboard:
Patience with azure log analytics
Azure Log Analytics will automatically generate a custom log table named gecholog_CL
. This should appear within a few minutes after your first API call is processed through gecholog
. However, the creation of the index and custom fields can take some time. Until the index is fully established, the dashboard will not render. In rare cases, we have observed delays of up to 120 minutes from the time of the first API call. A notable advantage of Azure Log Analytics is its ability to add new fields as they are received. This flexibility can be quite beneficial compared to other log analytics tools with more rigid initial schemas. However, it's important to note that the time from when a new field is created to when it becomes available in the schema can sometimes be lengthy.
Gecholog storage account
The gechologstorage
storage account contains two fileshares, each mounted to the gecholog
container.
The conf
file share is mounted to the /app/conf
directory within the gecholog
container. This setup provides a straightforward method to access all gecholog
configuration files. For the monitored configuration files (see Automatic updates) just update the configuration files and hit save to active your new settings.
The log
file share is mounted to /app/log
. This is the destination where nats2file
writes the logs. You have the option to download these logs, establish a backup routine, or use this fileshare for third-party log file ingestion.
Updating a configuration
Prerequisites
- An Azure Subscription.
- Registration of the Microsoft.insights Resource Provider.
- Authorization to execute deployments from a template.
- Authorization to create a new resource group.
- Access to the following services in your chosen region:
- Storage Account & file shares
- Log Analytics Workspace
- Log Analytics Workbook
- Azure Container Instances
Azure CLI Deployment
You can deploy the new-gecholog-resource-group.json
package using the Azure CLI, which is especially useful if you wish to modify the template before deployment. Below is a brief guide on deploying the resources using Azure CLI. To access to both the ARM
and .bicep
templates, visit our GitHub resources page.
1. Create a parameters.json
File
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"aiServiceApiBase": {
"value": "http://your.openai.azure.com/"
},
"natsToken": {
"value": "changeme"
}
}
}
2. Download the ARM template
-
Use the following link to download the ARM template. Right-click and select Save link as...
Gecholog ARM template on github -
Save the file as
new-gecholog-resource-group.json
on your local machine.
3. Deploy using Azure CLI
az deployment group create --name gecholog-deployment --resource-group gecholog-eval --template-file new-gecholog-resource-group.json --parameters @parameters.json
NOTE: On our Github page you can also find a
new-gecholog-resource-group.bicep
file for the same deployment.
Deploying gecholog
into an existing resource group
If you want to redeploy only the gecholog
container, for example if you want to redeploy a newer image or change any of the environment variables (environment variables cannot be changed after deployment) this can easily be achieved using Azure CLI. Use the gecholog-container-only.bicep
available on GitHub and run
az deployment group create --name redeploy --resource-group <resourceGroupName> --template-file gecholog-container-only.bicep