-
Notifications
You must be signed in to change notification settings - Fork 20
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
adding gunicorn instead of uwsgi and modifying the base image. #362
base: master
Are you sure you want to change the base?
Conversation
…the new python 3.9
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
…m 8000 to 80, and changed the base image to point to the "quay" repo
…lways set gunicorn to run as user "nobody"
…it was causing issue. Also, changing the base image.
…ed by changing where the "git" command runs. I also had to install postgresql-devel in the runtime image so "local_settings" can be imported.
Feat/base image
Please find the ci env pod logs here |
Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
Dockerfile
Outdated
FROM quay.io/cdis/python-build-base:${AZLINUX_BASE_VERSION} AS base | ||
|
||
# Comment this in, and comment out the line above, if quay is down | ||
# FROM 707767160287.dkr.ecr.us-east-1.amazonaws.com/gen3/python-build-base:${AZLINUX_BASE_VERSION} as base |
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.
is there a reason we're not preferring ECR?
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.
So that community may be able to build/ develop and I belive ECR has a bandwidth cost, while quay is free.
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.
ahh, that makes sense 👍
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.
is that acceptable for our own internal usage? Or do we need some way to automate flipping that to ECR as part of build?
Dockerfile
Outdated
USER gen3 | ||
|
||
|
||
RUN python -m venv /venv |
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.
so poetry install
will create a venv automatically when you install. And in fact, we're explicitly setting https://python-poetry.org/docs/configuration/#virtualenvsin-project, so it should be deterministic where the venv gets created. So as long as you run all future commands you want within the env with poetry run ....
then it should just work.
I don't think we need (or want) any other venv setup or activation outside of the stock poetry support. It could create some confusing differences
Dockerfile
Outdated
## For local development | ||
# FROM quay.io/cdis/python-nginx-al2:feat_python-nginx AS base | ||
|
||
FROM 707767160287.dkr.ecr.us-east-1.amazonaws.com/gen3/python-nginx-al2:feat_python-nginx as base |
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.
let's follow the warning and fix The 'as' keyword should match the case of the 'from' keyword
docker-compose.yaml
Outdated
@@ -0,0 +1,36 @@ | |||
version: '3.8' |
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.
per previous conversations, I'd like to remove these separate ideas around local dev improvements to speed up the approval and review of the base image upgrades. We can have a separate PR and discussions to talk through ideas like this
pyproject.toml
Outdated
@@ -21,13 +21,13 @@ gen3authz = "^1.0.4" | |||
hsclient = {git = "https://github.com/uc-cdis/hsclient", rev = "1.0.0"} | |||
indexclient = "^2.1.0" | |||
jsonschema = "^3.2" | |||
psycopg2-binary = "^2.7" | |||
gunicorn = "^22.0.0" |
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.
If we are not blocked from upgrading beyond these versions, I'd like to get in the habit of specifying >= rather than the default ^. If things break, we'll see it in unit tests and either update so the newer lib works, or at that point we'll restrict the versioning and create a ticket to upgrade.
As it is, we'll never automatically try to update to new major versions.
So, even though the other deps aren't like this yet, we could replace all ^ with >= at least with the new deps.
If you're feeling adventurous, we could try everything else too. With the exception of sqlalchemy, which I know won't work b/c 2.0 requires updates
Please find the detailed integration test report here Please find the ci env pod logs here |
Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
I am removing uwsgi to be replaced by gunicorn and making modifications to use the new python3.9 base image. I had to make some modifications for indexd to be compatible with the AL2 base image.