0
votes

We use Azure Pipeline to implement our Continuous integration pipeline. The app is deployed in virtual machines that we need to provision and configure. There are tones of libraries, patches , configurations , and applications that we need to deploy on the target VM before we get our code into those.

The question is what is the best tool to provision and configure these virtual machines? I was thinking of using Ansible AWX. Basically Azure Pipeline would make a call to the AWX API, which would then take it from there and finalize things.

There is an Azure Pipeline Extension that allows me to execute a playbook https://github.com/microsoft/azure-pipelines-extensions/blob/master/Extensions/Ansible/Src/readme.md. But I would like to use AWX instead so that my ansible/deployment code is decoupled from my pipeline.

Any suggestions?

2
Hi @Billy Billy. Is there any update about this ticket? You could check if the answer could give you some help. Feel free to let me know if you have questions. Just a remind of this.Kevin Lu-MSFT

2 Answers

1
votes

As far as I know, Ansible allows you to automate the deployment and configuration of resources in your environment. It could meet your needs.

As you said, Azure Pipeline supports to run the playbook in the Ansible task(Ansible extension).

So I think you can directly complete the VM Configuration and Code Deployment in the azure pipeline.

If you want to separate these two steps, you can split them into two pipelines (VM configure and Code Deployment). To avoid confusion between configuration and deployment code, you can also split them into two repos.

On the other hand, if you run the playbook in the azure pipeline, the azure pipeline also supports adding tasks to change the parameters in the playbook(e.g. Replace Token).

Here is an operation guide about using Ansible in Azure Pipeline.

By the way, if the Virtual Machine is Azure VM, you also could use ARM template to update the Azure VM resource.

0
votes

Personally, I would drop the AWX requirement. It's something else to manage and maintain and an entirely separate interface too. Instead, just do your whole pipeline in one place... azure devops. Pick one or the other. Tower doesn't have a built in source control, so I recommend ADO over it, but they'll both run ansible and they'll both do it on your own control nodes. There's no reason to take an extra step with another tool. It adds way too much complexity.