Skip to content

Commit 37cc2f7

Browse files
committed
test failover
1 parent f2b2f55 commit 37cc2f7

File tree

1 file changed

+62
-23
lines changed

1 file changed

+62
-23
lines changed

README.md

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Follow the steps to clone adminVM, for high availability, let's create the disk
244244
Create a snapshot from adminVM OS disk. If you have snapshot of adminVM, skip the following two steps:
245245
246246
- Open Azure portal, stop adminVM.
247-
- Create a snapshot from OS disk, make sure you are selecting the right availability zone, see above table.
247+
- Create a snapshot from OS disk.
248248
249249
Keep the snapshot, you will use it for scaling.
250250
@@ -1181,37 +1181,76 @@ This sample saves the domain configuration in `/u02`. You will move all the data
11811181
- SSH to adminVM with command `ssh weblogic@adminVM`, switch to `root` user `sudo su -`
11821182
- Stop Admin server and node manager
11831183
1184-
```bash
1185-
sudo systemctl stop wls_nodemanager
1186-
sudo systemctl stop wls_admin
1187-
kill -9 `ps -ef | grep 'Dweblogic.Name=admin' | grep -v grep | awk '{print $2}'`
1188-
```
1184+
```bash
1185+
sudo systemctl stop wls_nodemanager
1186+
sudo systemctl stop wls_admin
1187+
kill -9 `ps -ef | grep 'Dweblogic.Name=admin' | grep -v grep | awk '{print $2}'`
1188+
```
11891189
11901190
- Bake up domain configuration and remove `/u02`
11911191
1192-
```bash
1193-
zip -r /u01/oracle/u02.zip /u02
1194-
1195-
rm /u02 -f -r
1196-
```
1192+
```bash
1193+
zip -r /u01/oracle/u02.zip /u02
1194+
1195+
rm /u02 -f -r
1196+
```
11971197
11981198
- Mount NFS share. Install nfs-utils.
11991199
1200-
```bash
1201-
sudo yum update
1202-
sudo yum install -y nfs-utils
1203-
```
1200+
```bash
1201+
sudo yum update
1202+
sudo yum install -y nfs-utils
1203+
```
12041204
1205-
Edit `/etc/fstab` and add a mount point. Replace the variable value with yours.
1205+
Edit `/etc/fstab` and add a mount point. Replace the variable value with yours.
12061206
1207-
```bash
1208-
storageAccountName=stgwlsdomain
1209-
nfsShareName=wlsdomain
1210-
mkdir /u02
1211-
echo "${storageAccountName}.file.core.windows.net:/${storageAccountName}/wlsdomain /u02 nfs defaults 0 0" >> /etc/fstab
1207+
```bash
1208+
storageAccountName=stgwlsdomain
1209+
nfsShareName=wlsdomain
1210+
mkdir /u02
1211+
echo "${storageAccountName}.file.core.windows.net:/${storageAccountName}/wlsdomain /u02 nfs defaults 0 0" >> /etc/fstab
1212+
1213+
mount /u02
1214+
```
12121215
1213-
mount /u02
1214-
```
1216+
- Move the domain configuration to NFS share
1217+
1218+
```bash
1219+
unzip -j /u01/oracle/u02.zip -d /u02
1220+
chown oracle:oracle /u02 -R
1221+
```
1222+
1223+
Now you have successfully moved domain configuration to NFS share. The next steps are created a backup machine from the snapshot of current adminVM.
1224+
1225+
#### Create and configure backup machine
1226+
1227+
Take a snapshot from adminVM OS disk. Note that do not use this snapshot to create managed machine for managed servers.
1228+
1229+
- Open Azure portal, stop adminVM.
1230+
- Take a snapshot from OS disk.
1231+
1232+
Create backup machine based on the snapshot:
1233+
1234+
- Create a disk from the snapshot.
1235+
- Create a VM with your expected name(e.g. adminVMBak) on the disk. Make sure you are selecting the Availability Zone 3.
1236+
- SSH to the machine, use root user and change the hostname.
1237+
- Set hostname with `hostnamectl set-hostname hostname`. For example, command to set hostname `adminvmbak`: `hostnamectl set-hostname adminvmbak`
1238+
- Stop the machine from Azure portal. The machine has mounted with NFS share and is ready to start Admin Server.
1239+
1240+
#### Test failover
1241+
1242+
Now you have adminVM as the primary host and adminVMBak as backup host. Domain configuration are stored in NFS share, and share between both machines. Changes from Admin Server that runs on either machine are persisted to NFS share.
1243+
1244+
Before testing, let's start Admin Server by starting adminVM from Azure Portal. Make sure you are able to access Console portal or EM from browser.
1245+
1246+
Follow the steps to test failover manually:
1247+
1248+
1. Stop adminVM.
1249+
1. Remove secondary IP from adminVM: go to Azure Portal -> open **adminVM** -> select **Settings** -> select **Networking** -> open the network interface -> select **Settings** -> select **IP Configurations** -> remove `ipconfig2` which was configured with virtual IP of Admin Server.
1250+
1. Assign secondary IP to adminVMBak: go to Azure Portal -> open **adminVMBak** -> select **Settings** -> select **Networking** -> open the network interface -> select **Settings** -> select **IP Configurations** -> Add `ipconfig2` with static IP address, here is `10.0.0.16`.
1251+
1. Start adminVMBak. Wait for Admin Server ready.
1252+
1253+
You should be able to access Admin Server and have the same domain configuration as that runs on adminVM.
12151254
12161255
### Use Azure Site Recovery
12171256

0 commit comments

Comments
 (0)