infra-as-code | Instalação e configuração de serviços de infraestrutura com
kandi X-RAY | infra-as-code Summary
kandi X-RAY | infra-as-code Summary
Descrição: Instalação e configuração de serviços de infraestrutura com Terraform e Ansible.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of infra-as-code
infra-as-code Key Features
infra-as-code Examples and Code Snippets
Community Discussions
Trending Discussions on infra-as-code
QUESTION
I can use two ways to Create a new system, or re-create a system upon failure:
Always deploy a system using Ansible playbook. the drawback is 1) slow; 2) and the deployment may fail because the package which should be downloaded from open-source repository have been changed/removed sometimes.
Temporarily launch a new EC2 and deploy the EC2 using linux command (it is much faster than writing infra-as-code using Ansible); create an AMI image from the EC2; and later on we always use the AMI to create or recreate systems.
I feel 2. is faster and easer, then why we ever need Ansible (or Chef/Puppet) at all?
...ANSWER
Answered 2020-May-14 at 17:21Well, I don't know why people get upset about this question. I think it's a fair question to ask. Here are my thoughts and things that I want to point out. Feel free to discuss this in the comments section.
Ansible is slow
Yes, I agree. If you deploy a large and complex system, it can easily take Ansible playbooks dozens of minutes if not hours to run.
Ansible playbook may fail because the package which should be downloaded from open-source repository have been changed/removed sometimes
You don't need to worry about this too much. Chances are it rarely happen. Linux package managers pull from these open-source repos frequently everyday. This has never been an issue, and not to mention these repos are very well maintained and a breaking change like this is unlikely. So I don't think this should count as an Ansible drawback.
Managing AMIs is faster and easier
This is only true in a small scale. If you only have serval dependencies in your environment, it's probably not worthwhile to write everything in IaC and maintain them in version control. However, as systems grows, more complexity needs to be added. You will quick find the IaC approach handy. It allows all changes to the infrastructure to be recorded in the SCM. It enables different developers to work on same infrastructure in parallel etc etc. I can probably tell you a thousand advantages of IaC compared to doing it by hand in AMI. Again, this all depends on your scale. The best approach is the one that fits your need.
Hope this helps.
QUESTION
I am building a Jenkins infrastructure using infra-as-code principles. As part of this, I am pre-populating the credentials.xml configuration of Jenkins to include some global credentials.
I populate this xml file using Ansible during the launch of the infrastructure. Once rendered, the file is pushed to the Jenkins Home Directory. See example below:
...ANSWER
Answered 2019-Mar-18 at 22:08I managed to mask the credentials by placing a groovy script in the $JENKINS_HOME/init.groovy.d/
directory. The script creates a dummy user (as I did using the console) at the Jenkins startup which, consequently, masks all the pre-populated credentials. The script is
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install infra-as-code
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page