diff --git a/ansible/group_vars/server_type_ncr_bip_cmc.yml b/ansible/group_vars/server_type_ncr_bip_cmc.yml index 7c9dead89..82b364860 100644 --- a/ansible/group_vars/server_type_ncr_bip_cmc.yml +++ b/ansible/group_vars/server_type_ncr_bip_cmc.yml @@ -14,21 +14,21 @@ users_and_groups_system: - sapsys server_type_roles_list: - # - users-and-groups - # - sudoers - # - get-ec2-facts - # - set-ec2-hostname - # - domain-search - # - disable-ipv6 - # - disable-firewall - # - time - # - packages - # - message-of-the-day - # - amazon-ssm-agent - # - amazon-cli - # - disks - # - oracle-19c-client - # - oracle-tns-entries + - users-and-groups + - sudoers + - get-ec2-facts + - set-ec2-hostname + - domain-search + - disable-ipv6 + - disable-firewall + - time + - packages + - message-of-the-day + - amazon-ssm-agent + - amazon-cli + - disks + - oracle-19c-client + - oracle-tns-entries - ncr-bip-cmc roles_list: "{{ (ami_roles_list | default([]) | difference(server_type_roles_list | default([]))) + (server_type_roles_list | default([])) }}" diff --git a/ansible/roles/ncr-bip-cmc/defaults/main.yml b/ansible/roles/ncr-bip-cmc/defaults/main.yml index 66d4ab2c2..91a9d3846 100644 --- a/ansible/roles/ncr-bip-cmc/defaults/main.yml +++ b/ansible/roles/ncr-bip-cmc/defaults/main.yml @@ -5,10 +5,6 @@ sap_bi_platform_extraction_directory: /u02/software/BIP_4_3_SP1 sap_bi_platform_installation_directory: /u01/app/bobj/BIP4 sap_jvm_unpack_base_directory: /opt/sap/java -sap_bi_platform_platform_files: - - BIPLATS4303P_300-70002683_P1.EXE - - BIPLATS4303P_300-70002683_P2.RAR - s3: bip_bucket_name: nomis-combined-reporting-bip-packages20230612143115114600000001 packages_prefix: BIP/ @@ -20,4 +16,4 @@ s3: sap_jvm: SAPJVM8_94-80000202.SAR sapcar: SAPCAR_1324-80000935.EXE -ssm_parameters_prefix: "bi-platform-cmc" +ssm_parameters_prefix: "bip-cmc" diff --git a/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml b/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml index 5bd67a523..369b2add9 100644 --- a/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml +++ b/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml @@ -19,6 +19,7 @@ - name: Perform pre-requesite checks become_user: bobj ansible.builtin.shell: "/u02/software/BIP_4_3_SP1/setup.sh -InstallDir /u01/app/bobj/BIP4/ -pre_requisite_check /u02/software/BIP_4_3_SP1/prereq_checks.ini /u02/software/BIP_4_3_SP1/failedPrereqs.txt" + ignore_errors: true - name: Run Silent Installation become_user: bobj diff --git a/ansible/roles/ncr-bip-cmc/tasks/main.yml b/ansible/roles/ncr-bip-cmc/tasks/main.yml index 669b327b9..40fb0373b 100644 --- a/ansible/roles/ncr-bip-cmc/tasks/main.yml +++ b/ansible/roles/ncr-bip-cmc/tasks/main.yml @@ -1,51 +1,51 @@ --- -# - import_tasks: get_facts.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] - -# - import_tasks: install_packages.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] - -# - import_tasks: add_groups.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] - -# - import_tasks: assign_permissions.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] - -# - import_tasks: users.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] - -# - import_tasks: retrieve_files.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] - -# - import_tasks: extract_files.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] - -# - import_tasks: add_response_file.yml -# tags: -# - amibuild -# - ec2provision -# when: ansible_distribution in ['RedHat'] +- import_tasks: get_facts.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] + +- import_tasks: install_packages.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] + +- import_tasks: add_groups.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] + +- import_tasks: assign_permissions.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] + +- import_tasks: users.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] + +- import_tasks: retrieve_files.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] + +- import_tasks: extract_files.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] + +- import_tasks: add_response_file.yml + tags: + - amibuild + - ec2provision + when: ansible_distribution in ['RedHat'] - import_tasks: install_bip_cmc.yml tags: diff --git a/ansible/roles/ncr-bip-cmc/templates/u02/software/BIP_4_3_SP1/cmc_response.ini b/ansible/roles/ncr-bip-cmc/templates/u02/software/BIP_4_3_SP1/cmc_response.ini index dc2c03645..2572bd63c 100644 --- a/ansible/roles/ncr-bip-cmc/templates/u02/software/BIP_4_3_SP1/cmc_response.ini +++ b/ansible/roles/ncr-bip-cmc/templates/u02/software/BIP_4_3_SP1/cmc_response.ini @@ -61,7 +61,7 @@ selectedlanguagepacks=en setupuilanguage=en ### SIA node name -sianame=t1ncrbipcmc +sianame=NOMIS1 ### SIA connector port siaport=6410 diff --git a/ansible/roles/ncr-bip/defaults/main.yml b/ansible/roles/ncr-bip/defaults/main.yml index 5ce49be8d..1a0f6f6ed 100644 --- a/ansible/roles/ncr-bip/defaults/main.yml +++ b/ansible/roles/ncr-bip/defaults/main.yml @@ -5,10 +5,6 @@ sap_bi_platform_extraction_directory: /u02/software/BIP_4_3_SP1 sap_bi_platform_installation_directory: /u01/app/bobj/BIP4 sap_jvm_unpack_base_directory: /opt/sap/java -sap_bi_platform_platform_files: - - BIPLATS4303P_300-70002683_P1.EXE - - BIPLATS4303P_300-70002683_P2.RAR - s3: bip_bucket_name: nomis-combined-reporting-bip-packages20230612143115114600000001 packages_prefix: BIP/ @@ -20,4 +16,4 @@ s3: sap_jvm: SAPJVM8_94-80000202.SAR sapcar: SAPCAR_1324-80000935.EXE -ssm_parameters_prefix: "bi-platform" +ssm_parameters_prefix: "bip" diff --git a/ansible/roles/ncr-bip/tasks/add_response_file.yml b/ansible/roles/ncr-bip/tasks/add_response_file.yml index f27bee9a1..fbfb7888e 100644 --- a/ansible/roles/ncr-bip/tasks/add_response_file.yml +++ b/ansible/roles/ncr-bip/tasks/add_response_file.yml @@ -8,7 +8,7 @@ - name: Copy response file ansible.builtin.template: - src: u02/software/BIP_4_3_SP1/cmc_response.ini + src: u02/software/BIP_4_3_SP1/bip_response.ini dest: "{{ sap_bi_platform_extraction_directory }}/bip_response.ini" owner: bobj group: binstall @@ -18,34 +18,34 @@ ansible.builtin.lineinfile: path: "{{ sap_bi_platform_extraction_directory }}/bip_response.ini" regexp: "^clusterkey=" - line: "clusterkey={{ bip_cmc_cms_cluster_key }}" + line: "clusterkey={{ bip_cms_cluster_key }}" - name: Ensure cms admin password is set in response file ansible.builtin.lineinfile: path: "{{ sap_bi_platform_extraction_directory }}/bip_response.ini" regexp: "^cmspassword=" - line: "cmspassword={{ bip_cmc_cms_admin_password }}" + line: "cmspassword={{ bip_cms_admin_password }}" -- name: Ensure lcm password is set in response file +- name: Ensure cms db password is set in response file ansible.builtin.lineinfile: path: "{{ sap_bi_platform_extraction_directory }}/bip_response.ini" - regexp: "^lcmpassword=" - line: "lcmpassword={{ bip_cmc_lcm_password }}" + regexp: "^existingcmsdbpassword=" + line: "existingcmsdbpassword={{ bip_cms_db_password }}" -- name: Ensure cms db password is set in response file +- name: Ensure lcm password is set in response file ansible.builtin.lineinfile: path: "{{ sap_bi_platform_extraction_directory }}/bip_response.ini" - regexp: "^existingcmsdbpassword=" - line: "existingcmsdbpassword={{ bip_cmc_cms_db_password }}" + regexp: "^lcmpassword=" + line: "lcmpassword={{ bip_lcm_password }}" -- name: Ensure auditing db password is set in response file +- name: Ensure node name is set in response file ansible.builtin.lineinfile: path: "{{ sap_bi_platform_extraction_directory }}/bip_response.ini" - regexp: "^existingauditingdbpassword=" - line: "existingauditingdbpassword={{ bip_cmc_auditing_db_password }}" + regexp: "^sianame=" + line: "sianame=NOMIS{{ node_number }}" - name: Ensure product key is set in response file ansible.builtin.lineinfile: path: "{{ sap_bi_platform_extraction_directory }}/bip_response.ini" regexp: "^productkey=" - line: "productkey={{ bip_cmc_product_key }}" + line: "productkey={{ bip_product_key }}" diff --git a/ansible/roles/ncr-bip/tasks/get_facts.yml b/ansible/roles/ncr-bip/tasks/get_facts.yml index 570cb4c99..9c8dc4745 100644 --- a/ansible/roles/ncr-bip/tasks/get_facts.yml +++ b/ansible/roles/ncr-bip/tasks/get_facts.yml @@ -8,11 +8,21 @@ ssm_parameters_path_bip_cms_cluster_key: "{{ ssm_parameters_path }}/cms_cluster_key" ssm_parameters_path_bip_cms_admin_password: "{{ ssm_parameters_path }}/cms_admin_password" ssm_parameters_path_bip_cms_db_password: "{{ ssm_parameters_path }}/cms_db_password" + ssm_parameters_path_bip_lcm_password: "{{ ssm_parameters_path }}/lcm_password" ssm_parameters_path_bip_product_key: "{{ ssm_parameters_path }}/product_key" - name: Get SSM parameters set_fact: - bip_cmc_cms_cluster_key: "{{ lookup('aws_ssm', ssm_parameters_path_bip_cmc_cms_cluster_key, region=ansible_ec2_placement_region) }}" - bip_cmc_cms_admin_password: "{{ lookup('aws_ssm', ssm_parameters_path_bip_cmc_cms_admin_password, region=ansible_ec2_placement_region) }}" - bip_cmc_cms_db_password: "{{ lookup('aws_ssm', ssm_parameters_path_bip_cmc_cms_db_password, region=ansible_ec2_placement_region) }}" - bip_cmc_product_key: "{{ lookup('aws_ssm', ssm_parameters_path_bip_cmc_product_key, region=ansible_ec2_placement_region) }}" + bip_cms_cluster_key: "{{ lookup('aws_ssm', ssm_parameters_path_bip_cms_cluster_key, region=ansible_ec2_placement_region) }}" + bip_cms_admin_password: "{{ lookup('aws_ssm', ssm_parameters_path_bip_cms_admin_password, region=ansible_ec2_placement_region) }}" + bip_cms_db_password: "{{ lookup('aws_ssm', ssm_parameters_path_bip_cms_db_password, region=ansible_ec2_placement_region) }}" + bip_lcm_password: "{{ lookup('aws_ssm', ssm_parameters_path_bip_lcm_password, region=ansible_ec2_placement_region) }}" + bip_product_key: "{{ lookup('aws_ssm', ssm_parameters_path_bip_product_key, region=ansible_ec2_placement_region) }}" + +- name: Set node number + ansible.builtin.shell: "echo $(({{ ansible_ec2_ami_launch_index }}+2))" + register: node_number_command + +- name: Set node number + set_fact: + node_number: "{{ node_number_command.stdout }}" diff --git a/ansible/roles/ncr-bip/tasks/install_bip.yml b/ansible/roles/ncr-bip/tasks/install_bip.yml index b64f8b877..2d91ee07e 100644 --- a/ansible/roles/ncr-bip/tasks/install_bip.yml +++ b/ansible/roles/ncr-bip/tasks/install_bip.yml @@ -19,6 +19,21 @@ - name: Perform pre-requesite checks become_user: bobj ansible.builtin.shell: "/u02/software/BIP_4_3_SP1/setup.sh -InstallDir /u01/app/bobj/BIP4/ -pre_requisite_check /u02/software/BIP_4_3_SP1/prereq_checks.ini /u02/software/BIP_4_3_SP1/failedPrereqs.txt" + ignore_errors: true + + - name: Verfy checks have passed + become_user: bobj + lineinfile: + path: /u02/software/BIP_4_3_SP1/failedPrereqs.txt + line: "All product pre-reqs have passed." + state: present + check_mode: yes + register: prereqs + failed_when: prereqs is changed + + - name: "sample task in case the String present in the file" + debug: msg="All product pre requesites have passed" + when: prereqs is not changed - name: Run Silent Installation become_user: bobj diff --git a/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/bip_response.ini b/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/bip_response.ini index e69de29bb..b43ab4ba9 100644 --- a/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/bip_response.ini +++ b/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/bip_response.ini @@ -0,0 +1,182 @@ +### Choose to Integrate Introscope Enterprise Manager: integrate or nointegrate +chooseintroscopeintegration=nointegrate + +### Choose to Integrate Solution Manager Diagnostics (SMD) Agent: integrate or nointegrate +choosesmdintegration=nointegrate + +### CMS cluster key +clusterkey=******** + +### CMS administrator password +cmspassword=******** + +### CMS connection port +cmsport=6400 + +### Automatic server start flag: 0 or 1 +enableservers=0 + +### Existing CMS DB password +existingcmsdbpassword=******** + +### Existing CMS DB reset flag: 0 or 1 +existingcmsdbreset=1 + +### Existing CMS DB server +existingcmsdbserver=BIPSYS + +### Existing CMS DB user name +existingcmsdbuser=BIP_SYSTEM_OWNER + +### Installation Directory +installdir=/u01/app/bobj/BIP4/ + +### Choose install type: default, custom, webtier +installtype=custom + +### LCM Name +lcmname=t1-ncr-bip-cmc.nomis-combined-reporting.hmpps-test.modernisation-platform.service.justice.gov.uk + +### LCM password +lcmpassword=******** + +### LCM port +lcmport=3690 + +### Choose install mode: new, expand +neworexpandinstall=expand + +### Product Keycode +productkey=******** + +requiredspace=20554 + +### Language Packs Selected to Install +selectedlanguagepacks=en + +### Setup UI Language +setupuilanguage=en + +### SIA node name +sianame=***** + +### SIA connector port +siaport=6410 + +### CMS Database Type +usingcmsdbtype=oracle + +### WACS port +wacsport=6455 + +### Available features +### ------------------ +### root +### WebTier +### JavaWebApps1 +### MobileServices +### MobileServers +### MobileAddon +### IntegratedTomcat +### Servers +### PlatformServers +### CMS +### FRS +### PlatformServers.IntegratedDB.SQLAnywhere +### PlatformServers.EventServer +### PlatformServers.WebAppContainerService +### AdaptiveProcessingServer +### AdaptiveJobServer +### Platform.RestWebService +### Platform.Action.Framework.backend +### Subversion +### ConnectionServices +### ConnectionProcService +### DataFederatorServices +### DataFederatorQueryService +### AdvancedAnalysisServices +### MultidimensionalAnalysisServices +### BExWebApplicationsService +### CrystalReportsServers +### CrystalReportsProcServices +### CrystalReportSchedulingServices +### WebIServers +### WebIProcServer +### WebISchedulingServices +### XcelsiusServers +### BWPublisherServerUNIX +### ExtAuth +### ExtAuth.JDEdwards +### ExtAuth.Peoplesoft +### ExtAuth.OracleEBS +### ExtAuth.SAPR3 +### AdministratorTools +### Automation.Framework +### PromotionManagementWizard +### MultitenancyManager +### DeveloperTools +### SL_SDK +### SL_SDK_java +### SL_SDKSamples +### WebI_REST_samples +### SPL_Warehouse +### DataAccess +### DataAccess.DataFederator +### DataAccess.HPVertica +### DataAccess.MySQL +### DataAccess.GenericJDBC +### DataAccess.GenericOLEDB +### DataAccess.OptionalDataDirectODBC.DataDirect7.1 +### DataAccess.MaxDB +### DataAccess.SQLite +### DataAccess.SAPHANA +### DataAccess.Snowflake +### DataAccess.PrestoDB +### DataAccess.TrinoDB +### DataAccess.MariaDB +### DataAccess.MongoDB +### DataAccess.Athena +### DataAccess.Denodo +### DataAccess.Salesforce +### DataAccess.Netezza +### DataAccess.Microsoft_AnalyticalServices +### DataAccess.MicrosoftExchange +### DataAccess.MicrosoftOutlook +### DataAccess.Microsoft_SQLServer +### DataAccess.Microsoft_Access +### DataAccess.Greenplum +### DataAccess.PostgreSQL +### DataAccess.Progress +### DataAccess.IBMDB2 +### DataAccess.Informix +### DataAccess.Oracle +### DataAccess.Sybase +### DataAccess.Teradata +### DataAccess.SAPBW +### DataAccess.SAPERP +### DataAccess.XMLWebServices +### DataAccess.OData +### DataAccess.PersonalFiles +### DataAccess.JavaBean +### DataAccess.OpenConnectivity +### DataAccess.BigQuery +### DataAccess.HadoopHive +### DataAccess.Amazon +### DataAccess.Spark +### DataAccess.Hortonworks +### DataAccess.Essbase +### DataAccess.Universe +### DataAccess.MyCube +### DataAccess.XML +### DataAccess.ADO.NET +### DataAccess.COMData +### DataAccess.DataSet +### DataAccess.SymantecACT +### DataAccess.FieldDefinitions +### DataAccess.FileSystem +### DataAccess.NTEventLog +### DataAccess.WebActivityLog +### DataAccess.dBase.DataDirect7.1 +### DataAccess.CMSDBDriver +### Samples +features=JavaWebApps1,MobileAddon,CMS,FRS,PlatformServers.EventServer,AdaptiveProcessingServer,AdaptiveJobServer,Platform.RestWebService,Platform.Action.Framework.backend,Subversion,ConnectionProcService,ConnectionServices,DataFederatorQueryService,DataFederatorServices,MultidimensionalAnalysisServices,CrystalReportsProcServices,CrystalReportSchedulingServices,CrystalReportsServers,WebIProcServer,WebISchedulingServices,WebIServers,XcelsiusServers,BWPublisherServerUNIX,ExtAuth.SAPR3,Automation.Framework,PromotionManagementWizard,MultitenancyManager,AdministratorTools,SL_SDK_java,SL_SDKSamples,SL_SDK,DataAccess.DataFederator,DataAccess.MySQL,DataAccess.GenericJDBC,DataAccess.GenericOLEDB,DataAccess.OptionalDataDirectODBC.DataDirect7.1,DataAccess.SQLite,DataAccess.Snowflake,DataAccess.PrestoDB,DataAccess.TrinoDB,DataAccess.MariaDB,DataAccess.MongoDB,DataAccess.Athena,DataAccess.Denodo,DataAccess.Microsoft_AnalyticalServices,DataAccess.MicrosoftExchange,DataAccess.MicrosoftOutlook,DataAccess.Microsoft_SQLServer,DataAccess.Microsoft_Access,DataAccess.Oracle,DataAccess.XMLWebServices,DataAccess.OData,DataAccess.PersonalFiles,DataAccess.JavaBean,DataAccess.OpenConnectivity,DataAccess.BigQuery,DataAccess.Universe,DataAccess.MyCube,DataAccess.XML,DataAccess.ADO.NET,DataAccess.COMData,DataAccess.DataSet,DataAccess.FileSystem,DataAccess.NTEventLog,DataAccess.WebActivityLog,DataAccess.dBase.DataDirect7.1,DataAccess.CMSDBDriver,Samples \ No newline at end of file diff --git a/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/prereq_checks.ini b/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/prereq_checks.ini index 9c0797307..c2efe6d1d 100644 --- a/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/prereq_checks.ini +++ b/ansible/roles/ncr-bip/templates/u02/software/BIP_4_3_SP1/prereq_checks.ini @@ -2,5 +2,5 @@ # For full instructions on customizing it to suit your environment, please consult the Install Guide. # InstallDir requires a trailing slash -InstallDir=/u01/app/bobj/BIP4 +InstallDir=/u01/app/bobj/BIP4/ SetupUILanguage=en \ No newline at end of file