diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example index d61f033f885..23f5367203a 100644 --- a/inventory/byo/hosts.origin.example +++ b/inventory/byo/hosts.origin.example @@ -363,9 +363,11 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', # OpenShift Registry Console Options # Override the console image prefix for enterprise deployments, not used in origin # default is "registry.access.redhat.com/openshift3/" and the image appended is "registry-console" -#openshift_cockpit_deployer_prefix=registry.example.com/myrepo/ +#openshift_hosted_registry_console_deployer_prefix=registry.example.com/myrepo/ # Override image version, defaults to latest for origin, matches the product version for enterprise -#openshift_cockpit_deployer_version=1.4.1 +#openshift_hosted_registry_console_deployer_version=1.4.1 +# Disable deployment of the registry console (cockpit) +#openshift_hosted_registry_console_deploy=false # Openshift Registry Options # diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example index 823d6f58f11..2e2358a35e2 100644 --- a/inventory/byo/hosts.ose.example +++ b/inventory/byo/hosts.ose.example @@ -363,9 +363,11 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', # OpenShift Registry Console Options # Override the console image prefix for enterprise deployments, not used in origin # default is "registry.access.redhat.com/openshift3/" and the image appended is "registry-console" -#openshift_cockpit_deployer_prefix=registry.example.com/myrepo/ +#openshift_hosted_registry_console_deployer_prefix=registry.example.com/myrepo/ # Override image version, defaults to latest for origin, matches the product version for enterprise -#openshift_cockpit_deployer_version=1.4.1 +#openshift_hosted_registry_console_deployer_version=1.4.1 +# Disable deployment of the registry console (cockpit) +#openshift_hosted_registry_console_deploy=false # Openshift Registry Options # diff --git a/playbooks/common/openshift-cluster/openshift_hosted.yml b/playbooks/common/openshift-cluster/openshift_hosted.yml index b128001cff5..d9798db32c2 100644 --- a/playbooks/common/openshift-cluster/openshift_hosted.yml +++ b/playbooks/common/openshift-cluster/openshift_hosted.yml @@ -43,11 +43,11 @@ openshift_hosted_logging_elasticsearch_ops_pvc_size: "{{ openshift.hosted.logging.storage.volume.size if openshift_hosted_logging_storage_kind | default(none) in ['dynamic','nfs' ] else '' }}" openshift_hosted_logging_elasticsearch_ops_pvc_prefix: "{{ 'logging-es-ops' if openshift_hosted_loggingops_storage_kind | default(none) =='dynamic' else '' }}" - - role: cockpit-ui + - role: openshift_hosted_registry_console when: - openshift.common.version_gte_3_3_or_1_3 | bool - openshift_hosted_manage_registry | default(true) | bool - - openshift_hosted_registry_console | default(true) | bool + - openshift_hosted_registry_console_deploy | default(true) | bool - not (openshift.docker.hosted_registry_insecure | default(false) | bool diff --git a/roles/cockpit-ui/meta/main.yml b/roles/openshift_hosted_registry_console/meta/main.yml similarity index 79% rename from roles/cockpit-ui/meta/main.yml rename to roles/openshift_hosted_registry_console/meta/main.yml index 4d619fff635..b10d83c7908 100644 --- a/roles/cockpit-ui/meta/main.yml +++ b/roles/openshift_hosted_registry_console/meta/main.yml @@ -1,7 +1,7 @@ --- galaxy_info: author: Samuel Munilla - description: Deploy and Enable cockpit-ui + description: Deploy and Enable Registry Console (cockpit-ui) company: Red Hat, Inc. license: Apache License, Version 2.0 min_ansible_version: 2.1 diff --git a/roles/cockpit-ui/tasks/main.yml b/roles/openshift_hosted_registry_console/tasks/main.yml similarity index 78% rename from roles/cockpit-ui/tasks/main.yml rename to roles/openshift_hosted_registry_console/tasks/main.yml index 8bd68787ae9..bb7d8541e29 100644 --- a/roles/cockpit-ui/tasks/main.yml +++ b/roles/openshift_hosted_registry_console/tasks/main.yml @@ -1,4 +1,5 @@ --- +## this role formally named 'cockpit-ui' - block: - name: Create passthrough route for docker-registry oc_route: @@ -38,8 +39,12 @@ - name: Deploy registry-console command: > {{ openshift.common.client_binary }} new-app --template=registry-console - {% if openshift_cockpit_deployer_prefix is defined %}-p IMAGE_PREFIX="{{ openshift_cockpit_deployer_prefix }}"{% endif %} - {% if openshift_cockpit_deployer_version is defined %}-p IMAGE_VERSION="{{ openshift_cockpit_deployer_version }}"{% endif %} + {% if openshift_hosted_registry_console_deployer_prefix | default(openshift_cockpit_deployer_prefix) | default('') != '' %} + -p IMAGE_PREFIX="{{ openshift_hosted_cockpit_deployer_prefix | default(openshift_cockpit_deployer_prefix) }}" + {% endif %} + {% if openshift_hosted_registry_console_deployer_version | default(openshift_cockpit_deployer_version) | default('') != '' %} + -p IMAGE_VERSION="{{ openshift_hosted_registry_console_deployer_prefix | default(openshift_cockpit_deployer_version) }} + "{% endif %} -p OPENSHIFT_OAUTH_PROVIDER_URL="{{ openshift.master.public_api_url }}" -p REGISTRY_HOST="{{ docker_registry_route.results.results[0].spec.host }}" -p COCKPIT_KUBE_URL="https://{{ registry_console_cockpit_kube.results.results[0].spec.host }}"