+ All Categories
Home > Documents > FMW Automatic Install using cloning - doag.org · FMW Automatic Install using cloning 21.11.2017...

FMW Automatic Install using cloning - doag.org · FMW Automatic Install using cloning 21.11.2017...

Date post: 17-Sep-2019
Category:
Upload: others
View: 14 times
Download: 0 times
Share this document with a friend
51
FMW Automatic install using cloning
Transcript

FMW Automatic install using cloning

About me

21.11.2017 Page 2FMW Automatic Install using cloning

Pascal Brand

Consultant

Middleware Technology Leader

+41 79 796 43 59

[email protected]

Who we are

21.11.2017 Page 3FMW Automatic Install using cloning

Experts At Your ServiceOver 50 specialists in IT infrastructureCertified, experienced, passionate

Based In Switzerland100% self-financed Swiss companyOver CHF8 mio. Turnover

Leading In Infrastructure ServicesMore than 150 customers in CH, D & FOver 50 SLAs dbi FlexService contracted

Agenda

Demonstration (start)

1.Introduction

2.Use Cases

3.Study case

4.Demonstration

5.Conclusion

21.11.2017 Page 4dbi services

21.11.2017FMW Automatic Install using cloning Page 5

DemonstrationFusion Middleware ADF Cloning

ArchitectureFusion Middleware WebLogic Domain with one cluster running an ADF application

Fronted HTTP Server

Oracle Database with Metadata repository

Ansible project playbooksRun against the source

> Create the archives for the Middleware Software and the WebLogic Domain

Run against the target

> Create the user and user profile

> Install the JDK

> Install the DMK WebLogic

> Paste the Middleware Software

> Create the Cloned WebLogic Domain

> Starts the domain

Start it now because it takes about 30 minutes

21.11.2017 Page 6FMW Automatic Install using cloning

1

2

3

4

5

Demonstration

Demonstration

21.11.2017 Page 7FMW Automatic Install using cloning

1

2

3

4

5

Introduction

Challenge and solutions

General concepts

Cloning tools

Cloning steps

Ansible introduction

21.11.2017FMW Automatic Install using cloning Page 8

IntroductionChallenge and solutions

The ChallengeWe have to setup and configure a huge number of environments

Several customers

> Case 1: Documentum Middleware

> WebLogic Server with client applications deployed (D2, D2Config, DA )

> Case 2: Fusion middleware ADF application

> Case 3: Fusion Middleware Reports & Forms

Installation & Configuration for Fusion Middleware ~2 days per system

The Ansible Solutions Automatic installation, patching and configuration scripts

Automatic Cloning

21.11.2017FMW Automatic Install using cloning Page 9

IntroductionGeneral Concepts

The Cloning procedureMoving Oracle Fusion Middleware components to minimizes the amount of work that would otherwise be

required to reapply all

>Patches

>Configuration changes

>Customizations

Some examples of where Cloning can provide key benefitsTo copy a freshly installed system to create a test or development environments

To diagnose production issues without impacting production

To preserve a copy of a system and refresh periodically from it after some development or QA use

To distribute one copy to multiple users so all can have the same setup

21.11.2017FMW Automatic Install using cloning Page 10

IntroductionCloning Tools

Copy the binaries

Copy the Configuration

> WebLogic Domain

> For Fusion Middleware

> WebLogic Domain + system components

21.11.2017FMW Automatic Install using cloning Page 11

IntroductionCloning tools

Tool Usage

copyBinary Script to copy the software (binaries) of the source Middleware home.

pasteBinary Script to paste the software (binaries) on the target Middleware home.

copyConfig Creates a configuration archive file that contains a snapshot of the configuration of an Oracle WebLogic Server domain (Java Component) or Instance (System Component) in source Fusion Middleware.

pasteConfig Extracts the files from the archive (jar) file and uses the information in the move plan to modify the configuration on the target.

extractMovePlan Extracts configuration information from the archive into a move plan.

21.11.2017FMW Automatic Install using cloning Page 12

IntroductionCloning Steps

Steps run on the source

copyBinary copyConfig extractMovePlan

21.11.2017FMW Automatic Install using cloning Page 13

IntroductionCloning Steps

Steps run on the target

Install JDK

pastBinary

Createrepositoryand import

customschemas

pastConfig

21.11.2017FMW Automatic Install using cloning Page 14

IntroductionCloning Steps

Clone the Middleware configurationUse copyConfig.sh to get a image jar file of the WebLogic domains

> Uses the cloningclient.jar provided in $MV_HOME/oracle_common/jlib

Use extractMovePlan.sh to get the XML move plan file and

> Adapt Data Sources, Machines and ports

> Adapt passwords: administrator, repository schemas (password files)

Copy the domain jar and the plan to your target

Use pasteConfig.sh & moveplan.xml to create your domain configuration on the target

> The pasteConfig script is performed only on the Administration Server domain directory. Use pack and unpack if

> The managed servers are not in the same directory structure

> The domain includes WebLogic Cluster deployed several machines

21.11.2017FMW Automatic Install using cloning Page 15

IntroductionAnsible

What is Ansible ? https://www.ansible.com/how-ansible-works

Ansible is a radically simple IT automation engine

Designed for multi-tier deployments since day one

uses SSH, with no agents or software installed on target systems.

Further Reading

> Ansible: Up and Running, Lorin Hochstein

> Print ISBN: 978-1-4919-1532-5

> Ebook ISBN: 978-1-4919-1529-5

Find Ansible code

> on Ansible Galaxy https://galaxy.ansible.com/

> and GitHub https://github.com/ansible

> Main repo, Core modules, Extra modules

21.11.2017FMW Automatic Install using cloning Page 16

IntroductionCloning Steps

Ansible Orchestration

Ansible: Up and Running, Lorin Hochstein

21.11.2017 Page 17FMW Automatic Install using cloning

1

2

3

4

5

Use cases

Documentum Middleware

Fusion Middleware ADF Application

Fusion Middleware Reports & Forms

21.11.2017FMW Automatic Install using cloning Page 18

Use CasesDocumentum Middleware

Clone the Middleware software> WebLogic software

Clone the WebLogic domain configuration> 2 domains with 4 managed servers

> No metadata repository

> Application configuration done through the application war file deployment

21.11.2017FMW Automatic Install using cloning Page 19

Use CasesFusion Middleware ADF Application

Clone the Middleware software> Fusion Middleware Infrastructure software

> Web Tier HTTP server

Clone the WebLogic domain configuration> Simple domain with 1 managed servers

> HTTP Server System Component

> Metadata repository (JDBC data sources)

> Application schemas

21.11.2017FMW Automatic Install using cloning Page 20

Use CasesFusion Middleware Reports & Forms

Clone the Middleware software> Fusion Middleware Infrastructure software

> Reports & Forms Software

> Web Tier HTTP server

Clone the WebLogic domain configuration> Simple domain with 2 managed servers

> Reports server, Forms server and HTTP Server system components

> DB Metadata repository (JDBC Data Sources)

21.11.2017 Page 21FMW Automatic Install using cloning

1

2

3

4

5

Study case

Fusion Middleware ADF Domain Cloning

Ansible playbooks

21.11.2017FMW Automatic Install using cloning Page 22

Study caseFusion Middleware ADF Domain Cloning

ArchitectureFusion Middleware WebLogic Domain with one cluster configured to host ADF application

Fronted HTTP Server with mod_wl_ohs plugin

Oracle Database with Metadata repository

Ansible project playbookfusion-infra-clone-source

> Create the archive for the Middleware Software, the WebLogic Domain and the move plan

fusion-infra-clone-target

> Check Unix packages installed and install missing ones

> Create the user and user profile

> Install the JDK

> Install the DMK WebLogic (dbi management kit)

> Paste the Middleware Software

> Create the Cloned WebLogic Domain

> Starts the domain

21.11.2017FMW Automatic Install using cloning Page 23

Study caseAnsible playbooks

fusion-infra-clone-source

- name: Ansible Playbook for Fusion Middleware 12C cloning - source

hosts: weblogic-servers-source

sudo: True

vars_files:

# Encrypted file for server access

- servergroups.yml

# User defined variables for infrastructure

- infra-vars.yml

# Encrypted file for server access

- secrets.yml

roles:

- role: fmw-domain-clone-source

become: yes

become_user: '{{ oracle_user }}‘

become_method: su

21.11.2017FMW Automatic Install using cloning Page 24

Study caseAnsible playbooks

fusion-infra-clone-sourceSoftware

# ==> Copy create cloned source Middleware script

- name: copy create cloned source Middleware script

template: src=copyMiddleware.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

when: create_Middleware_source_clone

tags: - create-middleware_clone-archive

# ==> Execute create clone source Middleware script

- name: Execute create clone source Middleware script

shell: "{{ installation_folder }}/copyMiddleware.sh"

when: create_Middleware_source_clone

tags: - create-middleware_clone-archive

# ==> fetch middleware clone binary image from target

- name: fetch middleware clone binary image from target

fetch: src={{ installation_folder }}/{{ wls_infra_archive }}

dest={{ role_path }}/../shared_files/{{ wls_infra_archive }}

flat=yes

21.11.2017FMW Automatic Install using cloning Page 25

Study caseAnsible playbooks

fusion-infra-clone-sourceCloning scripts

> Copy Binaries (copyMiddleware.sh template)

{{ oracle_home }}/oracle_common/bin/copyBinary.sh -javaHome {{ java_home }} \

-archiveLocation {{ installation_folder }}/{{ wls_infra_archive }} \

-sourceMWHomeLoc {{ oracle_home }} \

-logDirLoc {{ installation_folder }}/logs \

-invPtrLoc {{ oracle_home }}/oraInst.loc

21.11.2017FMW Automatic Install using cloning Page 26

Study caseAnsible playbooks

fusion-infra-clone-sourceConfig: Password file creation

# ==> Copy java classes

- name: Copy MyObfuscatepassword java class

copy: src=MyObfuscatepassword.class dest={{ installation_folder }}

# ==> Copy obfuscatepassowrd script

- name: Copy obfuscatepassowrd script

template: src=obfuscatepassword.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

# ==> Execute obfuscatepassword.sh to create the password file

- name: Execute obfuscatepassword.sh Server script

shell: "{{ installation_folder }}/obfuscatepassword.sh"

21.11.2017FMW Automatic Install using cloning Page 27

Study caseAnsible playbooks

fusion-infra-clone-sourceCloning scripts

> Create Password file (obfuscatepassword.sh template)

{{ java_home }}/bin/java -cp {{ installation_folder}}:/app/weblogic/product/Middleware/oracle_common/jlib/obfuscatepassword.jar:.

MyObfuscatepassword {{ weblogic_admin_pass }} {{ installation_folder}}/source_cloning.pwd

21.11.2017FMW Automatic Install using cloning Page 28

Study caseAnsible playbooks

fusion-infra-clone-sourceConfig: Domain jar file

# ==> Copy create cloned source Domain script

- name: copy create cloned source Domain script

template: src=copyDomain.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

when: create_domain_source_clone

tags: - create-weblogic-domain-clone-archive

# ==> Execute create clone domain script

- name: Execute create clone domain script

shell: "{{ installation_folder }}/copyDomain.sh"

when: create_domain_source_clone

tags: - create-weblogic-domain-clone-archive

# ==> fetch clone domain image from target

- name: fetch clone domain image from target

fetch: src={{ installation_folder }}/{{ wls_domain_archive }}

dest={{ role_path }}/../shared_files/{{ wls_domain_archive}}

flat=yes

21.11.2017FMW Automatic Install using cloning Page 29

Study caseAnsible playbooks

fusion-infra-clone-sourceCloning scripts

> Copy configuration (copyDomain.sh template)

{{ oracle_home }}/oracle_common/bin/copyConfig.sh -javaHome {{ java_home }} \

-archiveLoc {{ installation_folder }}//{{ wls_domain_archive }} \

-logDirLoc {{ installation_folder }}//logs \

-sourceDomainLoc {{domain_loc }} \

-sourceMWHomeLoc {{ oracle_home }} -domainHostName {{wls_host_source_ipaddr }} \

-domainPortNum {{ admin_listen_port}} \

-domainAdminUserName {{ weblogic_admin }} \

-domainAdminPasswordFile {{ installation_folder }}/source_cloning.pwd

21.11.2017FMW Automatic Install using cloning Page 30

Study caseAnsible playbooks

fusion-infra-clone-sourceConfig: extract move plan

# ==> Copy create cloned domain move plan

- name: copy create cloned domain move plan

template: src=createMovePlan.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

when: create_domain_source_clone

tags: - create-weblogic-domain-move-plan

# ==> Execute create cloned domain move plan

- name: Execute create cloned domain move plan

shell: "{{ installation_folder }}/createMovePlan.sh"

when: create_domain_source_clone

tags: - create-weblogic-domain-move-plan

# ==> fetch clone domain move plan from target

- name: fetch clone domain move plan from target

fetch: src={{ installation_folder }}/plan/moveplan.xml

dest={{ role_path }}/../shared_files/moveplan.xml

flat=yes

21.11.2017FMW Automatic Install using cloning Page 31

Study caseAnsible playbooks

fusion-infra-clone-sourceCloning scripts

> Create move plan (createMovePlan.sh template)

{{ oracle_home }}/oracle_common/bin/extractMovePlan.sh -javaHome {{ java_home }} \

-archiveLoc {{ installation_folder }}/{{ wls_infra_domain_clone }} \

-logDirLoc {{ installation_folder }}/logs \

-planDirLoc {{ installation_folder }}/plan

21.11.2017FMW Automatic Install using cloning Page 32

Study caseAnsible playbooks

fusion-infra-clone-target (1)

- name: Ansible Playbook for Fusion Middleware 12C cloning – Target

hosts: weblogic-servers

sudo: True

vars_files:

# Encrypted file for server access

- servergroups.yml

# User defined variables for infrastructure

- infra-vars.yml

# Encrypted file for server access

- secrets.yml

roles:

- role: wls-linux

- role: jdk-install

become: yes

become_user: '{{ oracle_user }}'

become_method: su

21.11.2017FMW Automatic Install using cloning Page 33

Study caseAnsible playbooks

fusion-infra-clone-target (2)

- role: dmk-install

become: yes

become_user: '{{ oracle_user }}'

become_method: su

- role: fmw-infra-clone

become: yes

become_user: '{{ oracle_user }}'

become_method: su

- role: fmw-domain-clone

become: yes

become_user: '{{ oracle_user }}'

become_method: su

- role: fmw-domain-startup

become: yes

become_user: '{{ oracle_user }}'

become_method: su

21.11.2017FMW Automatic Install using cloning Page 34

Study caseAnsible playbooks

fmw-infra-clone

Copy the cloningclient.jar and generated WLS.jar

# ==> Copy Fusion Middleware client cloning software (cloningclient.jar)

- name: Copy Fusion Middleware client cloning software

copy: src={{ wls_infra_domain_cloning_software }} dest={{ installation_folder }}

when: create_middleware_home

# ==> Copy Fusion Middleware Infrastructure cloning software

- name: Copy Fusion Middleware Infrastructure Installer

copy: src={{ role_path }}/../shared_files/{{ wls_infra_archive }} dest={{

installation_folder }}

when: create_middleware_home

21.11.2017FMW Automatic Install using cloning Page 35

Study caseAnsible playbooks

fmw-infra-clone

Copy the pasteBinary.sh and execute it

# ==> copy create middleware clone binary script on target

- name: copy create middleware clone binary script

copy: src=pasteBinary.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

# ==> copy create middleware clone wrapper script on target

- name: copy create middleware clone wrapper script

template: src=createCloneMiddleware.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

when: create_middleware_home

tags: - middleware

# ==> execute create clone Middleware script

- name: execute create clone Middleware script

- shell: "{{ installation_folder }}/createCloneMiddleware.sh"

when: create_middleware_home

tags: - middleware

args: creates: "{{ mw_home }}/Middleware/oraInst.loc"

21.11.2017FMW Automatic Install using cloning Page 36

Study caseAnsible playbooks

fmw-infra-clone

Cloning scripts

> Create Middleware (createCloneMiddleware.sh template)

set LANG=en_US.UTF8

{{ installation_folder }}/pasteBinary.sh -javaHome {{ java_home }} \

-archiveLoc {{ local_installation_folder }}/{{ wls_infra_archive }} \

-targetMWHomeLoc {{ oracle_home }} \

-invPtrLoc {{ installation_folder }}/oraInst.loc

21.11.2017FMW Automatic Install using cloning Page 37

Study caseAnsible playbooks

fmw-domain-clone

Create repository

# ==> Create Repository in Database

- name: password response file for repository creation

template: src=passwords.txt dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }}

when: create_repo_schemas

tags: - repo

# ==> copy create repository script

- name: copy create repository script

template: src=create_repo.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

when: create_repo_schemas

tags: - repo

# ==> execute create repository script

- name: execute create repository scrip

shell: "{{ installation_folder }}/createRepo.sh"

when: create_repo_schemas

tags: - repo

21.11.2017FMW Automatic Install using cloning Page 38

Study caseAnsible playbooks

fmw-domain-clone

Cloning scripts

> Create Repository (createRepo.sh template)

{{ mw_home }}/oracle_common/bin/rcu \

-silent \

-createRepository \

-databaseType ORACLE \

-connectString {{ dbserver_name }}:{{ dbserver_port }}:{{ dbserver_service }} \

-dbUser sys \

-dbRole SYSDBA \

-schemaPrefix {{ repository_prefix }} \

-useSamePasswordForAllSchemaUsers true \

-component IAU \

-component IAU_APPEND \

-component IAU_VIEWER \

-component OPSS \

-component STB \

-component MDS \

-f < {{ config_base }}/{{ domain_name }}/passwords.txt

21.11.2017FMW Automatic Install using cloning Page 39

Study caseAnsible playbooks

fmw-domain-clone

Adapt move plan

# ==> copy create middleware clone domain moveplan on target

- name: copy create middleware domain domain moveplan

copy: src={{ role_path }}/../shared_files/moveplan.xml

dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }}

# ==> replace keywords in Domain move plan

- name: replace keywords in Domain move plan

replace: dest={{ installation_folder }}/plan//moveplan.xml

regexp={{ wls_host_source }} replace={{ wls_host }}

backup=no

# ==> replace password file keywords in Domain move plan

- name: replace password file keywords in Domain move plan

replace: dest={{ installation_folder }}/plan/moveplan.xml

regexp={{ wl_password_file_regex }}

replace={{ wl_password_file_value }}

backup=no

21.11.2017FMW Automatic Install using cloning Page 40

Study caseAnsible playbooks

fmw-domain-clone

Adapt move plan: JDBC example<configProperty id="DataSource1">

<configProperty>

<name>Url</name>

<value>jdbc:oracle:thin:@//vm06:1521/MD</value>

<itemMetadata>

<dataType>STRING</dataType>

<scope>READ_WRITE</scope>

</itemMetadata>

</configProperty>

<configProperty>

<name>Password File</name>

<value>/app/weblogic/install/cloning.pwd</value>

<itemMetadata>

<dataType>STRING</dataType>

<password>true</password>

<scope>READ_WRITE</scope>

</itemMetadata>

</configProperty>

</configProperty>

21.11.2017FMW Automatic Install using cloning Page 41

Study caseAnsible playbooks

fmw-domain-clone

Create WebLogic domain

# ==> copy create middleware clone domain archive on target

- name: copy create middleware domain domain archive

copy: src={{ role_path }}/../shared_files/{{ wls_domain_archive }}

dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }}

# ==> Copy the Create domain script

- name: copy create cloned domain script

template: src=pasteDomain.sh dest={{ installation_folder }}

owner={{ oracle_user }} group={{ oracle_group }} mode=0755

tags: - create-config

# ==> Execute create clone domain script

- name: Execute create clone domain script

shell: "{{ installation_folder }}/pasteDomain.sh"

tags: - create-config

21.11.2017FMW Automatic Install using cloning Page 42

Study caseAnsible playbooks

fmw-domain-clone

Cloning scripts

> Run pasteConfig (pasteDomain.sh template)

export LANG=en_US.UTF8

{{ oracle_home }}/oracle_common/bin/pasteConfig.sh -javaHome {{ java_home }} \

-archiveLoc {{ installation_folder }}/{{ wls_domain_archive }} \

-movePlanLoc {{ installation_folder }}/moveplan.xml \

-tdl {{ domains_base }}/adf_domain -tmw {{ oracle_home }} \

-logDirLoc {{ installation_folder }}/logs \

-domainAdminPasswordFile {{ installation_folder }}/cloning.pwd

21.11.2017FMW Automatic Install using cloning Page 43

Study caseAnsible playbooks

Archives creation

> In one run we create the Binaries and domain archives

ansible-playbook -i inventories/test fusion-infra-clone-source.yml

ansible-playbook -i inventories/test fusion-infra-clone-target.yml

Clone environment creation

> In one run we create the Middleware home and the WebLogic Domain

21.11.2017 Page 44FMW Automatic Install using cloning

1

2

3

4

5

Demonstration

Demonstration

21.11.2017FMW Automatic Install using cloning Page 45

DemonstrationDive into Demo

Check what we have got

Ansible tasks execution traces

Navigate in the cloned WebLogic Domain

> Administration Console

Show the ADF Application up and running

21.11.2017 Page 46FMW Automatic Install using cloning

1

2

3

4

5

Conclusion

Advantages vs DrawbacksAnsible FMW Cloning

vs Ansible FMW New Install

21.11.2017FMW Automatic Install using cloning Page 47

ConclusionAdvantages vs Drawbacks

Existing configuration files or libraries

outside Middleware Home are not

copied

Difficulties to recover from

falling situations

Can corrupt the Oracle

inventory

Executed on running source

environment: No downtime

Patches are included

Full configuration cloned

Customization included Depreciated in FMW 12.2.1.2

Oracle Note 2067900.1 &. 2196564.1

21.11.2017FMW Automatic Install using cloning Page 48

ConclusionAnsible FMW Cloning vs Ansible FMW New Install

Ansible FMW CloningFor each use case a new master is needed

Middleware archive can be huge

> Ansible bug on copying or fetching huge file

Recover from Domain cloning failure

> Drop the domain directory

> Restart Domain creation script

Middleware cloning crash might corrupt the inventory

Applications deployments included

> Metadata too

Ansible FMW New InstallDomain creation based on builder template

Easier to manage new versions or new patch sets

More development

Recover from failure

> Drop the domain directory

> Ansible reruns the failed steps

Needs manual Applications Deployments

21.11.2017FMW Automatic Install using cloning Page 49

ConclusionFusion Middleware WebLogic Domain Cloning

TodayCloning procedure used for FMW 12.1.3 and FMW 12.2.1.2

Installation Time win

Less Installation Errors

Less configuration scripts development

Future: FMW 12.2.1.3 and upperCloning procedure changed

The MovePlan doesn’t exist anymore

Needs a lot of configuration scripts development

Starting from FMW 12.2.1.3, we decided to not use Cloning anymoreUse of Ansible full installation project

Any questions?

Please do ask!

We would love to boost your IT-Infrastructure

How about you?

Zürich

BaselDelémont

Nyon

21.11.2017 Page 50FMW Automatic Install using cloning

Let’s meet at booth 242And use CLONING


Recommended