Skip to content

Add support for local Docker images #1114

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

Merged
merged 8 commits into from
Jun 9, 2020

Conversation

RobertLucian
Copy link
Member

@RobertLucian RobertLucian commented Jun 8, 2020

Closes #1094.

When validating for the local provider, Cortex first checks if the Docker serving image is available locally and if it isn't, then it checks if it's on DockerHub or on AWS ECR and if it can't find there either, then it will throw the docker client's error (like usual).

Next, before the container is launched, Cortex first tries to pull the image and if it isn't available, then it checks if there's a matching local image and if that too fails, it returns an error message of this sort: "failed to pull image".


checklist:

  • run make test and make lint
  • test manually (i.e. build/push all images, restart operator, and re-deploy APIs)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@RobertLucian RobertLucian added the enhancement New feature or request label Jun 8, 2020
@RobertLucian RobertLucian requested a review from deliahu June 8, 2020 15:10

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Member

@deliahu deliahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@RobertLucian RobertLucian requested a review from deliahu June 8, 2020 16:37
Copy link
Member

@deliahu deliahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@RobertLucian
Copy link
Member Author

Tested this the following ways assuming a local provider:

  1. With the image present both locally and on the upstream (i.e. DockerHub/ECR) -> worked as expected.
  2. With local image present and none available on the upstream (i.e. DockerHub/ECR) -> proceeded to use the local image.
  3. With local image not present and none available on the upstream (i.e. DockerHub/ECR) -> failed as expected.
  4. With local image not present and one available on the upstream (i.e. DockerHub/ECR) -> proceeed to download the upstream image.
  5. With an API already running using an xyz image, build a different image locally and then hit cortex deploy -> proceeded to use the newly updated local image.

@RobertLucian RobertLucian merged commit e4c7473 into master Jun 9, 2020
@RobertLucian RobertLucian deleted the feature/support-local-docker-image branch June 9, 2020 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support local docker images when running cortex locally
2 participants