From 5238f93ff9fed18a8846ea67a6ed83fef9cca857 Mon Sep 17 00:00:00 2001 From: sandhya Gandalwar Date: Tue, 28 Nov 2023 11:54:39 +0000 Subject: [PATCH 01/30] Added libraries and cache reload in code and removed delay in service --- ansible/roles/oasys-bip/tasks/services.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index a62d27f27..c71c449cd 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -1,4 +1,9 @@ --- + +- name: Run command to create the necessary links and cache to the most recent shared libraries + become_user: oracle + ansible.builtin.shell: ldconfig + - name: Stop Weblogic and nodemanager become_user: oracle ansible.builtin.shell: | @@ -69,9 +74,9 @@ - wls_nodemanager - wls_adminserver -- name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins - ansible.builtin.pause: - minutes: 15 +# - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins +# ansible.builtin.pause: +# minutes: 15 - name: Start weblogic services ansible.builtin.service: @@ -80,6 +85,6 @@ loop: - wls_managedserver -- name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins - ansible.builtin.pause: - minutes: 15 +# - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins +# ansible.builtin.pause: +# minutes: 15 From 5565388a4920e5ade4bcf421948d71c11de87e3b Mon Sep 17 00:00:00 2001 From: sandhya Gandalwar Date: Tue, 28 Nov 2023 13:39:43 +0000 Subject: [PATCH 02/30] Updated services.yml to add the pause back --- ansible/roles/oasys-bip/tasks/services.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index c71c449cd..cd1a01ee7 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -1,7 +1,6 @@ --- - name: Run command to create the necessary links and cache to the most recent shared libraries - become_user: oracle ansible.builtin.shell: ldconfig - name: Stop Weblogic and nodemanager @@ -24,7 +23,7 @@ group: oinstall mode: "0700" -- name: Copy nodemanager systemd helper scripts +- name: Copy systemd helper scripts ansible.builtin.template: src: "10.3{{ item }}" dest: "{{ item }}" @@ -74,11 +73,11 @@ - wls_nodemanager - wls_adminserver -# - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins -# ansible.builtin.pause: -# minutes: 15 +- name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins + ansible.builtin.pause: + minutes: 15 -- name: Start weblogic services +- name: Start weblogic managed server ansible.builtin.service: name: "{{ item }}" state: started From d28cf2badc057ea7dbe19d107539f3f063a4e9d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Nov 2023 11:55:50 +0000 Subject: [PATCH 03/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index cd1a01ee7..b3e35d75c 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -1,5 +1,4 @@ --- - - name: Run command to create the necessary links and cache to the most recent shared libraries ansible.builtin.shell: ldconfig @@ -83,7 +82,6 @@ state: started loop: - wls_managedserver - # - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 15 From 298b23e12a43e08827c7d49dd3caa13ddcd02a1e Mon Sep 17 00:00:00 2001 From: sandhya Gandalwar Date: Tue, 28 Nov 2023 13:59:51 +0000 Subject: [PATCH 04/30] Added pause of 15mins back before starting managed server --- ansible/roles/oasys-bip/tasks/services.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index b3e35d75c..dc9b12089 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -22,7 +22,7 @@ group: oinstall mode: "0700" -- name: Copy systemd helper scripts +- name: Copy weblogic systemd helper scripts ansible.builtin.template: src: "10.3{{ item }}" dest: "{{ item }}" @@ -74,14 +74,15 @@ - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: - minutes: 15 + minutes: 1 + +# - name: Start weblogic managed server +# ansible.builtin.service: +# name: "{{ item }}" +# state: started +# loop: +# - wls_managedserver -- name: Start weblogic managed server - ansible.builtin.service: - name: "{{ item }}" - state: started - loop: - - wls_managedserver # - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 15 From 5cf7e80e17011698883fe8a46793f4823de009d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Nov 2023 11:55:50 +0000 Subject: [PATCH 05/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index dc9b12089..d29ae9c66 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -1,6 +1,7 @@ --- - name: Run command to create the necessary links and cache to the most recent shared libraries - ansible.builtin.shell: ldconfig + become_user: oracle + ansible.builtin.shell: ldconfig - name: Stop Weblogic and nodemanager become_user: oracle From 5684ddc846223314c7b887cca688534b97b195b5 Mon Sep 17 00:00:00 2001 From: sandhya Gandalwar Date: Tue, 28 Nov 2023 13:59:51 +0000 Subject: [PATCH 06/30] Added pause of 15mins back before starting managed server --- ansible/roles/oasys-bip/tasks/services.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index d29ae9c66..cc5279159 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -1,7 +1,6 @@ --- -- name: Run command to create the necessary links and cache to the most recent shared libraries - become_user: oracle - ansible.builtin.shell: ldconfig +- name: Reload necessary links and cache to the most recent shared libraries + ansible.builtin.shell: ldconfig - name: Stop Weblogic and nodemanager become_user: oracle From 677544c9686ad18f9fa9b7ae343f113d2f179182 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Nov 2023 14:00:37 +0000 Subject: [PATCH 07/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index cc5279159..7c6dc4022 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -1,6 +1,6 @@ --- - name: Reload necessary links and cache to the most recent shared libraries - ansible.builtin.shell: ldconfig + ansible.builtin.shell: ldconfig - name: Stop Weblogic and nodemanager become_user: oracle From 49d4be9365f5ac1974aa4d9f5f5be8be5f9cf199 Mon Sep 17 00:00:00 2001 From: wullub Date: Thu, 30 Nov 2023 11:36:06 +0000 Subject: [PATCH 08/30] add wls managedserver script add wls managedserver script --- .../oasys-bip/tasks/clone_bip_software.yml | 8 ++ .../templates/startManagedWebLogic.sh.j2 | 108 ++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 diff --git a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml index 0bfa30196..cbdf20d54 100644 --- a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml +++ b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml @@ -247,6 +247,14 @@ mode: "0600" remote_src: true + - name: Fix startManagedWebLogic.sh + ansible.builtin.template: + src: "startManagedWebLogic.sh.j2" + dest: "{{domain_home}}/{{domain_name}}/bin/startManagedWebLogic.sh" + owner: oracle + group: oinstall + mode: "0750" + - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: minutes: 15 diff --git a/ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 b/ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 new file mode 100644 index 000000000..ccde75b8e --- /dev/null +++ b/ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 @@ -0,0 +1,108 @@ + +#!/bin/sh + +# WARNING: This file is created by the Configuration Wizard. +# Any changes to this script may be lost when adding extensions to this configuration. +# ... and then replaced by ansible in https://github.com/ministryofjustice/modernisation-platform-configuration-management.git + +# --- Start Functions --- + +usage() +{ + echo "Need to set SERVER_NAME and ADMIN_URL environment variables or specify" + echo "them in command line:" + echo "Usage: $1 SERVER_NAME {ADMIN_URL}" + echo "for example:" + echo "$1 managedserver1 http://t1-oasys-bip-b.oasys.hmpps-test.modernisation-platform.internal:7001" +} + +# --- End Functions --- + +# ************************************************************************* +# This script is used to start a managed WebLogic Server for the domain in +# the current working directory. This script can either read in the SERVER_NAME and +# ADMIN_URL as positional parameters or will read them from environment variables that are +# set before calling this script. If SERVER_NAME is not sent as a parameter or exists with a value +# as an environment variable the script will EXIT. If the ADMIN_URL value cannot be determined +# by reading a parameter or from the environment a default value will be used. +# +# For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server" +# (http://download.oracle.com/docs/cd/E23943_01/web.1111/e13708/overview.htm) +# ************************************************************************* + +# Set SERVER_NAME to the name of the server you wish to start up. + +DOMAIN_NAME="bifoundation_domain" + +ADMIN_URL="http://t1-oasys-bip-b.oasys.hmpps-test.modernisation-platform.internal:7001" + +# Set WLS_USER equal to your system username and WLS_PW equal + +# to your system password for no username and password prompt + +# during server startup. Both are required to bypass the startup + +# prompt. + +WLS_USER="" +export WLS_USER + +WLS_PW="" +export WLS_PW + +# Set JAVA_OPTIONS to the java flags you want to pass to the vm. i.e.: + +# set JAVA_OPTIONS=-Dweblogic.attribute=value -Djava.attribute=value + +JAVA_OPTIONS="-Dweblogic.security.SSL.trustedCAKeyStore=\"/u01/app/oracle/Middleware/wlserver_10.3/server/lib/cacerts\" ${JAVA_OPTIONS}" +export JAVA_OPTIONS + +# Set JAVA_VM to the java virtual machine you want to run. For instance: + +# set JAVA_VM=-server + +JAVA_VM="" + +# Set SERVER_NAME and ADMIN_URL, they must by specified before starting + +# a managed server, detailed information can be found at + +# http://download.oracle.com/docs/cd/E23943_01/web.1111/e13708/overview.htm + +if [ "$1" = "" ] ; then + if [ "${SERVER_NAME}" = "" ] ; then + usage $0 + exit + fi +else + SERVER_NAME="$1" + shift +fi + +if [ "$1" = "" ] ; then + if [ "${ADMIN_URL}" = "" ] ; then + usage $0 + exit + fi +else + ADMIN_URL="$1" + shift +fi + +# Export the admin_url whether the user specified it OR it was sent on the command-line + +ADMIN_URL="${ADMIN_URL}" +export ADMIN_URL + +SERVER_NAME="${SERVER_NAME}" +export SERVER_NAME + +DOMAIN_HOME="/u01/app/oracle/Middleware/user_projects/domains/bifoundation_domain" + +if [ "$1" = "" ] ; then + # Call Weblogic Server with our default params since the user did not specify any other ones + ${DOMAIN_HOME}/bin/startWebLogic.sh nodebug noderby noiterativedev notestconsole noLogErrorsToConsole +else + # Call Weblogic Server with the params the user sent in INSTEAD of the defaults + ${DOMAIN_HOME}/bin/startWebLogic.sh $1 $2 $3 $4 $5 $6 $7 $8 $9 +fi \ No newline at end of file From 80ffbe0b6f7221381a80dd19a2297b05c0a56d76 Mon Sep 17 00:00:00 2001 From: sandhya Gandalwar Date: Thu, 30 Nov 2023 12:19:57 +0000 Subject: [PATCH 09/30] Updated to change JDK location from S3 bucket --- ansible/roles/oasys-bip/tasks/install-jdk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/install-jdk.yml b/ansible/roles/oasys-bip/tasks/install-jdk.yml index 6a819893e..a49e8d964 100644 --- a/ansible/roles/oasys-bip/tasks/install-jdk.yml +++ b/ansible/roles/oasys-bip/tasks/install-jdk.yml @@ -22,7 +22,7 @@ mode: get overwrite: latest loop: - - /u01/software/jdk/jdk-7u80-linux-x64.rpm + - /jdk/jdk-7u80-linux-x64.rpm when: image_builder_s3_bucket_name is defined - name: Install jdk rpm binary From 97de363582e773e0e430739488fc44c7ee1235ee Mon Sep 17 00:00:00 2001 From: wullub Date: Thu, 30 Nov 2023 13:53:32 +0000 Subject: [PATCH 10/30] Update clone_bip_software.yml --- ansible/roles/oasys-bip/tasks/clone_bip_software.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml index cbdf20d54..1d17eaf75 100644 --- a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml +++ b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml @@ -218,7 +218,7 @@ - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: - minutes: 15 + minutes: 1 - name: Oracle BIP NodeManager config cloning become_user: oracle @@ -257,7 +257,7 @@ - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: - minutes: 15 + minutes: 1 - name: Enable Standalone BI Publisher to Add Privileges for Application Roles become_user: oracle From 4dfedf6cbfea23f07420f0c7db7bcc4124285153 Mon Sep 17 00:00:00 2001 From: wullub Date: Thu, 30 Nov 2023 15:46:51 +0000 Subject: [PATCH 11/30] Update services.yml --- ansible/roles/oasys-bip/tasks/services.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 7c6dc4022..30d22c367 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -55,6 +55,8 @@ ansible.builtin.systemd: daemon_reload: true + + - name: Enable wls_nodemanager service ansible.builtin.service: name: "{{ item }}" From 57c92a30a983b5cd10af91215f4935e5ec112714 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 Nov 2023 15:47:33 +0000 Subject: [PATCH 12/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 30d22c367..7c6dc4022 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -55,8 +55,6 @@ ansible.builtin.systemd: daemon_reload: true - - - name: Enable wls_nodemanager service ansible.builtin.service: name: "{{ item }}" From 92cd52772716ca3da23e5916af31d0a60667cd85 Mon Sep 17 00:00:00 2001 From: wullub Date: Mon, 4 Dec 2023 13:28:54 +0000 Subject: [PATCH 13/30] Update services.yml --- ansible/roles/oasys-bip/tasks/services.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 7c6dc4022..0378503df 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -72,7 +72,7 @@ - wls_nodemanager - wls_adminserver -- name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins +- name: Pause for 1 minute to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: minutes: 1 @@ -82,7 +82,6 @@ # state: started # loop: # - wls_managedserver - # - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 15 From 028136b57f0c9f330756a757b8ecf4feeee411f7 Mon Sep 17 00:00:00 2001 From: wullub Date: Mon, 4 Dec 2023 15:03:11 +0000 Subject: [PATCH 14/30] Update setup-log-rotate.yml --- ansible/roles/oasys-bip/tasks/setup-log-rotate.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/setup-log-rotate.yml b/ansible/roles/oasys-bip/tasks/setup-log-rotate.yml index 5f735a7b5..fb41750a7 100644 --- a/ansible/roles/oasys-bip/tasks/setup-log-rotate.yml +++ b/ansible/roles/oasys-bip/tasks/setup-log-rotate.yml @@ -3,15 +3,6 @@ set_fact: weblogic_managed_app: "{{ weblogic_managed_app_list.name }}" -- name: Start services if not already running - ansible.builtin.service: - name: "{{ item }}" - state: started - loop: - - wls_nodemanager - - wls_adminserver - - wls_managedserver - - block: - name: Copy log setup managed app configuration files ansible.builtin.template: From 89a9f5322f4a3135d88135fce3abd2517dfc3a07 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Dec 2023 13:29:34 +0000 Subject: [PATCH 15/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 0378503df..1da78b369 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -75,7 +75,6 @@ - name: Pause for 1 minute to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: minutes: 1 - # - name: Start weblogic managed server # ansible.builtin.service: # name: "{{ item }}" From 97d56df23c7b0ba205f449de05364e5c6332f40d Mon Sep 17 00:00:00 2001 From: wullub Date: Mon, 4 Dec 2023 16:33:57 +0000 Subject: [PATCH 16/30] .. --- ansible/roles/oasys-bip/tasks/main.yml | 5 +++++ ansible/roles/oasys-bip/tasks/service_managedserver.yml | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 ansible/roles/oasys-bip/tasks/service_managedserver.yml diff --git a/ansible/roles/oasys-bip/tasks/main.yml b/ansible/roles/oasys-bip/tasks/main.yml index e4cefb8e9..8ee4bc66a 100644 --- a/ansible/roles/oasys-bip/tasks/main.yml +++ b/ansible/roles/oasys-bip/tasks/main.yml @@ -86,3 +86,8 @@ tags: - bip_db_create - never + +- import_tasks: service_managedserver.yml + tags: + - amibuild + - ec2provision \ No newline at end of file diff --git a/ansible/roles/oasys-bip/tasks/service_managedserver.yml b/ansible/roles/oasys-bip/tasks/service_managedserver.yml new file mode 100644 index 000000000..f2a7ab9aa --- /dev/null +++ b/ansible/roles/oasys-bip/tasks/service_managedserver.yml @@ -0,0 +1,6 @@ +- name: Start weblogic managed server + ansible.builtin.service: + name: "{{ item }}" + state: started + loop: + - wls_managedserver \ No newline at end of file From 4c1b5aa3f60891d13d3f329c7416af0f4abce05c Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 09:25:16 +0000 Subject: [PATCH 17/30] Update main.yml --- ansible/roles/oasys-bip/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/main.yml b/ansible/roles/oasys-bip/tasks/main.yml index 8ee4bc66a..a85bbca9d 100644 --- a/ansible/roles/oasys-bip/tasks/main.yml +++ b/ansible/roles/oasys-bip/tasks/main.yml @@ -87,7 +87,7 @@ - bip_db_create - never -- import_tasks: service_managedserver.yml - tags: - - amibuild - - ec2provision \ No newline at end of file +# - import_tasks: service_managedserver.yml +# tags: +# - amibuild +# - ec2provision \ No newline at end of file From 3a9449584b7a6d07fd0aba47dd197bebe1ab1d5e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Dec 2023 16:34:40 +0000 Subject: [PATCH 18/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/main.yml | 2 +- ansible/roles/oasys-bip/tasks/service_managedserver.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/main.yml b/ansible/roles/oasys-bip/tasks/main.yml index a85bbca9d..824be75c2 100644 --- a/ansible/roles/oasys-bip/tasks/main.yml +++ b/ansible/roles/oasys-bip/tasks/main.yml @@ -90,4 +90,4 @@ # - import_tasks: service_managedserver.yml # tags: # - amibuild -# - ec2provision \ No newline at end of file +# - ec2provision diff --git a/ansible/roles/oasys-bip/tasks/service_managedserver.yml b/ansible/roles/oasys-bip/tasks/service_managedserver.yml index f2a7ab9aa..6eb42af17 100644 --- a/ansible/roles/oasys-bip/tasks/service_managedserver.yml +++ b/ansible/roles/oasys-bip/tasks/service_managedserver.yml @@ -3,4 +3,4 @@ name: "{{ item }}" state: started loop: - - wls_managedserver \ No newline at end of file + - wls_managedserver From 65cdfde75ce6d9404266723730bb8857e5770961 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Dec 2023 09:28:22 +0000 Subject: [PATCH 19/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/main.yml b/ansible/roles/oasys-bip/tasks/main.yml index 824be75c2..e680ad3cc 100644 --- a/ansible/roles/oasys-bip/tasks/main.yml +++ b/ansible/roles/oasys-bip/tasks/main.yml @@ -86,7 +86,6 @@ tags: - bip_db_create - never - # - import_tasks: service_managedserver.yml # tags: # - amibuild From efb3555245fc2708c227278f41e4e10dc2a6ca1c Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 11:55:55 +0000 Subject: [PATCH 20/30] .. --- .../templates/10.3/etc/systemd/system/wls_adminserver.service | 2 +- .../templates/10.3/etc/systemd/system/wls_managedserver.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service index 1c2bd2ea1..3f6fcf4cd 100644 --- a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service +++ b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service @@ -1,9 +1,9 @@ [Unit] Description=WebLogic Admin Server +After=wls_nodemanager [Service] Type=simple -After=wls_nodemanager TimeoutStartSec=300 ExecStart={{ scripts_dir }}/startWebLogic.sh ExecStartPost={{ scripts_dir }}/waitWebLogic.sh diff --git a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service index 94d84ec2b..2833449b5 100644 --- a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service +++ b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service @@ -1,9 +1,9 @@ [Unit] Description=WebLogic managed server Service +After=wls_adminserver [Service] Type=simple -After=wls_adminserver TimeoutStartSec=300 ExecStart={{ scripts_dir }}/startManagedWebLogic.sh ExecStartPost={{ scripts_dir }}/waitManagedWebLogic.sh From 19ebda030561b27764cbcfff43e438a87c22d11a Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 12:09:31 +0000 Subject: [PATCH 21/30] .. --- ansible/roles/oasys-bip/tasks/services.yml | 19 +++++++++++-------- .../systemd/system/wls_adminserver.service | 2 +- .../systemd/system/wls_managedserver.service | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 1da78b369..8c392a2dc 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -72,15 +72,18 @@ - wls_nodemanager - wls_adminserver -- name: Pause for 1 minute to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins +- name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: - minutes: 1 -# - name: Start weblogic managed server -# ansible.builtin.service: -# name: "{{ item }}" -# state: started -# loop: -# - wls_managedserver + minutes: 30 + +- name: Start weblogic managed server + become: yes + ansible.builtin.service: + name: "{{ item }}" + state: started + loop: + - wls_managedserver + # - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 15 diff --git a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service index 3f6fcf4cd..b8c1174d7 100644 --- a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service +++ b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_adminserver.service @@ -1,6 +1,6 @@ [Unit] Description=WebLogic Admin Server -After=wls_nodemanager +After=wls_nodemanager.service [Service] Type=simple diff --git a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service index 2833449b5..d12e2ffce 100644 --- a/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service +++ b/ansible/roles/oasys-bip/templates/10.3/etc/systemd/system/wls_managedserver.service @@ -1,6 +1,6 @@ [Unit] Description=WebLogic managed server Service -After=wls_adminserver +After=wls_adminserver.service [Service] Type=simple From 55fe008130a3d3999962e1b76cc6a3490ac742a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Dec 2023 12:10:14 +0000 Subject: [PATCH 22/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 8c392a2dc..5885135ee 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -83,7 +83,6 @@ state: started loop: - wls_managedserver - # - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 15 From 4cf513172d9c885e88ab724b9b457b33fd50c590 Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 12:18:07 +0000 Subject: [PATCH 23/30] .. --- ansible/roles/oasys-bip/tasks/main.yml | 9 +++++---- .../oasys-bip/tasks/service_managedserver.yml | 4 ++++ ansible/roles/oasys-bip/tasks/services.yml | 20 +++++++++---------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/main.yml b/ansible/roles/oasys-bip/tasks/main.yml index e680ad3cc..e1ba9f7e4 100644 --- a/ansible/roles/oasys-bip/tasks/main.yml +++ b/ansible/roles/oasys-bip/tasks/main.yml @@ -86,7 +86,8 @@ tags: - bip_db_create - never -# - import_tasks: service_managedserver.yml -# tags: -# - amibuild -# - ec2provision + +- import_tasks: service_managedserver.yml + tags: + - amibuild + - ec2provision diff --git a/ansible/roles/oasys-bip/tasks/service_managedserver.yml b/ansible/roles/oasys-bip/tasks/service_managedserver.yml index 6eb42af17..0a8b0b46d 100644 --- a/ansible/roles/oasys-bip/tasks/service_managedserver.yml +++ b/ansible/roles/oasys-bip/tasks/service_managedserver.yml @@ -1,3 +1,7 @@ +- name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins + ansible.builtin.pause: + minutes: 30 + - name: Start weblogic managed server ansible.builtin.service: name: "{{ item }}" diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 8c392a2dc..8f433d172 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -72,17 +72,17 @@ - wls_nodemanager - wls_adminserver -- name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins - ansible.builtin.pause: - minutes: 30 +# - name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins +# ansible.builtin.pause: +# minutes: 30 -- name: Start weblogic managed server - become: yes - ansible.builtin.service: - name: "{{ item }}" - state: started - loop: - - wls_managedserver +# - name: Start weblogic managed server +# become: yes +# ansible.builtin.service: +# name: "{{ item }}" +# state: started +# loop: +# - wls_managedserver # - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: From 22674025cd5e9efc29420646103c93121dde224f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Dec 2023 12:19:55 +0000 Subject: [PATCH 24/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 8f433d172..a96f795fd 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -71,7 +71,6 @@ loop: - wls_nodemanager - wls_adminserver - # - name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 30 From 40f0ada03ff1d2cf0c07c0362039941f8d274d53 Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 13:42:08 +0000 Subject: [PATCH 25/30] try without 30 min wait --- ansible/roles/oasys-bip/tasks/service_managedserver.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/service_managedserver.yml b/ansible/roles/oasys-bip/tasks/service_managedserver.yml index 0a8b0b46d..c252b691d 100644 --- a/ansible/roles/oasys-bip/tasks/service_managedserver.yml +++ b/ansible/roles/oasys-bip/tasks/service_managedserver.yml @@ -1,6 +1,6 @@ -- name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins - ansible.builtin.pause: - minutes: 30 +# - name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins +# ansible.builtin.pause: +# minutes: 30 - name: Start weblogic managed server ansible.builtin.service: From a894bebc951ad97bafe843678c510b3dd8b3f92b Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 14:52:40 +0000 Subject: [PATCH 26/30] Update service_managedserver.yml --- ansible/roles/oasys-bip/tasks/service_managedserver.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/service_managedserver.yml b/ansible/roles/oasys-bip/tasks/service_managedserver.yml index c252b691d..0a8b0b46d 100644 --- a/ansible/roles/oasys-bip/tasks/service_managedserver.yml +++ b/ansible/roles/oasys-bip/tasks/service_managedserver.yml @@ -1,6 +1,6 @@ -# - name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins -# ansible.builtin.pause: -# minutes: 30 +- name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins + ansible.builtin.pause: + minutes: 30 - name: Start weblogic managed server ansible.builtin.service: From cf176953bb33a8e4b467057d7da1ed75c58d4716 Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 16:18:55 +0000 Subject: [PATCH 27/30] .. --- ansible/roles/oasys-bip/tasks/clone_bip_software.yml | 2 +- ansible/roles/oasys-bip/tasks/service_managedserver.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml index 1d17eaf75..2e9bde0ca 100644 --- a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml +++ b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml @@ -218,7 +218,7 @@ - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: - minutes: 1 + minutes: 15 - name: Oracle BIP NodeManager config cloning become_user: oracle diff --git a/ansible/roles/oasys-bip/tasks/service_managedserver.yml b/ansible/roles/oasys-bip/tasks/service_managedserver.yml index 0a8b0b46d..c96e9f712 100644 --- a/ansible/roles/oasys-bip/tasks/service_managedserver.yml +++ b/ansible/roles/oasys-bip/tasks/service_managedserver.yml @@ -1,6 +1,6 @@ - name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins ansible.builtin.pause: - minutes: 30 + minutes: 20 - name: Start weblogic managed server ansible.builtin.service: From a4f743f34d572caac3f23a289d715ac7595f95e1 Mon Sep 17 00:00:00 2001 From: wullub Date: Tue, 5 Dec 2023 17:53:55 +0000 Subject: [PATCH 28/30] Update services.yml --- ansible/roles/oasys-bip/tasks/services.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index a96f795fd..438939546 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -71,6 +71,7 @@ loop: - wls_nodemanager - wls_adminserver + # - name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 30 From e4ed405bcaef10cf517875973e70e88d47dd7fe3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Dec 2023 17:54:42 +0000 Subject: [PATCH 29/30] Commit changes made by code formatters --- ansible/roles/oasys-bip/tasks/services.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/oasys-bip/tasks/services.yml b/ansible/roles/oasys-bip/tasks/services.yml index 438939546..a96f795fd 100644 --- a/ansible/roles/oasys-bip/tasks/services.yml +++ b/ansible/roles/oasys-bip/tasks/services.yml @@ -71,7 +71,6 @@ loop: - wls_nodemanager - wls_adminserver - # - name: Pause for 30 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins # ansible.builtin.pause: # minutes: 30 From 8ed7895970b2236a11ee825ad63ba20875d61d8c Mon Sep 17 00:00:00 2001 From: wullub Date: Wed, 6 Dec 2023 10:23:14 +0000 Subject: [PATCH 30/30] template vars --- ansible/roles/oasys-bip/defaults/main.yml | 2 ++ ansible/roles/oasys-bip/tasks/clone_bip_software.yml | 10 +++++----- .../home/oracle/admin/scripts/set_ms_log_rotation.py | 2 +- .../home/oracle/admin/scripts/weblogic.properties | 4 ++-- .../roles/oasys-bip/templates/AdminServer.properties | 4 ++-- .../templates/addApplicationPrivileges.exp.j2 | 2 +- .../roles/oasys-bip/templates/bi_config_moveplan.xml | 8 ++++---- .../roles/oasys-bip/templates/bi_server1.properties | 6 +++--- ansible/roles/oasys-bip/templates/domain.properties | 4 ++-- ansible/roles/oasys-bip/templates/nm_moveplan.xml | 12 ++++++------ .../oasys-bip/templates/startManagedWebLogic.sh.j2 | 8 ++++---- 11 files changed, 32 insertions(+), 30 deletions(-) diff --git a/ansible/roles/oasys-bip/defaults/main.yml b/ansible/roles/oasys-bip/defaults/main.yml index d3575b814..361c000ee 100644 --- a/ansible/roles/oasys-bip/defaults/main.yml +++ b/ansible/roles/oasys-bip/defaults/main.yml @@ -28,8 +28,10 @@ oas_mds_password_file: "{{ stage }}/oas_mds_password.txt" oas_biplatform_password_file: "{{ stage }}/oas_biplatform_password.txt" weblogic_password_file: "{{ stage }}/weblogic_password.txt" admin_password_file: "{{ stage }}/weblogic_password.txt" +admin_port: 7001 bip_repository_file: bip_repository_12Oct2023.tar weblogic_admin_username: weblogic +admin_server: AdminServer managed_server: bi_server1 scripts_dir: /home/oracle/admin/scripts weblogic_servers: diff --git a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml index 2e9bde0ca..a20cf00e8 100644 --- a/ansible/roles/oasys-bip/tasks/clone_bip_software.yml +++ b/ansible/roles/oasys-bip/tasks/clone_bip_software.yml @@ -216,7 +216,7 @@ collected_files.files }} - - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins + - name: Pause for 15 minutes. Sometimes the cloning can go wrong without a delay. Not sure why. ansible.builtin.pause: minutes: 15 @@ -238,10 +238,10 @@ poll: 30 when: not ansible_check_mode - - name: Boot.properties file creation for bi_server1 + - name: Boot.properties file creation for managed server ansible.builtin.copy: - src: "{{ domain_home }}/{{ domain_name }}/servers/AdminServer/security/boot.properties" - dest: "{{ domain_home }}/{{ domain_name }}/servers/bi_server1/security/boot.properties" + src: "{{ domain_home }}/{{ domain_name }}/servers/{{ admin_server }}/security/boot.properties" + dest: "{{ domain_home }}/{{ domain_name }}/servers/{{ managed_server }}/security/boot.properties" owner: oracle group: oinstall mode: "0600" @@ -255,7 +255,7 @@ group: oinstall mode: "0750" - - name: Pause for 15 minutes to let admin server start properly in few cases even though it was running connecting to it was causing issues for few mins + - name: Pause for 1 minute. Not sure why. ansible.builtin.pause: minutes: 1 diff --git a/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/set_ms_log_rotation.py b/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/set_ms_log_rotation.py index 49a3df0a7..4e904cfac 100644 --- a/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/set_ms_log_rotation.py +++ b/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/set_ms_log_rotation.py @@ -33,7 +33,7 @@ adminURL = configProps.get("admin.url") msName = configProps.get("ms.name") -# Connect to the AdminServer. +# Connect to the {{ admin_server }}. connect(adminUsername, adminPassword, adminURL) edit() diff --git a/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/weblogic.properties b/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/weblogic.properties index 0beca34a8..d831dd35e 100644 --- a/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/weblogic.properties +++ b/ansible/roles/oasys-bip/templates/10.3/home/oracle/admin/scripts/weblogic.properties @@ -1,2 +1,2 @@ -domain.adminServerName=AdminServer -domain.adminurl={{ weblogic_domain_hostname }}:7001 +domain.adminServerName={{ admin_server }} +domain.adminurl={{ weblogic_domain_hostname }}:{{ admin_port }} diff --git a/ansible/roles/oasys-bip/templates/AdminServer.properties b/ansible/roles/oasys-bip/templates/AdminServer.properties index 9976e6d1f..5eeee6a26 100644 --- a/ansible/roles/oasys-bip/templates/AdminServer.properties +++ b/ansible/roles/oasys-bip/templates/AdminServer.properties @@ -1,7 +1,7 @@ # AdminServer connection details. admin.username={{ weblogic_admin_username }} admin.password={{ weblogic_admin_password }} -admin.url={{ weblogic_domain_hostname }}:7001 +admin.url={{ weblogic_domain_hostname }}:{{ admin_port }} # Managed Server -ms.name=AdminServer \ No newline at end of file +ms.name={{ admin_server }} \ No newline at end of file diff --git a/ansible/roles/oasys-bip/templates/addApplicationPrivileges.exp.j2 b/ansible/roles/oasys-bip/templates/addApplicationPrivileges.exp.j2 index 8cdc180b2..3e42407da 100644 --- a/ansible/roles/oasys-bip/templates/addApplicationPrivileges.exp.j2 +++ b/ansible/roles/oasys-bip/templates/addApplicationPrivileges.exp.j2 @@ -1,7 +1,7 @@ #!/usr/bin/expect set PASSWORD [lindex $argv 0] -spawn {{ middleware_home }}/oracle_common/common/bin/wlst.sh {{ stage }}/addBIPCodeGrants.py t3://{{ weblogic_servername }}:7001 weblogic +spawn {{ middleware_home }}/oracle_common/common/bin/wlst.sh {{ stage }}/addBIPCodeGrants.py t3://{{ weblogic_servername }}:{{ admin_port }} weblogic expect "\Please enter password:\]" send "$PASSWORD\r" expect eof \ No newline at end of file diff --git a/ansible/roles/oasys-bip/templates/bi_config_moveplan.xml b/ansible/roles/oasys-bip/templates/bi_config_moveplan.xml index 15d839fea..eb8e55607 100644 --- a/ansible/roles/oasys-bip/templates/bi_config_moveplan.xml +++ b/ansible/roles/oasys-bip/templates/bi_config_moveplan.xml @@ -33,7 +33,7 @@ Server Name - AdminServer + {{ admin_server }} STRING READ_ONLY @@ -49,7 +49,7 @@ Listen Port - 7001 + {{ admin_port }} INTEGER READ_WRITE @@ -59,7 +59,7 @@ Server Name - bi_server1 + {{ managed_server }} STRING READ_ONLY @@ -157,7 +157,7 @@ Multicast Port - 7001 + {{ admin_port }} INTEGER READ_WRITE diff --git a/ansible/roles/oasys-bip/templates/bi_server1.properties b/ansible/roles/oasys-bip/templates/bi_server1.properties index f800abb72..e9e5c6716 100644 --- a/ansible/roles/oasys-bip/templates/bi_server1.properties +++ b/ansible/roles/oasys-bip/templates/bi_server1.properties @@ -1,8 +1,8 @@ -# AdminServer Connection +# {{ admin_server }} Connection admin.username={{ weblogic_admin_username }} admin.password={{ weblogic_admin_password }} -admin.url={{ weblogic_domain_hostname }}:7001 +admin.url={{ weblogic_domain_hostname }}:{{ admin_port }} # Managed Server -ms.name=bi_server1 +ms.name={{ managed_server }} diff --git a/ansible/roles/oasys-bip/templates/domain.properties b/ansible/roles/oasys-bip/templates/domain.properties index 45d64e651..c98a6852e 100644 --- a/ansible/roles/oasys-bip/templates/domain.properties +++ b/ansible/roles/oasys-bip/templates/domain.properties @@ -6,8 +6,8 @@ path.domain.config={{ domain_home }} # Credentials admin.username={{ weblogic_admin_username }} admin.password={{ weblogic_admin_password }} -admin.url={{ weblogic_domain_hostname }}:7001 -admin.port=7001 +admin.url={{ weblogic_domain_hostname }}:{{ admin_port }} +admin.port={{ admin_port }} admin.address={{ weblogic_domain_hostname }} # Domain details diff --git a/ansible/roles/oasys-bip/templates/nm_moveplan.xml b/ansible/roles/oasys-bip/templates/nm_moveplan.xml index 5b3a8f671..2615d22cf 100644 --- a/ansible/roles/oasys-bip/templates/nm_moveplan.xml +++ b/ansible/roles/oasys-bip/templates/nm_moveplan.xml @@ -59,7 +59,7 @@ - AdminServer Listen Address + {{ admin_server }} Listen Address {{ weblogic_domain_hostname }} STRING @@ -67,15 +67,15 @@ - AdminServer Listen Port - 7001 + {{ admin_server }} Listen Port + {{ admin_port }} INTEGER READ_WRITE - AdminServer User Name + {{ admin_server }} User Name weblogic STRING @@ -83,7 +83,7 @@ - AdminServer Password File + {{ admin_server }} Password File {{ weblogic_password_file }} STRING @@ -94,7 +94,7 @@ Custom Trust Keystore File - Provide the value of Custom Trust KeyStore File of the domain, if value of the config property "AdminServer Listen Port" mentioned above represents SSL port of the server. + Provide the value of Custom Trust KeyStore File of the domain, if value of the config property "{{ admin_server }} Listen Port" mentioned above represents SSL port of the server. STRING READ_WRITE diff --git a/ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 b/ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 index ccde75b8e..bf1808f94 100644 --- a/ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 +++ b/ansible/roles/oasys-bip/templates/startManagedWebLogic.sh.j2 @@ -32,9 +32,9 @@ usage() # Set SERVER_NAME to the name of the server you wish to start up. -DOMAIN_NAME="bifoundation_domain" +DOMAIN_NAME="{{ domain_name }}" -ADMIN_URL="http://t1-oasys-bip-b.oasys.hmpps-test.modernisation-platform.internal:7001" +ADMIN_URL="http://$(hostname --fqdn):{{ admin_port }}" # Set WLS_USER equal to your system username and WLS_PW equal @@ -54,7 +54,7 @@ export WLS_PW # set JAVA_OPTIONS=-Dweblogic.attribute=value -Djava.attribute=value -JAVA_OPTIONS="-Dweblogic.security.SSL.trustedCAKeyStore=\"/u01/app/oracle/Middleware/wlserver_10.3/server/lib/cacerts\" ${JAVA_OPTIONS}" +JAVA_OPTIONS="-Dweblogic.security.SSL.trustedCAKeyStore=\"{{ wl_home }}/server/lib/cacerts\" ${JAVA_OPTIONS}" export JAVA_OPTIONS # Set JAVA_VM to the java virtual machine you want to run. For instance: @@ -97,7 +97,7 @@ export ADMIN_URL SERVER_NAME="${SERVER_NAME}" export SERVER_NAME -DOMAIN_HOME="/u01/app/oracle/Middleware/user_projects/domains/bifoundation_domain" +DOMAIN_HOME="{{ domain_home }}/{{ domain_name }}" if [ "$1" = "" ] ; then # Call Weblogic Server with our default params since the user did not specify any other ones