Jason Haley

Ramblings from an Independent Consultant

An AZD Template for a Chainlit Azure Container App

An AZD Template for a Chainlit Azure Container App Late last year I was looking for an AZD template that uses Chainlit for a UI application and deploys to Azure Container Apps, but couldn’t find one … so now I’m working on building one. Chainlit OpenAI AssistantsAPI Azure Container Apps Starter This is a starter template that works with Azure Developer CLI (AZD) to create a Chainlit application and deploy it to Azure in a matter of minutes. The application code currently uses OpenAI and OpenAI Assistants API - I’m working on adding more functionality to it soon. The GitHub repository is here: chainlit-openai-assistantsapi-aca-starter. I’ve got the windows version of the README instructions out there, but haven’t updated the local environment steps for …

Quickstart: Deploy an existing container image to Container Apps using Bicep

Like my last post (Quickstart: Container Apps using Bicep), this post is a supplement to the existing Azure Container Apps docs and provides a Bicep walkthrough to getting started. Quickstart: Deploy an existing container image to Container Apps using Bicep Azure Container Apps is a serverless platform to run and orchestrate your container applications. In this quickstart, you’ll use Bicep to create a Container Apps environment with an existing container image stored in an Azure Container Registry. If you have not used Bicep yet or want to learn more about what it can do, I recommend going through the Fundamentals of Bicep learning path to get you started. Prerequisites An Azure account with an active subscription. If you don’t have one, you can create one for free. Azure CLI …

Quickstart: Container Apps using Bicep

This quickstart is a supplement to the existing Azure Container Apps docs and provides a Bicep walkthrough to getting started. Quickstart: Deploy you first container app using Bicep Azure Container Apps is a serverless platform to run and orchestrate your container applications. In this quickstart, you’ll use Bicep to create a Container Apps environment with the helloworld sample container image. If you have not used Bicep yet or want to learn more about what it can do, I recommend going through the Fundamentals of Bicep learning path to get you started. Prerequisites An Azure account with an active subscription. If you don’t have one, you can create one for free. Azure CLI Bicep tools Setup First you’ll need to sign in to Azure using the CLI (I typically use the device …

How to set environment variables in a Container App using the Azure CLI

Last month when I presented on Azure Container Apps, I was asked “How would you set an environment variable?”. Since it isn’t currently surfaced in the Azure Portal, I wasn’t sure. Container Apps is still in preview and right now the best way to access the largest amount of features is by using ARM or Bicep … but since it is new a lot of people start with the Portal or the Azure CLI to explore. In this short post, I want to capture how I should have answered the question during my demo. How can I pass environment variables to a Container App? If you look through the documentation, you can find an exmple of environment variables being set in the Manage Secrets Example page. In that example they are focusing on secrets, but since secrets get surfaced in the …

How to rollback a Container App revision using the Azure CLI

Earlier this month I posted How to rollback a Container App revision which focused on using the Azure Portal UI. In this entry I want to go over the same demo scenario using the Azure CLI. Prerequisites for this walkthrough are to follow the steps in the Quickstart first: Deploy your first container app (Azure CLI), and insert the following steps before the last Clean up resources step. Rollback a container app revision using the Azure CLI At this point you’ve created the Container App and verified the deployment in the browser, now let’s look at the list of revisions using the containerapp revision list command. In order to get a list of revisions that shows the same Name, Date Created, Provision Status, Traffic and Active columns shown in the portal, run the folllowing …

How to rollback a Container App revision

Last week I presented “A look at Azure Container Apps” to our local Azure user group. I was my first time presenting the topic and I’ll just say it wasn’t my best presentation (believe me - I’ve watched the whole recording). But anyway … during one of the demos a question came up about if it was easy to rollback a revision. I attempted to do perform a demo of how to do it, but the demo gods were not helping me last Thursday night. Today at lunch I tried it again, and of course it worked fine. This is a walkthrough of how it should have worked last week. Prerequisite for this walkthrough is to follow the steps in the Deploy your first container app (Azure Portal), but insert the following steps before the last Clean up resources step. Rollback a …