You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-42
Original file line number
Diff line number
Diff line change
@@ -5,59 +5,59 @@ Author: David Meredith + JK
5
5
6
6
This repo contains the service and cron scripts used to run a failover gocdb instance, includes the following dirs:
7
7
* autoEngageFailover/
8
-
* Contians a Service script (```gocdb-autofailover.sh```) and child scripts that monitors the main production instance. If a prolonged outage is detected, the GOCDB top DNS alias 'goc.egi.eu' is swtiched from the production instance to the failover instance. This switch can also be performed manually when needed.
8
+
* Contians a Service script (```gocdb-autofailover.sh```) and child scripts that monitors the main production instance. If a prolonged outage is detected, the GOCDB top DNS alias 'goc.egi.eu' is swtiched from the production instance to the failover instance. This switch can also be performed manually when needed.
9
9
* importDBdmpFile/
10
-
* Contains a script that should be invoked by cron hourly (```1_runDbUpdate.sh```) to fetch and install a .dmp of the production DB into the local failover DB. This runs separtely from the autoEngageFailover process.
10
+
* Contains a script that should be invoked by cron hourly (```1_runDbUpdate.sh```) to fetch and install a .dmp of the production DB into the local failover DB. This runs separtely from the autoEngageFailover process.
11
11
* nsupdate_goc/
12
-
* Scripts for switching the DNS to/from the production/failover instance.
12
+
* Scripts for switching the DNS to/from the production/failover instance.
13
13
* archiveDmpDownload/
14
-
* Contains a script to download/archive dmp files in a separate process
14
+
* Contains a script to download/archive dmp files in a separate process
15
15
16
16
# Packages
17
-
* The following scripts needs to be installed and configuired for your installation:
17
+
* The following scripts needs to be installed and configuired for your installation:
18
18
```
19
19
/root/
20
20
autoEngageFailover/ # Scripts to mon the production instance and engage failover
21
21
|_ gocdb-autofailover.sh# MAIN SERVICE SCRIPT to mon production instance
22
22
|_ engageFailover.sh # Child script, run if prolonged outage is detected
23
-
23
+
24
24
importDBdmpFile/ # Scripts fetch/install a .dmp of the prod data
25
-
|_ 1_runDbUpdate.sh # MAIN SCRIPT that can be called from cron, invokes child scripts below
25
+
|_ 1_runDbUpdate.sh # MAIN SCRIPT that can be called from cron, invokes child scripts below
26
26
|_ ora11gEnvVars.sh # Setup oracle env
27
-
|_ getDump.sh # Fetch a .dmp of the production data
27
+
|_ getDump.sh # Fetch a .dmp of the production data
28
28
|_ dropGocdbUser.sh # Drops the current DB schema
29
29
|_ loadData.sh # Load the last successfully fetched DB dmp into the RDBMS
30
30
|_ gatherStats.sh # Oracle gathers stats to re-index
31
31
|_ pass_file_exemplar.txt # Sample pwd file for DB (rename to pass_file)
32
32
33
33
nsupdate_goc/ # Scripts for switching the DNS to the failover
34
34
|_ goc_failover.sh # Points DNS to failover instance
35
-
|_ goc_production.sh # Points DNS to production instance
35
+
|_ goc_production.sh # Points DNS to production instance
36
36
37
37
archiveDmpDownload/ # Contains script to download/archive dmp files in a separate process e.g from cron.daily
38
-
|_ archiveDump.sh # Main script that dowloads dmp and saves in a sub-dir
39
-
|_ archive/ # Contains archive/dmp files
38
+
|_ archiveDump.sh # Main script that dowloads dmp and saves in a sub-dir
39
+
|_ archive/ # Contains archive/dmp files
40
40
```
41
41
42
-
## /root/autoEngageFailover/
42
+
## /root/autoEngageFailover/
43
43
Start in this dir. Dir contains the 'gocdb-autofailover.sh'
44
44
service script which should be installed as a service in
45
45
'/etc/init.d/gocdb-autofailover'. This service invokes
46
46
'engageFailover.sh' which monitors the production instance
47
47
with a ping-check. If a continued outage is detected;
48
48
the script starts the failover procedure which includes the
49
-
following:
50
-
* the gocdb admins are emailed,
49
+
following:
50
+
* the gocdb admins are emailed,
51
51
* the age of the last successfully imported dmp file is
52
-
checked to see that it is current,
52
+
checked to see that it is current,
53
53
* the hourly cron that fetches the dmp file is stopped (see
54
-
importDBdmpFile below),
54
+
importDBdmpFile below),
55
55
* <strike>symbolic links to the server cert/key are updated so they
56
-
point to the 'goc.egi.eu' cert/key</strike> (note, no longer needed as cert contains dual SAN)
56
+
point to the 'goc.egi.eu' cert/key</strike> (note, no longer needed as cert contains dual SAN)
57
57
* the dnscripts are invoked to change the dns (see
58
58
nsupdate_goc below).
59
59
60
-
## /root/importDBdmpFile/
60
+
## /root/importDBdmpFile/
61
61
Contains scripts that fetches the .dmp file and install this
62
62
dmp file into the local Oracle XE instance. The master script
63
63
is '1_runDbUpdate.sh' which needs to be invoked from an hourly
@@ -70,29 +70,29 @@ cron:
70
70
/root/importDBdmpFile/1_runDbUpdate.sh
71
71
```
72
72
73
-
You will also need to:
73
+
You will also need to:
74
74
* generate a public/private key pair using `ssh-keygen` and ensure the public
75
75
key is present on the host with the database dmp file.
76
76
* populate `importDBdmpFile/failover_TEMPLATE.sh` with
77
77
appropriate values and copy it to `/etc/gocdb/failover.sh`
78
-
78
+
79
79
## /root/nsupdate_goc/
80
80
Contains the nsupdate keys and nsupdate scripts for switching
81
81
the 'goc.egi.eu' top level DNS alias to point to either the
82
-
production instance or the failover.
82
+
production instance or the failover.
83
83
84
84
85
85
## /root/archiveDmpDownload/
86
86
Contains a script that downloads the dmp file and stores the file in the archive/ sub-dir.
87
-
The script also deletes archived files that are older than 'x' days.
88
-
This script can be called in a separate process, e.g. from cron.daily to build a
89
-
set of backups.
87
+
The script also deletes archived files that are older than 'x' days.
88
+
This script can be called in a separate process, e.g. from cron.daily to build a
89
+
set of backups.
90
90
91
91
92
-
#Failover Instructions
92
+
#Failover Instructions
93
93
* Choose from options 1) 2) 3)
94
94
95
-
## To start/stop the auto failover service
95
+
## To start/stop the auto failover service
96
96
This will continuously monitor the production
97
97
instance and engage the failover automatically during prolonged outages
0 commit comments