Skip to content

Commit

Permalink
Merge pull request #355 from ministryofjustice/nomis/aws_dr_move
Browse files Browse the repository at this point in the history
Nomis/aws dr move
  • Loading branch information
Sandhya1874 authored Oct 4, 2023
2 parents ee5e89e + 666a2b1 commit c247516
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 2 deletions.
107 changes: 107 additions & 0 deletions ansible/group_vars/environment_name_nomis_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,113 @@ dns_search_domains:
- azure.hmpp.root
PROD_SYSCON_WEB_RELEASE: DB_V11.2.1.1.219

oracle_path: /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin
db_env:
ORACLE_HOME: "{{ database_home }}"
PATH: "{{ database_home }}/bin:{{ oracle_path }}"

db_configs:
PCNOM:
db_name: PCNOM

TRDATP:
db_name: TRDATP
db_unique_name: TRDATP
instance_name: TRDATP
host_name: pdpdl00037.azure.hmpp.root
port: 1521
tns_name: TRDATP
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: TRDAT_TAF, role: PRIMARY }

NDHP:
db_name: NDHP
db_unique_name: NDHP
instance_name: NDHP
host_name: pdpdl00037.azure.hmpp.root
port: 1521
tns_name: NDHP
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: NDH_TAF, role: PRIMARY }

DRTRDAT:
db_name: TRDATP
db_unique_name: DRTRDAT
instance_name: DRTRDAT
host_name: prod-nomis-db-1-b
port: 1521
tns_name: DRTRDAT
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: TRDAT_TAF, role: PRIMARY }

DRNDH:
db_name: NDHP
db_unique_name: DRNDH
instance_name: DRNDH
host_name: prod-nomis-db-1-b
port: 1521
tns_name: DRNDH
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: NDH_TAF, role: PRIMARY }

DRCNOM:
db_name: CNOMP
db_unique_name: DRCNOM
instance_name: DRCNOM
host_name: prod-nomis-db-1-b
port: 1521
tns_name: DRCNOM
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: NOMIS_TAF, role: PRIMARY }
- { name: OLDNOMIS_TAF, role: PRIMARY }
- { name: NOMIS_APIRO_TAF, role: PHYSICAL_STANDBY }
- { name: OR_TAF, role: PHYSICAL_STANDBY }

DRMIS:
db_name: MISP
db_unique_name: DRMIS
instance_name: DRMIS
host_name: prod-nomis-db-2-b
port: 1521
tns_name: DRMIS
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: MIS_TAF, role: PRIMARY }

MISP:
db_name: MISP
db_unique_name: MISP
instance_name: MISP
host_name: pdpdl00036.azure.hmpp.root
port: 1521
tns_name: MISP
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: MIS_TAF, role: PRIMARY }

CNOMP:
db_name: CNOMP
db_unique_name: CNOMP
instance_name: CNOMP
host_name: pdpdl00035.azure.hmpp.root
port: 1521
tns_name: CNOMP
asm_disk_groups: DATA,FLASH
s3_bucket: s3-bucket20220427111226925000000002
service:
- { name: NOMIS_TAF, role: PRIMARY }
- { name: OLDNOMIS_TAF, role: PRIMARY }
- { name: NOMIS_APIRO_TAF, role: PHYSICAL_STANDBY }
- { name: OR_TAF, role: PHYSICAL_STANDBY }
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
main() {
echo "# srvctl add database -d {{ auxiliary_db.instance_name }} ..."
source oraenv <<< {{ auxiliary_db.instance_name }}
srvctl add database -d {{ auxiliary_db.instance_name }} -o {{ database_home }} -p +DATA/{{ auxiliary_db.db_unique_name }}/spfile{{ auxiliary_db.instance_name }}.ora -r PHYSICAL_STANDBY -s open -t IMMEDIATE -i {{ auxiliary_db.instance_name }} -n {{ auxiliary_db.db_name }} -y AUTOMATIC -a {{ auxiliary_db.asm_disk_groups }}
srvctl add database -d {{ auxiliary_db.instance_name }} -o {{ database_home }} -p +DATA/{{ auxiliary_db.db_unique_name }}/spfile{{ auxiliary_db.instance_name }}.ora -s open -t IMMEDIATE -i {{ auxiliary_db.instance_name }} -n {{ auxiliary_db.db_name }} -y AUTOMATIC -a {{ auxiliary_db.asm_disk_groups }}
srvctl start database -d {{ auxiliary_db.instance_name }}
}
main 2>&1 | logger -p local3.info -t ansible-oracle-db
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/oracle-db-standby-setup/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ stage: /u02/stage
temp_dir: /u02/stage/temp
duplicate_target_db_cmd: "duplicate target database for standby "
standby_creation_cmd_filename: "standby_creation.cmd"
rman_backup_location: /u02/DB_BKP
rman_backup_location: /u03/backup/rman
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if [ -n "$chk_entry" ] && [ "$chk_entry" = 0 ]; then
echo "
$ENTRY_NAME =
(DESCRIPTION =
(ENABLE=broken)
(ADDRESS = (PROTOCOL = TCP)(HOST = $HOST_ADDR)(PORT = $PORT_NUM))
(CONNECT_DATA =
(SERVER = DEDICATED)
Expand Down

0 comments on commit c247516

Please sign in to comment.