28 votes

Best practices for app and infrastructure code repositories

The correct answer, like almost everything in IT, is, "it depends." It depends on the way you work, the type of company you are working for, your requirements, your non-functional ...
user avatar
12 votes
Accepted

What is "Infrastructure as Code"?

TL;DR: Infrastructure as Code is a way to automate and backup your environment. In ideal case, after a disaster, you could restore your Infrastructure fully and automatically by Provisioning new ...
user avatar
  • 5,627
10 votes

Best practices for app and infrastructure code repositories

Structuring application code, application configuration and infrastructure in Git repositories is sometimes not the easiest thing to do, and there are not a single correct solution, instead it ...
user avatar
  • 925
7 votes
Accepted

What are ChatOps approach use cases of production infrastructure management?

ChatOps is an absorbing topic; practically it means something very different to each team using it. So much so that Atlassian have put together what could be considered to be a Chat maturity model. ...
user avatar
6 votes
Accepted

How to apply using Terraform to launch multiple EC2 Resource with different configs (VPC not maintained by TF)

You can use a remote backend as a data source. That is working well for us thus far but this project is not very mature and we will likely refactor a time or ten. data "terraform_remote_state" "...
user avatar
6 votes
Accepted

Infrastructure as code and TDD

In short, I see two categories of tests for your infrastructure: 1) does it have everything you need to run your application and 2) does it not have any superfluous stuff. First and foremost, you can ...
user avatar
  • 4,716
6 votes
Accepted

How should we automatically rebuild immutable infrastructure when new packages are available?

Part of adopting the Immutable Infrastructure Pattern is decomposing your system into small manageable pieces that can move through CI/CD Pipeline very quickly, this means that OS patches can be done ...
user avatar
5 votes
Accepted

DevOps tools and automation of manual processes

Alright... you're not going to implement every tool or automation at the same time, as some of them have quite deep impact on your development processes (and I daresay, development culture). Take a ...
user avatar
  • 4,716
5 votes

AllowedPattern for emails in Cloudformation template

Important Since AWS CloudFormation templates use the JSON syntax for specifying objects and data, you will need to add an additional backslash to any backslash characters in your regular expression, ...
user avatar
  • 525
5 votes

What is "Infrastructure as Code"?

Before explaining what it exactly is, let me quote a really nice definition, straight from Wikipedia: Infrastructure as Code (IaC) is the process of managing and provisioning computing ...
user avatar
  • 2,756
5 votes

How to reconcile Infrastructure as Code and not storing env config in code?

There are, as always, a few ways to solve this. You can use a central source to keep secrets that each server reads from ala Hashicorp Vault. While popular this is not my preferred approach as its ...
user avatar
  • 735
5 votes

How to automate initial server configuration?

What you are trying to accomplish is referred to as infrastructure as code. Which tools you select will depend on where you are operating, and what your business needs are. If you are operating in ...
user avatar
4 votes
Accepted

How to Chef things that don't exist yet

I'd go with node.run_state to store a transient variable in a run and define it in a ruby_block so it happens at converge time, something like this: yum_package 'somepackage' ruby_block 'set myvar' ...
user avatar
  • 11.1k
4 votes

DevOps tools and automation of manual processes

Hi and welcome to DevOps SE! While DevOps is not self-purposed, maybe it is worth to step back for a moment to find out the actual problem before trying out solution. As you have asked a more or ...
user avatar
4 votes
Accepted

How to organize infrastructure as code projects?

The layout of your repository depends in many ways upon the context you are developing the automation in. If, for example, you are building out the infrastructure for a product as part of a product ...
user avatar
4 votes
Accepted

What approach should I take to store environment variables for a repo?

General Notes I don't really understand this one: However, this seems clunky, as I have to create the logic to read this file in every script that is made. You can source all variables from a ...
user avatar
3 votes
Accepted

How to "inject" AWS Lambda code into a CloudFormation?

You've got a couple of options: 1. Embed the source code to the CloudFormation template I do just that in my ec2-start-stop demo. You'll see file ec2-start-stop.template.yml with these lines: ...
user avatar
  • 971
3 votes

DevOps tools and automation of manual processes

I've been responsible for setting up DevOps processes in two companies from scratch so hopefully this will help. Others have asked questions about business objectives but I'm going to give you a ...
user avatar
3 votes
Accepted

If we are using containers do we still need to worry about configuration management at an infrastructure level?

It depends on what you are willing to rent and allow to be managed by someone else. If we look at this diagram: It shows a full range of options. At one end is Do It Yourself with on-prem hardware ...
user avatar
  • 1,162
3 votes

If we are using containers do we still need to worry about configuration management at an infrastructure level?

Welcome to containers, a very exciting direction indeed. Software configuration management tools such as the ones you mention do cater for containers in many ways and if you're already familiar with ...
user avatar
3 votes

How to handle large deployments using tools like gitlab and docker

The documentation shows that you can have 40+ branches with different configurations. You express concern that the configuration becomes large. With a good editor that isn't really a problem. Yet that ...
user avatar
  • 1,162
3 votes

Open source private cloud VM provisioning for container workload

"best suited" is the question. How do you measure this? what are the metrics and why do you choose them? I think you are looking for some kind of "tools combination", earlier tested on production by ...
user avatar
  • 201
3 votes

Configuration Management Tools and Rollbacks / Approaching Immutable Infrastructure

You hint in the title about immutable infrastructure, so it sounds like you already know the solution: don't change existing servers, but bring up new ones with your changes, switch over to them, and ...
user avatar
3 votes

Best practices for app and infrastructure code repositories

It is definitely advantageous for CICD since you can ship dependent infra and app code changes together, instead of having to manually synchronize it. This means you can run tests that also cover the ...
user avatar
3 votes
Accepted

Is it possible to have an aws EKS infrastructure as code?

Is it possible to declare "a complete production level EKS with other aws services" using terraform? Yes, and that is what many larger organizations do. I have implemented Kubernetes with ...
user avatar
  • 925
3 votes
Accepted

Why use configuration management tools in the world of modern cloud?

What value does Ansible have in a modern cloud environment? As the comments say, it depends on your needs. But I think there is value in considering this sort of thing, so I'm going to answer this ...
user avatar
  • 1,728
3 votes

Why use configuration management tools in the world of modern cloud?

Generally, things like Packer and Terraform handle most straight infra requirements best in the cloud. Of course, if you have kubernetes up already, it’s the same deal. A packer (or other AMI) image ...
user avatar
2 votes

How to reconcile Infrastructure as Code and not storing env config in code?

This is a common problem in configuration management, and while I can't speak for Chef as I haven't worked with it, I can tell you how this is solved by both Puppet and SaltStack. Firstly, this ...
user avatar
  • 3,674
2 votes

What are ChatOps approach use cases of production infrastructure management?

A prime use-case for Enterprise IT would be to reinvent their process for handling Major Incidents (sometimes called "Incident War-room") by utilizing the ChatOps practice. I've captured this and ...
user avatar
2 votes

How to Chef things that don't exist yet

The specifics depend on the exact use case. If the value is only used as a property on another resource, you would use the lazy helper method. If you don't need the output, you would use the execute ...
user avatar
  • 1,197

Only top scored, non community-wiki answers of a minimum length are eligible