As of May 31, 2023, we have updated our Code of Conduct.
44 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 ...
Software Engineer's user avatar
13 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 is not a single correct solution, instead it ...
Jonas's user avatar
  • 965
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 ...
Jiri Klouda's user avatar
  • 5,757
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. ...
Richard Slater's 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" "...
TechDawg270's 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 ...
AnoE's user avatar
  • 4,846
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 ...
Richard Slater's user avatar
6 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 ...
Wesley Rolnick's 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 ...
AnoE's user avatar
  • 4,846
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, ...
mico's 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 ...
Dawny33's user avatar
  • 2,816
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 ...
Robo's user avatar
  • 745
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' ...
Tensibai's user avatar
  • 11.2k
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 ...
Ta Mu's user avatar
  • 6,782
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 ...
Richard Slater's 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 ...
John Humphreys's 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: ...
MLu's user avatar
  • 991
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 ...
Caledonia91's 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 ...
simbo1905's user avatar
  • 1,172
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 ...
spaceshipdev's 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 ...
simbo1905's user avatar
  • 1,172
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 ...
hakkican's user avatar
  • 221
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 ...
Xiong Chiamiov's 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 ...
Michael Pereira's 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 ...
Jonas's user avatar
  • 965
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 ...
chicks's user avatar
  • 1,828
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 ...
John Humphreys's user avatar
3 votes

How is 'self-healing' to be reconciled with Infrastructure as Code?

You do not specify any technology, but let me get an inspiration from one particular approach to this problem and maybe it can be then extended to other use cases. In AWS you have a load balancer (ELB)...
petrchpetr's 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 ...
James Shewey's user avatar
  • 3,704
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 ...
Oded Zilinsky's user avatar

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