From 1de490c5c76e07a659fb22ac2d73de0571dd480e Mon Sep 17 00:00:00 2001 From: Jonathan Springer Date: Fri, 9 Mar 2018 15:01:44 +0000 Subject: [PATCH] Allow override of default runtime registry --- ansible/group_vars/all | 11 +---------- ansible/roles/invoker/tasks/deploy.yml | 3 ++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ansible/group_vars/all b/ansible/group_vars/all index 02cd9a4367c..a5151a87138 100644 --- a/ansible/group_vars/all +++ b/ansible/group_vars/all @@ -25,18 +25,9 @@ whisk: version: date: "{{ansible_date_time.iso8601}}" -## -# list of supported runtimes (see whisk.core.entity.ExecManifest for schema). -# briefly: -# defaultImagePrefix: the default image prefix when not given explicitly -# defaultImageTag: the default image tag -# runtimes: set of language runtime families grouped by language (e.g., nodejs, python) -# blackboxes: list of pre-populated docker action images as "name" with optional "prefix" and "tag" -# bypassPullForLocalImages: optional, if true, allow images with a prefix that matches {{ docker.image.prefix }} -# to skip docker pull in invoker even if the image is not part of the blackbox set -# runtimes: manifest: "{{ runtimes_manifest | default(lookup('file', openwhisk_home ~ '/ansible/files/runtimes.json') | from_json) }}" + default_registry: "{{ runtimes_default_registry | default('docker.io') }}" default_image_prefix: "{{ runtimes_default_image_prefix | default('openwhisk') }}" default_image_tag: "{{ runtimes_default_image_tag | default('latest') }}" bypass_pull_for_local_images: "{{ runtimes_bypass_pull_for_local_images | default(false) }}" diff --git a/ansible/roles/invoker/tasks/deploy.yml b/ansible/roles/invoker/tasks/deploy.yml index 300d1a7a4d4..1adbc1fdabe 100644 --- a/ansible/roles/invoker/tasks/deploy.yml +++ b/ansible/roles/invoker/tasks/deploy.yml @@ -13,7 +13,8 @@ - name: "pull runtime action and blackbox images" vars: - image_prefix: "{{ item.prefix | default(runtimes.default_image_prefix) }}" + image_registry: "{{ item.registry | default(runtimes.default_registry) }}" + image_prefix: "{{ image_registry }}/{{ item.prefix | default(runtimes.default_image_prefix) }}" image_tag: "{{ item.tag | default(runtimes.default_image_tag) }}" docker_image: state: present