hackoregon / devops-17

deployment tools for Hack Oregon projects
4 stars 3 forks source link

What problems does the extra directory level create for DevOps? #30

Closed MikeTheCanuck closed 7 years ago

MikeTheCanuck commented 7 years ago

Most projects currently use the pattern of using an "application directory" at the root of the repo to "contain" all application code, and I've heard it asserted this is the dominant and preferred pattern.

e.g. in the team-budget backend, (/budget_proj) contains all the application code including the app & proj directories (/budget_proj/budget_app and /budget_proj/budget_proj) as well as files such as manage.py.

@pdxdiver has said in passing that having the extra folder level in a repo causes extra problems for the DevOps work, and that from a devops point of view, we should prefer to eliminate this extra folder level. Obviously those developers in favour of it want to know what problems it creates, and remain unconvinced that this is a problem without proof.

Dan, since you've originated this comment, please articulate any memories you have of issues you've run into in the previous season. If anyone else runs into additional issues, please do us all a favour and mark them down here (along with what workarounds if any you needed to deal with them).

MikeTheCanuck commented 7 years ago

Issue 1: requires us to host Dockerfile and docker-compose.yml in the subdirectory rather than the root directory of the repo.

Issue 2: requires a second requirements.txt file - in team-budget's Dockerize PR, we discovered that we require all the requirements to be spelled out not only in the usual /requirements.txt file but also in /budget_proj/requirements.txt.

sanjuroj commented 7 years ago

I'm coming from a position of profound ignorance on this, so take these questions for what they're worth:

Why is Issue 1 a problem? Is it just not normal practice or does it cause some sort of complications?

On issue 2, is it possible for the requirements.txt be listed only in the project directory? Does it need to be in the root directory as well?

pdxdiver commented 7 years ago

See https://github.com/hackoregon/backend-service-pattern