无法通过Azure Devops(VSTS)将Terraform与Ansible集成 [英] Unable to integrate terraform with ansible through Azure Devops(VSTS)

查看:154
本文介绍了无法通过Azure Devops(VSTS)将Terraform与Ansible集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以通过Azure Devops(VSTS)帮助将terraform与ansible集成.我想知道从地形到ansible的切换是如何发生的.

Can anyone help with the integration of terraform with ansible through Azure Devops(VSTS). I want to know how the handoff is happening from terraform to ansible.

谢谢

推荐答案

Microsoft的云解决方案架构师Elena Neroslavskaya在今年早些时候写了一篇关于此的博客:

Elena Neroslavskaya, a Cloud Solution Architect here at Microsoft, wrote a blog about exactly this earlier this year:

https://cloudblogs. microsoft.com/opensource/2018/05/22/cicd-azure-terraform-ansible-vsts-java-springboot-app/

Terraform版本,计划和构建基础结构. Ansible自动化提供了无代理方式管理服务器.它所需要的只是SSH连接和python安装.我们将使用Terraform在安装过程中提供的ssh密钥来配置VSTS代理. 在Azure上配置VM,并通过Ansible与配置的服务器进行通信.

为了使Ansible能够与VM通信,它必须知道服务器IP(以清单文件的形式提供). Terraform完成配置后,我们会将服务器IP输出到Ansible使用的文件中.

Terraform versions, plans and build infrastructure. Ansible automation provides agentless way of managing servers. All it requires is SSH connection and python installed. We will configure VSTS agent with the ssh key that is provided by Terraform during provisioning VMs on Azure and by Ansible to communicate to provisioned servers.

For Ansible to be able to communicate to VMs it has to know server IPs, provided to it in the form of inventory file. Once Terraform completes provisioning, we will output servers IPs into a file which is used by Ansible.


这篇关于无法通过Azure Devops(VSTS)将Terraform与Ansible集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆