Bug 1306612 - [docs] Metrics Deployer Template listing is from Origin
Summary: [docs] Metrics Deployer Template listing is from Origin
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: ---
Assignee: brice
QA Contact: Vikram Goyal
Vikram Goyal
URL: https://access.redhat.com/documentati...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-11 13:01 UTC by Evgheni Dereveanchin
Modified: 2019-09-12 09:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-23 01:07:13 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Evgheni Dereveanchin 2016-02-11 13:01:30 UTC
Document URL: 
https://access.redhat.com/documentation/en/openshift-enterprise/3.1/installation-and-configuration/chapter-18-enabling-cluster-metrics#creating-the-deployer-template

Section Number and Name: 
18.5.2. Creating the Deployer Template

Describe the issue: 
This section describes the Enterprise template, yet the sample template provided is from Origin

 for example, IMAGE_PREFIX and IMAGE_VERSION values for Enterprise should be:

  name: IMAGE_PREFIX
  value: "registry.access.redhat.com/openshift3/"

  name: IMAGE_VERSION
  value: "3.1.0"

 for Origin these values are respectively:

  name: IMAGE_PREFIX
  value: "openshift/origin-"

  name: IMAGE_VERSION
  value: "latest"

A user may just copy-paste the template sample and end up with an unsupported Metrics setup using Origin images.

Suggestions for improvement: 
Provide proper template sample, or remove it completely to avoid confusion as the provided template may change over time with new values added which will be missing in the one quoted.

Additional information: 

this template is the same across all three documentation resources:

https://access.redhat.com/documentation/en/openshift-enterprise/3.1/installation-and-configuration/chapter-18-enabling-cluster-metrics
https://docs.openshift.com/enterprise/3.1/install_config/cluster_metrics.html
https://docs.openshift.org/latest/install_config/cluster_metrics.html

So Origin docs also reference the Enterprise template filename for some reason, yet with Origin content shown. This may also need fixing or specifying both the Origin and Enterprise filenames here.

Comment 1 Evgheni Dereveanchin 2016-02-11 14:42:05 UTC
I want to add that the next paragraph 18.5.2.1 currently states the following:

 If you wish to deploy a version of the metrics components other than latest, you can do so with the IMAGE_VERSION parameter.

This implies that the default version is "latest" while for Enterprise this is currently not true and as of openshift-ansible-roles-3.0.35-1.git.0.6a386dd.el7aos.noarch IMAGE_VERSION is equal to "3.1.0" ( see #0 ) - this also needs to be fixed to avoid confusion.

Comment 2 Aleks Lazic 2016-02-11 15:36:59 UTC
Please also fix the calls for 'create .. -f ...yaml' to refer to the right file for the different docs.

Comment 3 Aleks Lazic 2016-02-11 15:42:05 UTC
Please also add in the pv section that the used pv must have the 'ReadWriteOnce' permission.

If you don't add this accessModes to a volume the pvc will not find a pv and therefore will cassandar not be able to start.

Comment 4 brice 2016-02-15 04:18:51 UTC
Evgheni, I've made a PR for this BZ:

https://github.com/openshift/openshift-docs/pull/1585

I've made the file location, and the file example condtionalized, so that the Origin and Enterprise files are mentioned, but will only show up in their respective books. Can I get an ack this solves the issue?

I've also put in a sentence or two about the pv being ReadWriteOnce. But Aleks, I'm not too sure what you mean in Comment 2. Could you please give me some more information?

I'll also add that the file location was wrong, but there was another BZ about that which I've settled in this PR as well.

Comment 5 Evgheni Dereveanchin 2016-02-15 08:00:36 UTC
Thanks Brice, this looks good to me!

Comment 6 Aleks Lazic 2016-02-15 10:22:23 UTC
Hi Brice.

I mean this statement.

https://access.redhat.com/documentation/en/openshift-enterprise/3.1/installation-and-configuration/chapter-18-enabling-cluster-metrics

###
18.5.2.1. Deployer Template Parameters

The deployer template parameter options and their defaults are listed above in the metrics.yaml file.
###

If in OSE the prefered way is to use the ansible yaml then this statement is a little bit confusing.

Should I now use the showed yaml or the ansible one?

BR Aleks

Comment 7 brice 2016-02-15 23:34:32 UTC
Evgheni, thanks!

Aleks, I'm sorry, but I'm not sure what you mean. This might be a use case I'm not aware of. 

What do you mean by the ansible file? The metrics.yaml file that the sentence is referring to is:

/usr/share/openshift/examples/infrastructure-templates/enterprise/metrics-deployer.yaml

The actual file the topic mentions is incorrect (above the example metrics.yaml file), but does refer to the ansible directory. Is this what you mean?

Comment 8 Aleks Lazic 2016-02-16 08:42:07 UTC
I mean the following sequenz.

####
18.5.2. Creating the Deployer Template

The following is the template used to deploy the metrics components.

By default, the OpenShift installer creates this template, and it can be found at the following path:

/usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/enterprise/metrics-deployer.yaml

You will need to save your completed file with the file name metrics.yaml. 
# This sentence implies to copy and paste the shown content and save it into metrics.yaml

<here comes the file-content>
#####

Then in the following chapters is always the 'metrics.yaml' referred not the metrics-deployer.yaml. Which implies that you should use the copied content not the installed file!

oc process -f metrics.yaml


I hope it is much clearer?

Comment 9 brice 2016-02-17 04:30:37 UTC
Oh, I see what you mean now. Aleks, that should be fine. From what I can understand, the metrics-deployer.yaml file is just to be used like a template. 

You are provided with the file, and you change the values in it to be specific to your instance. Then you save it as metrics.yaml, and then go on to use that file instead.

I hope this makes sense. I've asked for info from one of the developers, so he can tell me if this is correct or not. It would be good to make sure.

Comment 10 Evgheni Dereveanchin 2016-02-17 10:03:18 UTC
Is template editing really necessary? Can't we just use oc process with -v and a comma-separated list of variables and their values as documented? At least that's what I was using for my install to set HAWKULAR_METRICS_HOSTNAME, USE_PERSISTENT_STORAGE and other parameters of the template.

Comment 13 Aleks Lazic 2016-02-17 14:55:42 UTC
I'm with Evgheni.

I don't want to edit something yust a

oc process -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/enterprise/metrics-deployer.yaml -v ...| oc create -f - 

should work.

Is this supported or accepted by rh ?

Comment 14 brice 2016-02-19 01:53:51 UTC
Ok. I've taken in what everybody said and...pretty much just deleted the tempalte example. 

It seems the location of the template has changed to /usr/share/openshift/examples/infrastructure-templates/enterprise/metrics-deployer.yaml

(s/enterprise/origin for origin installs)

The next section "Deployer Template Parameters" talks about configuring the templates using the oc process command, and the file is no longer in the ansible directory.

Evgheni, If I'm wrong and this needs more work, please let me know.

Comment 15 brice 2016-02-19 01:57:39 UTC
FYI, PR is here:

https://github.com/openshift/openshift-docs/pull/1585

Comment 16 Evgheni Dereveanchin 2016-02-19 07:27:35 UTC
Hello Brice, thanks for refactoring the page. It looks good to me!

Comment 17 brice 2016-02-22 00:38:06 UTC
Evgheni, great!

I'll move this forward.

Comment 18 openshift-github-bot 2016-02-23 01:04:37 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/7d78e65248af96fe3469e199a3f9dca5b978d9e9
Bug 1306612 and Bug 1308315 : deleted teamplate and fixed file location


Note You need to log in before you can comment on or make changes to this bug.