-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert ansible to dockerfile #1727
Conversation
72e8b77
to
49523c9
Compare
49523c9
to
9a709f5
Compare
9a709f5
to
3d04729
Compare
scripts/devstack.sh
Outdated
@@ -0,0 +1,31 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# Ansible managed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this line should be removed
RUN chown credentials:credentials "$CREDENTIALS_APP_DIR/devstack.sh" && chmod a+x "$CREDENTIALS_APP_DIR/devstack.sh" | ||
|
||
# placeholder file for the time being unless devstack provisioning scripts need it. | ||
RUN touch ${CREDENTIALS_APP_DIR}/credentials_env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be moved to the dev target
Dockerfile
Outdated
|
||
COPY scripts/credentials.sh "$CREDENTIALS_APP_DIR/credentials.sh" | ||
|
||
#CMD ["gunicorn", "--workers=2", "--name", "credentials", "-c", "/edx/app/credentials/credentials/credentials/docker_gunicorn_configuration.py", "--log-file", "-", "--max-requests=1000", "credentials.wsgi:application"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Remove the old comments from the file
RUN adduser --disabled-login --disabled-password credentials --ingroup credentials | ||
|
||
|
||
RUN mkdir -p "$CREDENTIALS_APP_DIR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to explicitly call the mkdir
command here as specifying WORKDIR ${CREDENTIALS_CODE_DIR}
would make all the directories that precede the code dir path
FYI, we will take a look a this next week. |
FYI @mumarkhan999 we have a ticket in our sprint starting Monday to review this. |
LGTM, I'll merge 👍 |
Hi @hurtstotouchfire @Tj-Tracy , The epic related to this PR is still in discovery work and we are getting a lot of input from SRE and Arch side, hence this wasn’t supposed to be merged right now. According to the input we received we need to do some changes:
This PR failed on the master branch as we didn’t have a build target in our new dockerfile but CI workflow was trying to push the build target. Now I've created a new PR #1782 |
@mumarkhan999 appreciate the followup 👍 sorry for the early merge. |
ISSUE: openedx-unsupported/devstack#962
This PR is part of effort aimed at removing Ansible based configurations and replacing them with Dockerfile. Currently Devstack Docker images are built using Ansible based configurations in the configurations repository. Through this effort we will make sure that the Repo has its own Dockerfile which has all the necessary configurations to setup small production and dev environments.
Steps to run this Image with Devstack:
dev
i.e.docker build -t image-name-of-choice --target dev .
docker compose
file ofdevstack
and replace the existingregistrar
image with the one that you built without changing any other configurations there.make dev.up.credentials
in the terminal while in the devstack directory.