From 1c40b42e4fbc08934e8cb829f15c1c6b61288660 Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Wed, 10 Apr 2024 11:12:16 +0100 Subject: [PATCH 1/6] add readme's for new roles --- ansible/roles/onr-boe/README.md | 13 +++++++++++++ ansible/roles/onr-get/README.md | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ansible/roles/onr-boe/README.md create mode 100644 ansible/roles/onr-get/README.md diff --git a/ansible/roles/onr-boe/README.md b/ansible/roles/onr-boe/README.md new file mode 100644 index 000000000..7b25c96e2 --- /dev/null +++ b/ansible/roles/onr-boe/README.md @@ -0,0 +1,13 @@ +# Overview + +Installs BOE software for ONR + +# Pre-requisites + +Ensure other roles have already run for server_type_onr_boe + +# Example + +``` +no_proxy="*" ansible-playbook site.yml --limit server_type_onr_boe -e force_role=onr-boe +``` diff --git a/ansible/roles/onr-get/README.md b/ansible/roles/onr-get/README.md new file mode 100644 index 000000000..693b17ac0 --- /dev/null +++ b/ansible/roles/onr-get/README.md @@ -0,0 +1,19 @@ +# Overview + +Gets the BOE software for ONR off the hmpp/onr s3 bucket and extracts it + +# Pre-requisites + +Ensure users and disks roles have already run to create /u01/ and /u02/ disks + +# Example + +import the role into main.yml + +``` +- ansible.builtin.import_role: + name: onr-get + tags: + - amibuild + - ec2provision +``` From 431c9f0b5cbbfff623e332a175d2d03cb6ec8ed0 Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Wed, 10 Apr 2024 14:49:38 +0100 Subject: [PATCH 2/6] add oinstall user and oracle client roles --- ansible/group_vars/server_type_onr_boe.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ansible/group_vars/server_type_onr_boe.yml b/ansible/group_vars/server_type_onr_boe.yml index ba39d1f20..c457c04ad 100644 --- a/ansible/group_vars/server_type_onr_boe.yml +++ b/ansible/group_vars/server_type_onr_boe.yml @@ -2,6 +2,11 @@ ansible_python_interpreter: /usr/local/bin/python3.6 users_and_groups_system: + - name: oracle + group: oinstall + groups: + - dba + - wheel - name: bobj group: binstall groups: @@ -24,13 +29,13 @@ server_type_roles_list: - ansible-script - epel - disks - # - oracle-19c-client - # - oracle-tns-entries + - oracle-19c-client + - oracle-tns-entries # - ncr-bip - onr-boe - - collectd - - amazon-cloudwatch-agent - - amazon-cloudwatch-agent-collectd + # - collectd TODO: comment these back in, not needed yet + # - amazon-cloudwatch-agent + # - amazon-cloudwatch-agent-collectd # - collectd-service-metrics TODO: not defined yet roles_list: "{{ (ami_roles_list | default([]) | difference(server_type_roles_list | default([]))) + (server_type_roles_list | default([])) }}" From 5b303e43f0fd19fe2fdbff108ebb407707d3de41 Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Wed, 10 Apr 2024 15:08:37 +0100 Subject: [PATCH 3/6] add oracle client env vars --- ansible/group_vars/server_type_onr_boe.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/group_vars/server_type_onr_boe.yml b/ansible/group_vars/server_type_onr_boe.yml index c457c04ad..aafc5f378 100644 --- a/ansible/group_vars/server_type_onr_boe.yml +++ b/ansible/group_vars/server_type_onr_boe.yml @@ -80,3 +80,9 @@ disks_mount: # - ebs_device_name: /dev/sds # dir: swap # fstype: swap + +# oracle client +oracle_install_user: oracle +oracle_install_group: oinstall +oracle_home: /u01/app/oracle/product/19c/client_1 +oracle_inventory: /u01/app/oraInventory From 221d8363ab6651f7d3bcc369b1369dcb8646a2c8 Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Thu, 11 Apr 2024 12:37:06 +0100 Subject: [PATCH 4/6] push --- ansible/group_vars/server_type_onr_boe.yml | 4 +- .../onr-boe/templates/responseTemplate.ini | 217 ++++++++++++++++++ .../roles/oracle-19c-client/tasks/main.yml | 48 ++-- 3 files changed, 252 insertions(+), 17 deletions(-) create mode 100644 ansible/roles/onr-boe/templates/responseTemplate.ini diff --git a/ansible/group_vars/server_type_onr_boe.yml b/ansible/group_vars/server_type_onr_boe.yml index aafc5f378..58f00992e 100644 --- a/ansible/group_vars/server_type_onr_boe.yml +++ b/ansible/group_vars/server_type_onr_boe.yml @@ -29,8 +29,8 @@ server_type_roles_list: - ansible-script - epel - disks - - oracle-19c-client - - oracle-tns-entries + # - oracle-19c-client # TODO: may need to create an 11.2.0 or 11c client role + # - oracle-tns-entries # TODO: see comment above # - ncr-bip - onr-boe # - collectd TODO: comment these back in, not needed yet diff --git a/ansible/roles/onr-boe/templates/responseTemplate.ini b/ansible/roles/onr-boe/templates/responseTemplate.ini new file mode 100644 index 000000000..746520116 --- /dev/null +++ b/ansible/roles/onr-boe/templates/responseTemplate.ini @@ -0,0 +1,217 @@ +# Installation Response File +# ---------------------------------------------------------------------- +# + +[Manual Settings] +# The name of the local server. This feature overrides the local server name +# to the machine name specified. It must be manually set within the response file +# or it will be defaulted to the local machine name. +MACHINENAME= + + +[Paths] +# The path of the bobje directory. This feature is automically set by +# the installation directory specified as a command line argument followed +# by /bobje/. +BOBJEDIR= + +# The path of the DISK_1 directory on the CD. This path defaults to the cd directory +# pertaining to the install which has created the response file. It may be overwritten +# by specifying the cd directory as an argument on the command line. +CDDIR= + +# The path of the license directory. +LICENSEDIR= + + +[Product Information] +# The current language with the following exceptions: +# 1) "jp" if the current language is "ja" (Japanese) +# 2) "chs" if the current language is "zh_CN" (Chinese - China) +# 3) "cht" if the current language is "zh_TW" (Chinese - Taiwan) +BOBJELANG="en" + +# The name of the product being installed. +PRODUCTID_NAME="BusinessObjects" + +# The version of Business Objects Enterprise. +BOBJEVERSION="12.0" + +# The version of the product being installed. +PRODUCTID_VER="12.0" + +# The license key to install Business Objects Enterprise. +BOBJELICENSEKEY= + +# The product id key. ( The product id is usually the same as the BOBJELICENSEKEY ) +PIDKEY= + + +[Installation Information] +# The installation function to perform. (i.e. install) +FUNCTION=install + +# The type of installation. (i.e. new / custom / webtier ) +INSTALLTYPE= + +# A comma-delimited list of flags that describe the operating mode of the Installer +# The following flags are supported: +# install - running a new install of the product +# modify - running a modify install on a previously installed product +# remove - running a uninstall of on a previously installed product +# integrated - the current install is running from within another installed (ie. integrated langpacks) +# interactive - UI is enabled and can prompt for user response +INSTALLMODE= + +# The name of the local server. +LOCALNAMESERVER= + +# Whether to perform a user or system install. +BOBJEINSTALLLOCAL= + +# The language packs to install. +# Each language is specified using the short format and is seperated by a space. +# Example: LANGPACKS_TO_INSTALL=en fr +LANGPACKS_TO_INSTALL= + +# List of all languages included in the product. +# Each language is specified using the short format and is seperated by a comma. +# Example: LANGUAGES_TO_INSTALL=en,fr +LANGUAGES_TO_INSTALL= + +# The Business Objects Enterprise username. +BOBJEUSERNAME= + +# Specified servers to add. +EXPANDSERVERS= + + +[Tomcat] +# Whether or not to install Tomcat. +INSTALLTOMCAT= + +# The connection port. +CONNECTORPORT="8080" + +# The redirection port. +REDIRECTPORT="8443" + +# The shutdown port. +SHUTDOWNPORT="8005" + + +[Application Server] +# The path of the Application Server directory (If an Application Server +# is being installed). This path is automatically set using the installation +# directory. +AS_DIR= + +# The Application Server name. +# Defaults to tomcat55 if Tomcat is to be installed. +#AS_SERVER=tomcat55 +AS_SERVER=tomcat7 + +# The instance of the Application Server. (e.g. localhost) +# Defaults to localhost if Tomcat is to be installed. +AS_INSTANCE=localhost + +# The Application Server port. +AS_ADMIN_PORT= + +# The Application Server deployment action. (i.e. deploy or predeploy) +WDEPLOYACTION=deploy + + +[CMS Cluster] +# Whether or not to cluster the CMS. +CMSCLUSTER= + +# The CMS name to cluster to. +CLUSTER_NAMESERVER= + +# The CMS port number to cluster to. +CLUSTERPORTNUMBER="6400" + + +[CMS] +# The type of database. (e.g. MySQL, DB2, Oracle,SQL Anywhere) +DBTYPE= + +# The service name of the CMS. +SERVICENAME="BOE120" + +# The username to connect to the database. +DATABASEUID= + +# The password to connect to the database. +DATABASEPWD= + +# The name of the CMS server. +CMSNAMESERVER= + +# The port number used to communicate with the CMS. +CMSPORTNUMBER="6400" + +# The password used to connect to the CMS. +CMSPASSWORD="" + +# The server intelligence agent node name. +SIANODENAME= + +# The port used to communicate with the server intelligence agent. +SIAPORTNUMBER="6410" + +# Whether or not to reinitialize the database. +REINIT="" + + +[SQLANYWHERE] +# Whether or not to install SQL Anywhere +INSTALLSQLANYWHERE= + +# The port number used to communicate with the SQL Anywhere database. +SERVICEPORT="2638" + +# The name of the server hosting the SQL Anywhere database. +SQLANYWHEREHOSTNAME= + +# The root password for the SQL Anywhere database. +SQLANYWHEREROOTPWD= + + +[Audit] +# Whether or not auditing is enabled. +AUDITINGENABLED= + +# The service audit name of the CMS. +SERVICENAME_AUDIT="BOE120_AUDIT" + +# The port number used to communicate with the SQL Anywhere database. +SERVICEPORT_AUDIT="2638" + +# The name of the server hosting the SQL Anywhere database. +SQLANYWHEREHOSTNAME_AUDIT= + +# The audit username to connect to the database. +DATABASEUID_AUDIT= + +# The audit password to connect to the database. +DATABASEPWD_AUDIT= + + +[Marketing Products] +# This feature manually enables specified marketing products. Each marketing product +# specified must be seperated by a comma. +# For a custom install this field is used to enable those products which are different from a default new installation. +# Example: ENABLEMP=BusinessObjects.MySQL,BusinessObjects.WebTierComponents +ENABLEMP= + +# This feature manually disables specified marketing products. Each marketing product +# specified must be seperated by a comma. +# For a custom install this field is used to disable those products which are different from a default new installation. +# Example: DISABLEMP=BusinessObjects.MySQL,BusinessObjects.WebTierComponents +DISABLEMP= + + +[New Settings] +# All uncommented settings are added here. diff --git a/ansible/roles/oracle-19c-client/tasks/main.yml b/ansible/roles/oracle-19c-client/tasks/main.yml index 5a64867ed..e3584fc4a 100644 --- a/ansible/roles/oracle-19c-client/tasks/main.yml +++ b/ansible/roles/oracle-19c-client/tasks/main.yml @@ -1,24 +1,42 @@ --- +# - name: debug value of {{ oracle_home }} +# debug: +# var: oracle_home + +- name: print value of {{ oracle_home }} + ansible.builtin.debug: + msg: "{{ oracle_home }}" + - name: Check oracle 19c Client Software installed ansible.builtin.stat: path: "{{ oracle_home }}/bin/sqlplus" register: client_software_installed -- block: - - import_tasks: download_software.yml - tags: - - amibuild - - oracle_client_software_download +- name: print value of registered variable client_software_installed + ansible.builtin.debug: + var: client_software_installed + +# - block: +# - import_tasks: download_software.yml +# tags: +# - amibuild +# - oracle_client_software_download + +# - import_tasks: install_client.yml +# tags: +# - amibuild +# - oracle_client_install + +# - import_tasks: cleanup.yml +# tags: +# - ec2provision +# - oracle_client_cleanup - - import_tasks: install_client.yml - tags: - - amibuild - - oracle_client_install +# # block +# when: not client_software_installed.stat.exists - - import_tasks: cleanup.yml - tags: - - ec2provision - - oracle_client_cleanup +- name: just download the client software + import_tasks: download_software.yml - # block - when: not client_software_installed.stat.exists +- name: just install the client software + import_tasks: install_client.yml From 63cc21e92c7b1461a55e72fd79eed39741ce5ed9 Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Thu, 11 Apr 2024 15:27:46 +0100 Subject: [PATCH 5/6] change software version --- ansible/roles/onr-get/defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/onr-get/defaults/main.yml b/ansible/roles/onr-get/defaults/main.yml index 835e48748..62980f40b 100644 --- a/ansible/roles/onr-get/defaults/main.yml +++ b/ansible/roles/onr-get/defaults/main.yml @@ -4,7 +4,8 @@ artefacts_s3_bucket_path: hmpps/onr artefact_dir: /u02 app_dir: /u01/software/BOE_3_1_FP7_4_Linux -boe_software: ENTERPRISE07P_4-10007478.TGZ +# boe_software: ENTERPRISE07P_4-10007478.TGZ +boe_software: ENTERPRISE07_0-10007478.TGZ stage: "{{ artefact_dir }}/stage" temp: "{{ artefact_dir }}/temp" From b83055032e7d99a193b23363c27f9222937894c4 Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Thu, 11 Apr 2024 17:30:27 +0100 Subject: [PATCH 6/6] revert role changes --- .../roles/oracle-19c-client/tasks/main.yml | 48 ++++++------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/ansible/roles/oracle-19c-client/tasks/main.yml b/ansible/roles/oracle-19c-client/tasks/main.yml index e3584fc4a..5a64867ed 100644 --- a/ansible/roles/oracle-19c-client/tasks/main.yml +++ b/ansible/roles/oracle-19c-client/tasks/main.yml @@ -1,42 +1,24 @@ --- -# - name: debug value of {{ oracle_home }} -# debug: -# var: oracle_home - -- name: print value of {{ oracle_home }} - ansible.builtin.debug: - msg: "{{ oracle_home }}" - - name: Check oracle 19c Client Software installed ansible.builtin.stat: path: "{{ oracle_home }}/bin/sqlplus" register: client_software_installed -- name: print value of registered variable client_software_installed - ansible.builtin.debug: - var: client_software_installed - -# - block: -# - import_tasks: download_software.yml -# tags: -# - amibuild -# - oracle_client_software_download - -# - import_tasks: install_client.yml -# tags: -# - amibuild -# - oracle_client_install - -# - import_tasks: cleanup.yml -# tags: -# - ec2provision -# - oracle_client_cleanup +- block: + - import_tasks: download_software.yml + tags: + - amibuild + - oracle_client_software_download -# # block -# when: not client_software_installed.stat.exists + - import_tasks: install_client.yml + tags: + - amibuild + - oracle_client_install -- name: just download the client software - import_tasks: download_software.yml + - import_tasks: cleanup.yml + tags: + - ec2provision + - oracle_client_cleanup -- name: just install the client software - import_tasks: install_client.yml + # block + when: not client_software_installed.stat.exists