|
| 1 | +# Weblogic Cluster provisioning |
| 2 | + |
| 3 | +Repository contains everything to provision a Weblogic Cluster on any RedHat 7+ based system.. |
| 4 | + |
| 5 | +- [1. Requirements](#1-requirements) |
| 6 | + - [1.1. Proxy requirements](#1-1-proxy-requirements) |
| 7 | +- [2. Configuration](#2-configuration) |
| 8 | + - [2.1 Installers configuration](#2-1-installers-configuration) |
| 9 | +- [3. Testing configuration](#3-testing-configuration) |
| 10 | +- [4. Installation](#4-installation) |
| 11 | +- [5. Uninstall](#5-uninstall) |
| 12 | +- [6. Cluster maintanace tasks](#6-cluster-maintanace-tasks) |
| 13 | + |
| 14 | +<br> |
| 15 | + |
| 16 | +## 1. Requirements |
| 17 | + |
| 18 | +**System requirements**: |
| 19 | +- 1 VM with minimums of 2 cpus and 4GB RAM (HDD size is on your preference) for AdminServer |
| 20 | +- 1 - ∞ VMs with minimum of 2 cpus and 8GB RAM each (HDD size is on your preference) for Managed Servers |
| 21 | +- static IPs on all VMs |
| 22 | +- supported linux OS: RedHat/CentOS 7/8, Oracle Linux 7/8, Rocky 8, AlmaLinux 8 |
| 23 | + |
| 24 | +**Workstation requirements**: |
| 25 | +- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) |
| 26 | + |
| 27 | +**Additional requirements**: |
| 28 | +- NFS share for shared domain on all hosts, mounted on: `/u01/oracle` |
| 29 | +- [VMs and Workstation requirements](docs/requirements.md) |
| 30 | + |
| 31 | +### 1.1. Proxy requirements |
| 32 | + |
| 33 | +Access to following external resources are required: |
| 34 | + |
| 35 | +- Access to OS repository (yum/apt) |
| 36 | +- Access to Python packages (*.python.org, *.pypi.org, *.pythonhosted.org) |
| 37 | +- Access to Oracle Java and Middleware installer download (*.oracle.com) |
| 38 | + |
| 39 | +<br> |
| 40 | + |
| 41 | +## 2. Configuration |
| 42 | + |
| 43 | +- Create copy of `inventory/default` directory and name it after your environment, example: `inventory/<environment>`. |
| 44 | +- Edit your environment `inventory.ini` file by filling out environment servers configuration values. |
| 45 | +- Edit your environment `all.yml` file by filling out environment specific configuration values (also see [2.1 Installers](#21-installers)). |
| 46 | +- Edit your environment `all-vault.yml` file by filling out environment specific secrets. |
| 47 | + |
| 48 | +> NOTE: Encrypt the `all-vault.yaml` file using `ansible-vault encrypt inventory/<environment>/group_vars/all/all-vault.yml` and providing secure password. |
| 49 | +
|
| 50 | +### 2.1 Installers configuration |
| 51 | + |
| 52 | +> NOTE: Instructions for downloading and configuring installers. |
| 53 | +
|
| 54 | +Download [Linux x64 Compressed Archive](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html) and place `tar.gz` archive to: |
| 55 | + |
| 56 | +``` |
| 57 | +./roles/jdk/files/jdk-8u371-linux-x64.tar.gz |
| 58 | +``` |
| 59 | + |
| 60 | +Also set archive name (ex. `jdk-8u371-linux-x64.tar.gz`) as value for variable in your environments [all.yml](inventory/default/group_vars/all/all.yml#L2) file. |
| 61 | + |
| 62 | +```yml |
| 63 | +jdk_installer_archive: 'jdk-8u371-linux-x64.tar.gz' |
| 64 | +``` |
| 65 | +
|
| 66 | +Download [Generic Installer for Oracle WebLogic Server 12.2.1.4](https://www.oracle.com/middleware/technologies/weblogic-server-installers-downloads.html), extract archive and place generic `jar` installer to: |
| 67 | + |
| 68 | +``` |
| 69 | +./roles/wls/files/fmw_12.2.1.4.0_wls_lite_generic.jar |
| 70 | +``` |
| 71 | +
|
| 72 | +Also set installer name (ex. `fmw_12.2.1.4.0_wls_lite_generic.jar`) as value for variable in your environments [all.yml](inventory/default/group_vars/all/all.yml#L5) file. |
| 73 | +
|
| 74 | +```yml |
| 75 | +fmw_installer: 'fmw_12.2.1.4.0_wls_lite_generic.jar' |
| 76 | +``` |
| 77 | + |
| 78 | +<br> |
| 79 | + |
| 80 | +## 3. Testing configuration |
| 81 | + |
| 82 | +Before installation you can test connection to your VMs using [check.yml](playbooks/check.yml) playbook. |
| 83 | + |
| 84 | +Simply run: |
| 85 | + |
| 86 | +```shell |
| 87 | +ansible-playbook -i inventory/<environment>/inventory.ini playbooks/check.yml --ask-vault-pass |
| 88 | +``` |
| 89 | + |
| 90 | +Output should look like this: |
| 91 | + |
| 92 | +> NOTE: If playbook ran with no errors, then you are ready to begin installation. |
| 93 | +
|
| 94 | +```shell |
| 95 | +... |
| 96 | +TASK [debug] ********************************************************************** |
| 97 | +ok: [wl-admin] => |
| 98 | + msg: |
| 99 | + - 'os_family: RedHat' |
| 100 | + - 'distribution: AlmaLinux' |
| 101 | + - 'major_version: 8' |
| 102 | +ok: [wl-node-01] => |
| 103 | + msg: |
| 104 | + - 'os_family: RedHat' |
| 105 | + - 'distribution: AlmaLinux' |
| 106 | + - 'major_version: 8' |
| 107 | +ok: [wl-node-02] => |
| 108 | + msg: |
| 109 | + - 'os_family: RedHat' |
| 110 | + - 'distribution: AlmaLinux' |
| 111 | + - 'major_version: 8' |
| 112 | +... |
| 113 | +``` |
| 114 | + |
| 115 | +<br> |
| 116 | + |
| 117 | +## 4. Installation |
| 118 | + |
| 119 | +Playbook to install and configure Weblogic cluster. |
| 120 | + |
| 121 | +```shell |
| 122 | +ansible-playbook -i inventory/<environment>/inventory.ini playbooks/setup.yml --ask-vault-pass |
| 123 | +``` |
| 124 | + |
| 125 | +Will configure the cluster based on provided configuration in inventory files. |
| 126 | + |
| 127 | +:exclamation: Weblogic console URL after installation: http://<admin_host_ip>:{{ admin_server_port }}/console |
| 128 | + |
| 129 | +<br> |
| 130 | + |
| 131 | +## 5. Uninstall |
| 132 | + |
| 133 | +Playbook to uninstall Weblogic cluster. |
| 134 | + |
| 135 | +```shell |
| 136 | +ansible-playbook -i inventory/<environment>/inventory.ini playbooks/reset.yml |
| 137 | +``` |
| 138 | + |
| 139 | +Will uninstall the Weblogic cluster and reboot the machines. |
| 140 | + |
| 141 | +## 6. Cluster maintanace tasks |
| 142 | + |
| 143 | +Playbook to update some parts of Cluster or Domain configuration |
| 144 | + |
| 145 | +```shell |
| 146 | +ansible-playbook -i inventory/<environment>/inventory.ini playbooks/update.yml -t <tag> |
| 147 | +``` |
| 148 | + |
| 149 | +Will update specific part of configuration. |
| 150 | + |
| 151 | +Currently available tags: |
| 152 | + |
| 153 | +| Category | File Path | Tag | Description | |
| 154 | +|----------|-----------|-----|-------------| |
| 155 | +| Update | [playbooks/update.yml](playbooks/update.yml) | `ssl` | Will update Managed server SSL certificate and do SSL reset. | |
0 commit comments