Bug 1493431

Summary: Should use less image parameters to deploy peometheus if we want to use images from brew or ops repo
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: InstallerAssignee: Zohar Gal-Or <zgalor>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.0CC: aos-bugs, jcantril, jokerman, mmccomas, sdodson, tbielawa
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-28 22:12:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Junqi Zhao 2017-09-20 07:46:36 UTC
Description of problem:
Prometheus images are pulled from docker.io if we don't set value for:
openshift_prometheus_image_proxy, openshift_prometheus_image_prometheus
openshift_prometheus_image_alertmanager, openshift_prometheus_image_alertbuffer

If we want to deploy prometheus on openstack and aws/gce, in order to pull images from brew or ops repo, we have to set values for these parameters, it is a little complicated. 
For example, we have to set values as:
openshift_prometheus_image_proxy=registry.ops.openshift.com/openshift3/oauth-proxy
openshift_prometheus_image_prometheus=registry.ops.openshift.com/openshift3/prometheus
openshift_prometheus_image_alertmanager=registry.ops.openshift.com/openshift3/prometheus-alertmanager
openshift_prometheus_image_alertbuffer=registry.ops.openshift.com/openshift3/prometheus-alert-buffer


I think we could add one parameter, such as openshift_prometheus_image_prefix, then pull images from the named repo.
For openstack, openshift_prometheus_image_prefix=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/
For aws/gce,  openshift_prometheus_image_prefix=registry.ops.openshift.com/openshift3/

Version-Release number of selected component (if applicable):
# rpm -qa | grep openshift-ansible
openshift-ansible-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-roles-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-docs-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-callback-plugins-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-filter-plugins-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-playbooks-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-lookup-plugins-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch


How reproducible:
Always

Steps to Reproduce:
1. Deploy prometheus via ansible
# cd /usr/share/ansible/openshift-ansible/
# ansible-playbook -vvv -i ${INVENTORY_FILE}   playbooks/byo/openshift-cluster/openshift-prometheus.yml
2.
3.

Actual results:


Expected results:


Additional info:
#inventory file
[OSEv3:children]
masters
etcd
nfs

[masters]
${MASTER_URL} openshift_public_hostname=${MASTER_URL}

[etcd]
${ETCD} openshift_public_hostname=${ETCD}

[nfs]
${NFS} openshift_public_hostname=${NFS}

[OSEv3:vars]
ansible_ssh_user=root
ansible_ssh_private_key_file="~/libra.pem"
deployment_type=openshift-enterprise
openshift_docker_additional_registries=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888

# Prometheus
openshift_prometheus_state=present
openshift_prometheus_namespace=prometheus

Comment 1 Scott Dodson 2017-09-20 17:28:57 UTC
Essentially this means make prometheus observe the norms around image prefixes

Comment 2 Junqi Zhao 2017-09-21 02:55:17 UTC
tag for Prometheus images is latest, I think we should use version for tag, such as v1.0, and the latest images maybe have problems, customers want to use stable images

Comment 3 Junqi Zhao 2017-09-21 02:58:57 UTC
Maybe we should add another one parameter, such as openshift_prometheus_image_version to use specific version images

Comment 4 Zohar Gal-Or 2017-10-18 10:30:16 UTC
Submitted PR: https://github.com/openshift/openshift-ansible/pull/5787

Comment 6 Junqi Zhao 2017-11-06 02:49:42 UTC
Set openshift_prometheus_image_prefix and openshift_prometheus_image_version in inventory file, it will pull prometheus, oauth-proxy, prometheus-alertmanager, prometheus-alert-buffer images now.

env:
# openshift version
openshift v3.7.0-0.191.0
kubernetes v1.7.6+a08f5eeb62
etcd 3.2.8

# rpm -qa | grep openshift-ansible
openshift-ansible-lookup-plugins-3.7.0-0.191.0.git.0.bc2ff60.el7.noarch
openshift-ansible-playbooks-3.7.0-0.191.0.git.0.bc2ff60.el7.noarch
openshift-ansible-filter-plugins-3.7.0-0.191.0.git.0.bc2ff60.el7.noarch
openshift-ansible-callback-plugins-3.7.0-0.191.0.git.0.bc2ff60.el7.noarch
openshift-ansible-roles-3.7.0-0.191.0.git.0.bc2ff60.el7.noarch
openshift-ansible-docs-3.7.0-0.191.0.git.0.bc2ff60.el7.noarch
openshift-ansible-3.7.0-0.191.0.git.0.bc2ff60.el7.noarch

images:
prometheus-alert-buffer/images/v3.7.0-0.194.0.0
prometheus-alertmanager/images/v3.7.0-0.194.0.0
oauth-proxy/images/v3.7.0-0.194.0.0
prometheus/images/v3.7.0-0.194.0.0

Comment 10 errata-xmlrpc 2017-11-28 22:12:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:3188