Can you use it to incorporate Azure APIM deployments in a pipeline ?
I have an existing API Manager instance which now hosts many different API’s, all of which have been created and configured manually.
I need to be able to manage individual API’s without affecting anything pre-existing and, in the first instance, without having to bring those APIs into an automated process.
You cannot do this in any sensible manner with ARM Templates, I have tried. Terraform does seem to contain the necessary AzureRM functions to make a better job of it.
For another project I have created a containerised DevOps build agent with Terraform installed upon it, so I can use that for this project.
I want to deploy individual APIM APIs from the repositories that they use. For the most part, an API is a front end to a collection of logic/function apps. I want the API to be controlled and managed as a part of that project/repository and its build pipelines.
I don’t want any individual API deployment to affect other API’s or the APIM framework. The deployment and configuration of the actual APIM its self is currently manual but will eventually also be deployed automatically.
Can I Do This ?
I don’t know yet, I expect so. I will post here as the journey unfolds.
We have recently added new chat functionality to our companies website using an open source project called Live Helper Chat, it is an excellent piece of software which allows customers looking on our website to talk directly to our Customer Service Team.
This project was undertaken at pace, the project manager made use of the fact that there is a Bitnami Virtual Machine in Azure for Live Helper Chat that they could install with a single click directly into the production environment.
This enabled us to get the new chat functionality up and running very quickly. In the longer term it did create some challenges
- Various configuration changes were made to the virtual machine to allow it to meet our security requirements
- Various configuration changes were made to the application to provide the functionality we require for our customers and customer services team
- The VM runs MySQL as well as the web application and yet our systems architecture team call for it to be high availability and resilient
- The IG team require the database to be backed up
- Future work is envisioned which may require changes to the configuration or code
- The Live Helper Chat application is updated frequently and we want to keep up with the latest updates where possible
The first challenge is that we had no way of immediately replicating the production set up anywhere else short of cloning the VM into other environments. The lack of the system in any other environments means it is impossible to test any changes.
Using Terraform / Ansible to Deploy An Azure VM
We use DevOps to deploy our solutions for everything else, so I wanted a pipeline in DevOps which could do the following
- Create an instance of the Bitnami Live Helper Chat in a designated subscription/resource group
- Provide the network related artefacts which are normally created when you create a Bitnami VM in Azure
- Apply the post deployment configuration to the Bitnami VM
- Import a baseline MySQL database to provide the application with enough functionality for it to be useable, user accounts etc
- Deploy a test website which incorporates the Live Helper Chat widget so that people can use it as they would use the production system, for testing and demonstration purposes primarily
There are a variety of tools I could have used, these are the ones I have chosen
- Terraform to configure the Azure Resource Groups and create an instance of the VM and associated network artefacts
- Ansible to deploy the post deployment configuration to the VM and import the baseline database
- Azure Storage Account web hosting for the test website
- DevOps Build/Release pipelines to orchestrate the above
- DevOps git repository to hold all of the code for this process