Skip to main content
53 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
16 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
  • 1,025
9 votes

How to achieve a smooth transition from “the one big VCS repository for all products” organisation model to the “many small VCS repositories” model?

It is a fascinating question for which real answers may not actually exist; I appreciate that while you tried to keep the question contextualized on the VCS, it naturally scaled by itself up to ...
ᴳᵁᴵᴰᴼ's user avatar
6 votes

How to structure DevOps related code and configs in a code repository?

I can answer bout docker, one of the best practice to use docker is to keep the docker file and the compose files in the same repository of the project, so wherever you clone the project you can build ...
Wissam Roujoulah's user avatar
5 votes
Accepted

Organizing Chef cookbooks

No, it is not, the chef-repo is the legacy way back to chef 10. Knife allows working on multiples directory with the -o option. Berks work from current directory. You can also work around the ...
Tensibai's user avatar
  • 11.4k
4 votes

How to structure DevOps related code and configs in a code repository?

Each tool's code goes into its own repo. for e.g Jenkins Groovy template into a Jenkins repo Ansible YAML playbooks in its own repo (with the roles , tasks , inventory sub directories Cloudformation /...
Ameen Ibrahim Raffic - 'AIR''s user avatar
4 votes
Accepted

How to structure DevOps related code and configs in a code repository?

The current organisation of the code and configuration you describe is structured by the technical solutions involved. This is a bad design that will add a lot of overhead in our maintenance ...
Michaël Le Barbier's 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 ...
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

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

Docker preserve images policy

I do not believe that there is a way to set this as a global policy. However, there is a simple command you can run that will "prune" or remove your unused images. You will want to use docker image ...
Wesley Rolnick's user avatar
3 votes

How to structure DevOps related code and configs in a code repository?

Making a distinction between Ops, Dev and DevOps promotes isolation and enforces a "throw it over the wall" mindset. To increase cooperation between teams one should put everything in a repository ...
030's user avatar
  • 13.3k
2 votes

Make use of CIs as Maven Repository in order to use it for building Docker images without including dependencies

Docker images are after all VM templates, i.e. they have to be more or less self-contained: you get the image, you run the environment with all the dependencies. To approach the challenge ...
Ta Mu's user avatar
  • 6,782
2 votes

Best way of binary repository for .NET projects

It is wise to think about package management early on. There are multiple options in terms of package management. The 2 largest are jFrog Artifactory and Sonatype Nexus. Both offer support for ...
Kevin's user avatar
  • 129
2 votes

Best way of binary repository for .NET projects

I'd recommend ProGet. If you're familiar with Artifactory you might find this comparison helpful: https://inedo.com/support/kb/1115/a-comparison-artifactory-vs-proget
Karl Harnagy's user avatar
2 votes

How do I bootstrap an alpine image to work with a private repo proxy behind TLS?

It turns out that /etc/ssl/cert.pem is the bundle scanned by apk to verify a repo behind HTTPS, so the following works: wget our.cert.server.com/CA.crt cat CA.crt >> /etc/ssl/cert.pem sed -i 's,...
LLlAMnYP's user avatar
  • 285
2 votes

Best practices for app and infrastructure code repositories

Personally I would always separate out the pure IaC code in a different repository. The only "Ops" related thing that should reside in the application repository should be Makefiles, Docker-...
0xE02B7's user avatar
  • 21
1 vote
Accepted

Why should we apply `flannel" after installing Kubernetes?

Flannel is Container Network Interface (CNI) Basically, CNI will help your pod or container in your cluster can communicate each other. You can read more at the link above. About kubectl taint command....
Raymond Bao Ly's user avatar
1 vote

One or multiple git repositories for independent small parts of one larger project?

This is something I also struggle with. I can tell you from experience it depends on the type of application and the tech stack being used. The short easy answer is that having everything in one repo ...
Levi's user avatar
  • 1,064
1 vote

Using cached dependencies for pipelines in Azure Devops

I made it work like this: variables: MAVEN_CACHE_FOLDER: $(HOME)/.m2/repository MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' trigger: - master pool: vmImage: 'ubuntu-latest' steps: ...
Wim Deblauwe's user avatar
1 vote

Using cached dependencies for pipelines in Azure Devops

I forgot to add a MAVEN_OPTS variable in mavenOptions: mavenOptions: '-Xmx3072m $(MAVEN_OPTS)' My pipeline.yml stayed like this: trigger: - master pool: vmImage: 'ubuntu-latest' variables: ...
danilo's user avatar
  • 141
1 vote
Accepted

Docker preserve images policy

So I ended up using this simple shell script docker images -q --filter "before=ecr.us-east-1.amazonaws.com/myapp:02e56bac4ee3f27a4d5670a6ac0d578e3dd5b2e5" | xargs docker rmi --force First you filter ...
Most Wanted's user avatar
1 vote

Auto-scaling, how to securely get code from private repo

If the repo is on AWS Codecommit, you should be able to access it via a role setup for each type of instance. See under IAM role here https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-...
jdog's user avatar
  • 650
1 vote

Auto-scaling, how to securely get code from private repo

Another option is to use saltstack's product: salt This Configuration Management System (CMS) can protect sensitive data in three ways. 1) Pillars; these are securely stored and encrypted key:value ...
Alan-Cugler's user avatar
1 vote

Auto-scaling, how to securely get code from private repo

Option 1: You could place your private repo in the same VPC as the instance and then pull code from there. Just make sure the repo cannot be accessed from outside the VPC. Option 2: Ssh into the new ...
M. Oberauer's user avatar
1 vote
Accepted

Are there any truly simple artifact repositories?

I didn't find anything that was exactly what I was looking for; simple zip/tar and even dpkg didn't have the traceability I was hoping for in a binary-artifact system, so I wrote my own: see https://...
GaryO's user avatar
  • 141
1 vote

Are there any truly simple artifact repositories?

You can always fall back to scp, sftp or the like, i.e. command-line based upload/download. Tags can be done with symlinks, and you don't get advanced metadata, but still.
AnoE's user avatar
  • 4,906
1 vote
Accepted

Git Repository Manager conditionally deny pull request

Most repository managers have some way of implementing this. GitHub (and GitHub Enterprise) has the idea of statuses on a commit; you'd set up a webhook that pings your tool's webserver when a commit ...
Xiong Chiamiov's user avatar

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