From 42d330a1cf2990fee39dab36250524ebfb303428 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 6 Sep 2017 15:11:55 -0400 Subject: CFME 4.6 work begins. CFME 4.5 references added to the release-3.6 branch --- roles/openshift_cfme/defaults/main.yml | 188 +++++++++++++++++++++++++++------ 1 file changed, 156 insertions(+), 32 deletions(-) (limited to 'roles/openshift_cfme/defaults/main.yml') diff --git a/roles/openshift_cfme/defaults/main.yml b/roles/openshift_cfme/defaults/main.yml index b82c2e602..9a36f902d 100644 --- a/roles/openshift_cfme/defaults/main.yml +++ b/roles/openshift_cfme/defaults/main.yml @@ -1,32 +1,154 @@ --- -# Namespace for the CFME project (Note: changed post-3.6 to use -# reserved 'openshift-' namespace prefix) +# Namespace for the CFME project openshift_cfme_project: openshift-cfme # Namespace/project description -openshift_cfme_project_description: ManageIQ - CloudForms Management Engine -# Basic user assigned the `admin` role for the project -openshift_cfme_user: cfme -# Project system account for enabling privileged pods -openshift_cfme_service_account: "system:serviceaccount:{{ openshift_cfme_project }}:default" -# All the required exports -openshift_cfme_pv_exports: - - miq-pv01 - - miq-pv02 - - miq-pv03 -# PV template files and their created object names -openshift_cfme_pv_data: - - pv_name: miq-pv01 - pv_template: miq-pv-db.yaml - pv_label: CFME DB PV - - pv_name: miq-pv02 - pv_template: miq-pv-region.yaml - pv_label: CFME Region PV - - pv_name: miq-pv03 - pv_template: miq-pv-server.yaml - pv_label: CFME Server PV - -# Tuning parameter to use more than 5 images at once from an ImageStream -openshift_cfme_maxImagesBulkImportedPerRepository: 100 +openshift_cfme_project_description: ManageIQ - CloudForms Management Engine 4.6 + +###################################################################### +# BASE TEMPLATE AND DATABASE OPTIONS +###################################################################### +# Which flavor of CFME would you like? You may install CFME using a +# podified PostgreSQL server, or you may choose to use an existing +# PostgreSQL server. +# +# Choose 'miq-template' for a podified database install +# Choose 'miq-template-ext-db' for an external database install +openshift_cfme_app_template: miq-template + +# If you are using the miq-template-ext-db template then you must add +# the required database parameters to the +# openshift_cfme_template_parameters variable. For example: +# +# openshift_cfme_template_parameters: +# DATABASE_USER: root +# DATABASE_PASSWORD: @_grrrr8Pa$$.h3r3 +# DATABASE_IP: 10.1.1.10 +# DATABASE_PORT: 5432 +# DATABASE_NAME: vmdb_production + +###################################################################### +# STORAGE OPTIONS +###################################################################### +# DEFAULT - 'nfs' +# Allowed options: nfs, external, preconfigured, cloudprovider. +openshift_cfme_storage_class: nfs +# * nfs - Best used for proof-of-concept installs. Will setup NFS on a +# cluster host (defaults to your first master in the inventory file) +# to back the required PVCs. The application requires a PVC and the +# database (which may be hosted externally) may require a +# second. PVC minimum required sizes are: 5GiB for the MIQ +# application, and 15GiB for the PostgreSQL database (20GiB minimum +# available space on an volume/partition if used specifically for +# NFS purposes) +# +# * external - You are using an external NFS server, such as a netapp +# appliance. See the STORAGE - NFS OPTIONS section below for +# required information. +# +# * preconfigured - This CFME role will do NOTHING to modify storage +# settings. This option assumes expert knowledge and that you have +# done everything required ahead of time. +# +# * cloudprovider - You are using an OCP cloudprovider integration for +# your storage class. For this to work you must have already +# configured the required inventory parameters for your cloud +# provider +# +# Ensure 'openshift_cloudprovider_kind' is defined (aws or gce) and +# that the applicable cloudprovider parameters are provided. + +###################################################################### +# STORAGE - NFS OPTIONS +###################################################################### +# [OPTIONAL] - If you are using an EXTERNAL NFS server, such as a +# netapp appliance, then you must set the hostname here. Leave the +# value as 'false' if you are not using external NFS +openshift_cfme_storage_external_nfs_hostname: false +# [OPTIONAL] - If you are using external NFS then you must set the base +# path to the exports location here. +# +# Or, change this value if you want to change the default path used +# for local NFS exports. +openshift_cfme_storage_external_nfs_base_dir: /exports/ + + +###################################################################### +# VARIOUS CONSTANTS - DO NOT OVERRIDE THESE UNDER ANY CIRCUMSTANCES +###################################################################### + +###################################################################### +# Misc enumerated values +# Allowed choices for the storage class parameter +openshift_cfme_storage_classes: + - nfs + - external + - preconfigured + - cloudprovider +# Name of the application templates with object/parameter definitions +openshift_cfme_app_templates: + - miq-template-ext-db + - miq-template +# PostgreSQL database connection parameters +openshift_cfme_db_parameters: + - DATABASE_USER + - DATABASE_PASSWORD + - DATABASE_IP + - DATABASE_PORT + - DATABASE_NAME + + +###################################################################### +# ACCOUNTING +###################################################################### +# Service Account SSCs +openshift_system_account_sccs: + - name: miq-anyuid + resource_name: anyuid + - name: miq-orchestrator + resource_name: anyuid + - name: miq-privileged + resource_name: privileged + - name: miq-httpd + resource_name: miq-httpd + +# Service Account Roles +openshift_cfme_system_account_roles: + - name: miq-orchestrator + resource_name: view + - name: miq-orchestrator + resource_name: edit + + +###################################################################### +# SCAFFOLDING - These are parameters we pre-seed that a user may or +# may not set later +###################################################################### +# A hash of parameters you want to override or set in the +# miq-template.yaml or miq-template-ext-db.yaml templates. Set this in +# your inventory file as a simple hash. Acceptable values are defined +# under the .parameters list in files/miq-template{-ext-db}.yaml +# Example: +# +# openshift_cfme_template_parameters={'APPLICATION_MEM_REQ': '512Mi'} +openshift_cfme_template_parameters: {} + +# # All the required exports +# openshift_cfme_pv_exports: +# - miq-pv01 +# - miq-pv02 +# - miq-pv03 +# # PV template files and their created object names +# openshift_cfme_pv_data: +# - pv_name: miq-pv01 +# pv_template: miq-pv-db.yaml +# pv_label: CFME DB PV +# - pv_name: miq-pv02 +# pv_template: miq-pv-region.yaml +# pv_label: CFME Region PV +# - pv_name: miq-pv03 +# pv_template: miq-pv-server.yaml +# pv_label: CFME Server PV + # TODO: Refactor '_install_app' variable. This is just for testing but # maybe in the future it should control the entire yes/no for CFME. # @@ -34,9 +156,11 @@ openshift_cfme_maxImagesBulkImportedPerRepository: 100 # --template=manageiq). If False everything UP TO 'new-app' is ran. openshift_cfme_install_app: False # Docker image to pull -openshift_cfme_application_img_name: "{{ 'registry.access.redhat.com/cloudforms45/cfme-openshift-app' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" -openshift_cfme_postgresql_img_name: "{{ 'registry.access.redhat.com/cloudforms45/cfme-openshift-postgresql' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" -openshift_cfme_memcached_img_name: "{{ 'registry.access.redhat.com/cloudforms45/cfme-openshift-memcached' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" -openshift_cfme_application_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'app-latest-fine' }}" -openshift_cfme_memcached_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'memcached-latest-fine' }}" -openshift_cfme_postgresql_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'postgresql-latest-fine' }}" +# openshift_cfme_application_img_name: "{{ 'registry.access.redhat.com/cloudforms46/cfme-openshift-app' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" +# openshift_cfme_application_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'frontend-latest' }}" + +# openshift_cfme_memcached_img_name: "{{ 'registry.access.redhat.com/cloudforms46/cfme-openshift-memcached' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" +# openshift_cfme_memcached_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'memcached-latest-fine' }}" + +# openshift_cfme_postgresql_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'postgresql-latest-fine' }}" +# openshift_cfme_postgresql_img_name: "{{ 'registry.access.redhat.com/cloudforms46/cfme-openshift-postgresql' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" -- cgit v1.2.3 From 8e10c53974b4b87e483ed0dfec3946383aa071c7 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Fri, 15 Sep 2017 17:18:22 -0400 Subject: Import upstream templates. Do the work. Validate parameters. --- roles/openshift_cfme/defaults/main.yml | 133 ++++++++++++--------------------- 1 file changed, 48 insertions(+), 85 deletions(-) (limited to 'roles/openshift_cfme/defaults/main.yml') diff --git a/roles/openshift_cfme/defaults/main.yml b/roles/openshift_cfme/defaults/main.yml index 9a36f902d..b833bbb45 100644 --- a/roles/openshift_cfme/defaults/main.yml +++ b/roles/openshift_cfme/defaults/main.yml @@ -2,7 +2,7 @@ # Namespace for the CFME project openshift_cfme_project: openshift-cfme # Namespace/project description -openshift_cfme_project_description: ManageIQ - CloudForms Management Engine 4.6 +openshift_cfme_project_description: CloudForms Management Engine ###################################################################### # BASE TEMPLATE AND DATABASE OPTIONS @@ -17,20 +17,25 @@ openshift_cfme_app_template: miq-template # If you are using the miq-template-ext-db template then you must add # the required database parameters to the -# openshift_cfme_template_parameters variable. For example: +# openshift_cfme_template_parameters variable. You only need to +# provide parameters that differ from the ones in the following +# example. Any omitted parameter by the user will be default to its +# default below: # # openshift_cfme_template_parameters: -# DATABASE_USER: root -# DATABASE_PASSWORD: @_grrrr8Pa$$.h3r3 -# DATABASE_IP: 10.1.1.10 +# DATABASE_USER: 'root' +# DATABASE_PASSWORD: '' +# DATABASE_IP: '' # DATABASE_PORT: 5432 -# DATABASE_NAME: vmdb_production +# DATABASE_NAME: 'vmdb_production' +# +# See also var: __openshift_cfme_default_db_connection_info ###################################################################### # STORAGE OPTIONS ###################################################################### # DEFAULT - 'nfs' -# Allowed options: nfs, external, preconfigured, cloudprovider. +# Allowed options: nfs, nfs_external, preconfigured, cloudprovider. openshift_cfme_storage_class: nfs # * nfs - Best used for proof-of-concept installs. Will setup NFS on a # cluster host (defaults to your first master in the inventory file) @@ -41,8 +46,8 @@ openshift_cfme_storage_class: nfs # available space on an volume/partition if used specifically for # NFS purposes) # -# * external - You are using an external NFS server, such as a netapp -# appliance. See the STORAGE - NFS OPTIONS section below for +# * nfs_external - You are using an external NFS server, such as a +# netapp appliance. See the STORAGE - NFS OPTIONS section below for # required information. # # * preconfigured - This CFME role will do NOTHING to modify storage @@ -57,67 +62,43 @@ openshift_cfme_storage_class: nfs # Ensure 'openshift_cloudprovider_kind' is defined (aws or gce) and # that the applicable cloudprovider parameters are provided. -###################################################################### +#--------------------------------------------------------------------- # STORAGE - NFS OPTIONS -###################################################################### +#--------------------------------------------------------------------- # [OPTIONAL] - If you are using an EXTERNAL NFS server, such as a # netapp appliance, then you must set the hostname here. Leave the -# value as 'false' if you are not using external NFS -openshift_cfme_storage_external_nfs_hostname: false +# value as 'false' if you are not using external NFS. +openshift_cfme_storage_nfs_external_hostname: false # [OPTIONAL] - If you are using external NFS then you must set the base # path to the exports location here. # -# Or, change this value if you want to change the default path used -# for local NFS exports. -openshift_cfme_storage_external_nfs_base_dir: /exports/ - - -###################################################################### -# VARIOUS CONSTANTS - DO NOT OVERRIDE THESE UNDER ANY CIRCUMSTANCES -###################################################################### - -###################################################################### -# Misc enumerated values -# Allowed choices for the storage class parameter -openshift_cfme_storage_classes: - - nfs - - external - - preconfigured - - cloudprovider -# Name of the application templates with object/parameter definitions -openshift_cfme_app_templates: - - miq-template-ext-db - - miq-template -# PostgreSQL database connection parameters -openshift_cfme_db_parameters: - - DATABASE_USER - - DATABASE_PASSWORD - - DATABASE_IP - - DATABASE_PORT - - DATABASE_NAME - - -###################################################################### -# ACCOUNTING -###################################################################### -# Service Account SSCs -openshift_system_account_sccs: - - name: miq-anyuid - resource_name: anyuid - - name: miq-orchestrator - resource_name: anyuid - - name: miq-privileged - resource_name: privileged - - name: miq-httpd - resource_name: miq-httpd - -# Service Account Roles -openshift_cfme_system_account_roles: - - name: miq-orchestrator - resource_name: view - - name: miq-orchestrator - resource_name: edit +# Additionally: EXTERNAL NFS REQUIRES that YOU CREATE the nfs exports +# that will back the application PV and optionally the database +# pv. Export path definitions, relative to +# {{ openshift_cfme_storage_nfs_base_dir }} +# +# * REQUIRED[ALWAYS]: /miq-app - MIQ Server PV. +# +# * REQUIRED[NFS_EXTERNAL]: /miq-db - Podified DB PB +# +# LOCAL NFS NOTE: +# +# You may may also change this value if you want to change the default +# path used for local NFS exports. +openshift_cfme_storage_nfs_base_dir: /exports +# +# LOCAL NFS NOTE: +# +# You may override the automatically selected LOCAL NFS server by +# setting this variable. Useful for testing specific task files. +openshift_cfme_storage_nfs_local_hostname: false +#--------------------------------------------------------------------- +# DEFAULT PV SIZES +# How large to make the MIQ application PV +openshift_cfme_app_pv_size: 5Gi +# How large to make the MIQ PostgreSQL PV +openshift_cfme_db_pv_size: 15Gi ###################################################################### # SCAFFOLDING - These are parameters we pre-seed that a user may or @@ -132,29 +113,11 @@ openshift_cfme_system_account_roles: # openshift_cfme_template_parameters={'APPLICATION_MEM_REQ': '512Mi'} openshift_cfme_template_parameters: {} -# # All the required exports -# openshift_cfme_pv_exports: -# - miq-pv01 -# - miq-pv02 -# - miq-pv03 -# # PV template files and their created object names -# openshift_cfme_pv_data: -# - pv_name: miq-pv01 -# pv_template: miq-pv-db.yaml -# pv_label: CFME DB PV -# - pv_name: miq-pv02 -# pv_template: miq-pv-region.yaml -# pv_label: CFME Region PV -# - pv_name: miq-pv03 -# pv_template: miq-pv-server.yaml -# pv_label: CFME Server PV - -# TODO: Refactor '_install_app' variable. This is just for testing but -# maybe in the future it should control the entire yes/no for CFME. -# -# Whether or not the manageiq app should be initialized ('oc new-app +###################################################################### +# Whether or not the cfme app should be initialized ('oc new-app # --template=manageiq). If False everything UP TO 'new-app' is ran. -openshift_cfme_install_app: False +openshift_cfme_install_app: false + # Docker image to pull # openshift_cfme_application_img_name: "{{ 'registry.access.redhat.com/cloudforms46/cfme-openshift-app' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" # openshift_cfme_application_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'frontend-latest' }}" -- cgit v1.2.3 From e98941e16d176749ace5181ae06c61bbe0cf6119 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Tue, 3 Oct 2017 16:17:15 -0400 Subject: Documentation * Update README * Add parameter docs to inventory examples * Remove unused graphic * Update defaults --- roles/openshift_cfme/defaults/main.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'roles/openshift_cfme/defaults/main.yml') diff --git a/roles/openshift_cfme/defaults/main.yml b/roles/openshift_cfme/defaults/main.yml index b833bbb45..2c728b612 100644 --- a/roles/openshift_cfme/defaults/main.yml +++ b/roles/openshift_cfme/defaults/main.yml @@ -14,22 +14,9 @@ openshift_cfme_project_description: CloudForms Management Engine # Choose 'miq-template' for a podified database install # Choose 'miq-template-ext-db' for an external database install openshift_cfme_app_template: miq-template - # If you are using the miq-template-ext-db template then you must add # the required database parameters to the -# openshift_cfme_template_parameters variable. You only need to -# provide parameters that differ from the ones in the following -# example. Any omitted parameter by the user will be default to its -# default below: -# -# openshift_cfme_template_parameters: -# DATABASE_USER: 'root' -# DATABASE_PASSWORD: '' -# DATABASE_IP: '' -# DATABASE_PORT: 5432 -# DATABASE_NAME: 'vmdb_production' -# -# See also var: __openshift_cfme_default_db_connection_info +# openshift_cfme_template_parameters variable. ###################################################################### # STORAGE OPTIONS @@ -77,10 +64,6 @@ openshift_cfme_storage_nfs_external_hostname: false # pv. Export path definitions, relative to # {{ openshift_cfme_storage_nfs_base_dir }} # -# * REQUIRED[ALWAYS]: /miq-app - MIQ Server PV. -# -# * REQUIRED[NFS_EXTERNAL]: /miq-db - Podified DB PB -# # LOCAL NFS NOTE: # # You may may also change this value if you want to change the default -- cgit v1.2.3 From 534113870fc5e6c47fe8dbba1322a462c9cbef37 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Tue, 3 Oct 2017 17:21:49 -0400 Subject: Hooks for installing CFME during full openshift installation --- roles/openshift_cfme/defaults/main.yml | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'roles/openshift_cfme/defaults/main.yml') diff --git a/roles/openshift_cfme/defaults/main.yml b/roles/openshift_cfme/defaults/main.yml index 2c728b612..a1a6e7190 100644 --- a/roles/openshift_cfme/defaults/main.yml +++ b/roles/openshift_cfme/defaults/main.yml @@ -95,18 +95,3 @@ openshift_cfme_db_pv_size: 15Gi # # openshift_cfme_template_parameters={'APPLICATION_MEM_REQ': '512Mi'} openshift_cfme_template_parameters: {} - -###################################################################### -# Whether or not the cfme app should be initialized ('oc new-app -# --template=manageiq). If False everything UP TO 'new-app' is ran. -openshift_cfme_install_app: false - -# Docker image to pull -# openshift_cfme_application_img_name: "{{ 'registry.access.redhat.com/cloudforms46/cfme-openshift-app' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" -# openshift_cfme_application_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'frontend-latest' }}" - -# openshift_cfme_memcached_img_name: "{{ 'registry.access.redhat.com/cloudforms46/cfme-openshift-memcached' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" -# openshift_cfme_memcached_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'memcached-latest-fine' }}" - -# openshift_cfme_postgresql_img_tag: "{{ 'latest' if openshift_deployment_type == 'openshift-enterprise' else 'postgresql-latest-fine' }}" -# openshift_cfme_postgresql_img_name: "{{ 'registry.access.redhat.com/cloudforms46/cfme-openshift-postgresql' if openshift_deployment_type == 'openshift-enterprise' else 'docker.io/manageiq/manageiq-pods' }}" -- cgit v1.2.3 From 99811e05a245ef23e806f5c847f72d267b142bf1 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 4 Oct 2017 10:06:50 -0400 Subject: Add notes about SA token. Improve NFS validation. --- roles/openshift_cfme/defaults/main.yml | 7 ------- 1 file changed, 7 deletions(-) (limited to 'roles/openshift_cfme/defaults/main.yml') diff --git a/roles/openshift_cfme/defaults/main.yml b/roles/openshift_cfme/defaults/main.yml index a1a6e7190..8ba672262 100644 --- a/roles/openshift_cfme/defaults/main.yml +++ b/roles/openshift_cfme/defaults/main.yml @@ -76,13 +76,6 @@ openshift_cfme_storage_nfs_base_dir: /exports # setting this variable. Useful for testing specific task files. openshift_cfme_storage_nfs_local_hostname: false -#--------------------------------------------------------------------- -# DEFAULT PV SIZES -# How large to make the MIQ application PV -openshift_cfme_app_pv_size: 5Gi -# How large to make the MIQ PostgreSQL PV -openshift_cfme_db_pv_size: 15Gi - ###################################################################### # SCAFFOLDING - These are parameters we pre-seed that a user may or # may not set later -- cgit v1.2.3