Most Popular

1500 questions
29
votes
2 answers

How to define variable in Jenkins declarative pipeline?

I defined variable in declarative Jenkins pipeline script but having issues with simple variable declaration. Here is my script: pipeline { agent none stages { stage("first") { def foo = "foo" // fails with…
Jay
  • 1,064
  • 2
  • 12
  • 21
29
votes
2 answers

How to have multiple log streams in docker

We have an application that writes three types of logs into three separate files: access logs, generic application logs and system logs. The format (and purpose) of these logs are very different. And we have separate logforwarders that send them…
SztupY
  • 1,597
  • 1
  • 16
  • 18
29
votes
5 answers

What are immutable servers?

There are some questions about immutable servers, such as: How to implement the immutable server pattern without loosing the ability to do post-mortems? What role do Configuration Managment tools play in immutable infrastructure? It seems obvious…
Pierre.Vriens
  • 7,225
  • 14
  • 39
  • 84
29
votes
2 answers

How to use cloud-init with Terraform?

I am working with Digital Ocean and Terraform and I already can automate the domain, subdomain, network preferences and the host but there is a section called User data that looks like this: The description of that field says Allows the use of…
Gepser Hoil
  • 1,312
  • 1
  • 15
  • 19
28
votes
3 answers

Set a Jenkins job to not to clone the repo in SCM

I have integrated Jenkins with Bitbucket using the Bitbucket Plugin. As per the plugin's Wiki, a given job will be triggered if the repository is set in the SCM of the job. As you know, if one set SCM in a Jenkins job, this is cloned in pre-build…
Héctor Valverde
  • 383
  • 1
  • 3
  • 8
28
votes
5 answers

How to clean up orphaned AWS EC2 snapshots?

We end up with a fair amount of AWS EC2 snapshots where the AMI has been deleted, but the snapshot is left behind to rot. I'd like a non-manual way of identifying and deleting these orphans to save us money and space. Ideally I'm thinking a bash…
Alex
  • 4,612
  • 6
  • 29
  • 49
28
votes
2 answers

Why use EXPOSE in Dockerfile -- since you can bind to all ports anyways

I can docker run -p 3000:3000 image without EXPOSEing that port in the container (see below). If that's true, then why bother putting EXPOSE in the Dockerfile? Is it just for communication to image users? Because I don't know of a functional reason…
Alexander Bird
  • 395
  • 1
  • 3
  • 6
28
votes
7 answers

How to create the smallest working docker image every time?

Aim: to create the smallest working docker images every time Current REPOSITORY TAG IMAGE ID CREATED SIZE a-docker-image latest x 42 minutes ago 1.92 GB Attempt Adding a cleanup…
030
  • 13,383
  • 17
  • 76
  • 178
28
votes
5 answers

Is DevOps restricted to companies with SaaS products?

The practices describing DevOps, such as continuous delivery, automation, etc. are relevant to products that provide continuous service, such as SaaS products. For example, a software development company that mostly does projects for other clients…
Evgeny Zislis
  • 9,023
  • 5
  • 39
  • 72
28
votes
4 answers

How to have multiple git repos in an Azure DevOps project?

My organisation uses Azure DevOps and we want to use git as our repo. But, Azure projects seem to only allow one git repo per project. This is bizarre to me! Projects and repos are usually separate. One project may involve development on several…
JohnFF
  • 443
  • 1
  • 4
  • 7
27
votes
4 answers

What is an artifact (or artefact)?

The question about "What is an artifact repository?" contains an answer with an interesting explanation about the repository part of it. And from reading the entire answer, I am not sure what exactly an "artifact" means in the context of DevOps. Any…
Pierre.Vriens
  • 7,225
  • 14
  • 39
  • 84
27
votes
4 answers

What are some methods to measure the ROI for DevOps?

DevOps is complex, and involves many non-deterministic aspects like culture and process. What are some ways to measure DevOps initiatives for success? How do you prove to a business that the investment they have made is returning (or saving) real…
Dave Swersky
  • 4,068
  • 2
  • 21
  • 33
27
votes
4 answers

What is a container?

There are some questions about containers, such as: What role do Configuration Managment tools play in immutable infrastructure? Which problems does a container orchestration solve? Simple CI/CD Containers in AWS My questions: What is actually a…
Pierre.Vriens
  • 7,225
  • 14
  • 39
  • 84
26
votes
1 answer

Ansible: What's the difference between task, role, play and playbook?

Ansible has tasks, roles, plays and playbooks. Are those just names for different levels in a playbook organization? If not, how, exactly, do they differ from and relate to each other?
caxcaxcoatl
  • 833
  • 1
  • 8
  • 12
26
votes
5 answers

How does continuous integration relate to continuous delivery / deployment?

Here is a quote from the current content of continuous-integration: ... process of merging developer's working code copies to a shared codebase frequently to prevent or minimize integration problems. OK, I get that. But then there is also…