Skip to content
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

Adjust invoker playbook to pull docker images when a prefix and tag is specified. #3680

Merged
merged 1 commit into from
Jun 18, 2018

Conversation

rabbah
Copy link
Member

@rabbah rabbah commented May 18, 2018

Description

The invoker playbook ignores an image prefix when pre-fetching the blackbox images. This patch splits the blackbox tasks so that ones that do not have a prefix may be skipped (as today), but those that specify a prefix are always pulled, using the specified prefix in the image name.

Fixes #3679.

Related issue and scope

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

@codecov-io
Copy link

codecov-io commented May 18, 2018

Codecov Report

Merging #3680 into master will increase coverage by 0.06%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3680      +/-   ##
==========================================
+ Coverage   74.92%   74.99%   +0.06%     
==========================================
  Files         132      128       -4     
  Lines        6186     6075     -111     
  Branches      392      388       -4     
==========================================
- Hits         4635     4556      -79     
+ Misses       1551     1519      -32
Impacted Files Coverage Δ
...er/src/main/scala/whisk/core/invoker/Invoker.scala 0% <0%> (ø) ⬆️
...erpool/kubernetes/KubernetesContainerFactory.scala 0% <0%> (ø) ⬆️
.../scala/src/main/scala/whisk/core/WhiskConfig.scala 92% <100%> (-0.25%) ⬇️
.../containerpool/docker/DockerContainerFactory.scala 26.66% <100%> (ø) ⬆️
...rc/main/scala/whisk/core/entity/ExecManifest.scala 96.29% <100%> (-0.05%) ⬇️
...scala/whisk/core/mesos/MesosContainerFactory.scala 61.81% <100%> (ø) ⬆️
.../scala/src/main/scala/whisk/core/entity/UUID.scala 81.81% <0%> (-9.1%) ⬇️
...whisk/connector/kafka/KafkaConsumerConnector.scala 58.33% <0%> (-3.94%) ⬇️
...ala/whisk/core/database/CouchDbStoreProvider.scala 80% <0%> (-1.82%) ⬇️
...hisk/core/controller/actions/SequenceActions.scala 30.27% <0%> (-1.16%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e5cec1...c600668. Read the comment docs.

Copy link
Member

@dubee dubee left a comment

Choose a reason for hiding this comment

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

PG4 1715 ⏳

@rabbah rabbah added deployment invoker review Review for this PR has been requested and yet needs to be done. and removed wip labels May 18, 2018
Copy link
Member

@dubee dubee left a comment

Choose a reason for hiding this comment

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

PG2 3168 ⏳

@rabbah rabbah added wip review Review for this PR has been requested and yet needs to be done. and removed review Review for this PR has been requested and yet needs to be done. wip labels May 24, 2018
@rabbah rabbah requested a review from csantanapr May 25, 2018 03:18
@rabbah
Copy link
Member Author

rabbah commented May 25, 2018

@csantanapr made the changes we discussed on Slack to disentangle the image pulls from the docker registry.

@rabbah rabbah force-pushed the invoker-images branch 3 times, most recently from 6261407 to 584fac4 Compare June 1, 2018 12:04
@rabbah rabbah changed the title Adjust invoker playbook to pull blackbox docker images when a prefix is specified. Adjust invoker playbook to pull docker images when a prefix and tag is specified. Jun 4, 2018
@rabbah rabbah mentioned this pull request Jun 6, 2018
20 tasks
@rabbah rabbah force-pushed the invoker-images branch 7 times, most recently from a53a47a to 2b6faf9 Compare June 10, 2018 21:36
@rabbah rabbah force-pushed the invoker-images branch 6 times, most recently from 3df97d4 to 5fb2565 Compare June 10, 2018 21:59
@rabbah
Copy link
Member Author

rabbah commented Jun 10, 2018

@dgrove-oss I think you'll need to review this now as its scope as widened a little. I did checked the kube deployment and I think the change is compatible but will appreciate your input.

With the latest changes, runtime images are pulled from the given docker registry for runtimes (default is dockerhub) which is now allowed to be different from the docker.registry; the latter is now strictly used for the system components.

It is possible to skip the pulling of images entirely:

    ansible-playbook -i environments/local invoker.yml -e 'skip_pull_runtimes=true'

or with redo

    redo invoker -e"skip_pull_runtimes=true" 

@rabbah
Copy link
Member Author

rabbah commented Jun 10, 2018

@ddragosd this may also be relevant to docker-compose although I haven't checked that deployment yet.

@rabbah
Copy link
Member Author

rabbah commented Jun 10, 2018

Some caveats with this change: building new runtime images for local testing means:

  • locally tagged image used in the runtimes manifest may be used without pushing to docker hub, provided the skip_pull_runtimes is enabled
  • if skip_pull_runtimes is enabled but the runtimes manifest includes images that are not already pulled, they may fail in the invoker, or be pulled on the first run.

FYI @remore @akrabat @sciabarracom since you will be affected by this change if we accept it.

@dgrove-oss
Copy link
Member

Looks like this would be straightforward for kube. We'd need to update the copies of runtime.json and tweak values.yaml and the various deployment templates for the pods to reflect the change in environment variables.

@csantanapr csantanapr force-pushed the invoker-images branch 2 times, most recently from 71e2691 to f6e18b1 Compare June 14, 2018 20:55
Copy link
Member

@csantanapr csantanapr left a comment

Choose a reason for hiding this comment

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

LGTM

@csantanapr csantanapr added pgapproved Pipeline has approved this change. and removed review Review for this PR has been requested and yet needs to be done. labels Jun 15, 2018
Remove default runtime prefix and tag; the runtimes.json file should fully specify these.
Remove docker.{registry,prefix,tax} entanglement with runtimes as these are used for the system images not the runtimes.
Optionally specify a runtimes.registry to pull images from there instead of dockerhub.
@dubee dubee merged commit 2047c0f into apache:master Jun 18, 2018
remore added a commit to remore/incubator-openwhisk that referenced this pull request Jun 20, 2018
remore added a commit to remore/incubator-openwhisk that referenced this pull request Jun 21, 2018
@rabbah rabbah deleted the invoker-images branch June 21, 2018 12:28
BillZong pushed a commit to BillZong/openwhisk that referenced this pull request Nov 18, 2019
…pache#3680)

Remove default runtime prefix and tag; the runtimes.json file should fully specify these.
Remove docker.{registry,prefix,tax} entanglement with runtimes as these are used for the system images not the runtimes.
Optionally specify a runtimes.registry to pull images from there instead of dockerhub.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment invoker pgapproved Pipeline has approved this change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invoker playbook does not properly pull blackbox images
5 participants