Skip to content

Commit

Permalink
Updated deployment scripts as part of repo split
Browse files Browse the repository at this point in the history
Former-commit-id: ec18491
  • Loading branch information
sadanandegowda committed Jan 7, 2020
1 parent ce5f2a4 commit b8d3b38
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 167 deletions.
10 changes: 5 additions & 5 deletions db_release_scripts/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

* **mosip_<schema_name>/<schema_name>_revoke_db_deploy.sh:**  Script to revoke database deployment.

* **mosip_release_db_deployment.sh:**  DB release deployment script for all database.
* **mosip_release_pre-registration_db_deployment.sh:**  DB release deployment script for all database.

* **mosip_revoke_db_deployment.sh:**  DB revoke deployment script for all database deployment.

Expand Down Expand Up @@ -88,11 +88,11 @@ Once completed with sourcing the database release files, Follow the DB release d
**Step 1** -> Make modification to all the respective database properties files **(<<schema>>_release_deploy.properties)** in the respective database directories. Path of properties file and variables list explained above. Once the properties files are ready then access the directory where the deployment script is kept.

**Step 2** -> DB Release deployment for all databases, run the **"mosip_release_db_deployment.sh"** script with release version as parameter. To access and exeute **"mosip_release_db_deployment.sh"** script, follow the below given sample commands:
**Step 2** -> DB Release deployment for all databases, run the **"mosip_release_pre-registration_db_deployment.sh"** script with release version as parameter. To access and exeute **"mosip_release_db_deployment.sh"** script, follow the below given sample commands:

<em> **Enter:-bash-4.2$** cd /home/madmin/database_release/ </em>

<em> **Enter:-bash-4.2$** bash mosip_release_db_deployment.sh <release_version_number> </em>
<em> **Enter:-bash-4.2$** bash mosip_release_pre-registration_db_deployment.sh <release_version_number> </em>

**Step 3** -> Please observe <em> Post Release Deployment Validation </em> steps below

Expand All @@ -101,11 +101,11 @@ Once completed with sourcing the database release files, Follow the DB release d

## DB deployment revoke: (Optional: Execute only if db version release deployment revoking required)

**Step 1** -> DB Revoke deployment for all databases, run the **"mosip_revoke_db_deployment.sh "** script with release version as parameter. To access and exeute **"mosip_revoke_db_deployment.sh "** script, follow the below given commands:
**Step 1** -> DB Revoke deployment for all databases, run the **"mosip_revoke_pre-registration_db_deployment.sh"** script with release version as parameter. To access and exeute **"mosip_revoke_db_deployment.sh "** script, follow the below given commands:

<em> **Enter:-bash-4.2$** cd /home/madmin/database_release/ </em>

<em> **Enter:-bash-4.2$** bash mosip_revoke_db_deployment.sh <release_version_number> </em>
<em> **Enter:-bash-4.2$** bash mosip_revoke_pre-registration_db_deployment.sh <release_version_number> </em>

**Step 2** -> Please observe <em> Post Release Deployment Validation </em> steps below

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- -------------------------------------------------------------------------------------------------
-- Database Name: mosip_prereg
-- Release Version : 1.0.4
-- Release Version : 1.0.5
-- Purpose : Database Alter scripts for the release for Pre Registration DB.
-- Create By : Sadanandegowda DM
-- Created Date : 30-Dec-2019
-- Created Date : 03-Jan-2020
--
-- Modified Date Modified By Comments / Remarks
-- -------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- -------------------------------------------------------------------------------------------------
-- Database Name: mosip_prereg
-- Release Version : 1.0.4
-- Release Version : 1.0.5
-- Purpose : Revoking Database Alter deployement done for release in Pre registration DB.
-- Create By : Sadanandegowda DM
-- Created Date : 30-Dec-2019
-- Created Date : 03-Jan-2020
--
-- Modified Date Modified By Comments / Remarks
-- -------------------------------------------------------------------------------------------------
Expand Down
55 changes: 0 additions & 55 deletions db_release_scripts/mosip_release_db_deployment.sh

This file was deleted.

22 changes: 22 additions & 0 deletions db_release_scripts/mosip_release_pre-registration_db_deployment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### -- ---------------------------------------------------------------------------------------------------------
### -- Script Name : Release DB deployment
### -- Deploy Module : MOSIP PRE-REG
### -- Purpose : To deploy MOSIP Database alter scripts for the release, Scripts deploy changes for pre-reg databases.
### -- Create By : Sadanandegowda
### -- Created Date : 07-Jan-2020
### --
### -- Modified Date Modified By Comments / Remarks
### -- -----------------------------------------------------------------------------------------------------------

### -- -----------------------------------------------------------------------------------------------------------

#! bin/bash
echo "`date` : You logged on to DB deplyment server as : `whoami`"
echo "`date` : MOSIP Database objects deployment for the release started.... Release Number : $1"

echo "=============================================================================================================="
bash ./mosip_prereg/prereg_release_db_deploy.sh ./mosip_prereg/prereg_release_deploy.properties $1
echo "=============================================================================================================="

echo "`date` : MOSIP DB Release Deployment for pre-reg databases is completed, Please check the logs at respective logs directory for more information"

55 changes: 0 additions & 55 deletions db_release_scripts/mosip_revoke_db_deployment.sh

This file was deleted.

22 changes: 22 additions & 0 deletions db_release_scripts/mosip_revoke_pre-registration_db_deployment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### -- ---------------------------------------------------------------------------------------------------------
### -- Script Name : Revoke DB deploy
### -- Deploy Module : MOSIP PRE-REG
### -- Purpose : To revoke MOSIP Database alter scripts for the release, Scripts revoke changes for pre-reg databases.
### -- Create By : Sadanandegowda
### -- Created Date : 07-Jan-2020
### --
### -- Modified Date Modified By Comments / Remarks
### -- -----------------------------------------------------------------------------------------------------------

### -- -----------------------------------------------------------------------------------------------------------

#! bin/bash
echo "`date` : You logged on to DB deplyment server as : `whoami`"
echo "`date` : MOSIP Database objects release deployment revoke started.... Release Number : $1"

echo "=============================================================================================================="
bash ./mosip_prereg/prereg_revoke_db_deploy.sh ./mosip_prereg/prereg_release_deploy.properties $1
echo "=============================================================================================================="

echo "`date` : MOSIP DB Release Deployment revoke for pre-reg databases is completed, Please check the logs at respective logs directory for more information"

6 changes: 3 additions & 3 deletions db_scripts/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

* **mosip_<schema_name>_deploy.properties:** This is the properties file name and present in each database.

* **mosip_all_db_deployment.sh:** This is the .sh file which is present in /home/madmin/database directory and which will be executed for all database deployment in single command execution.
* **mosip_pre-registration_db_deployment.sh:** This is the .sh file which is present in /home/madmin/database directory and which will be executed for all database deployment in single command execution.

**Note :** Not all Modules will have dml scripts. Make necessary changes in the properties file with dml variables for the modules where dml exists.

Expand Down Expand Up @@ -108,11 +108,11 @@ Once we complete with sourcing the database files, we need to follow the below D
**Step 1** -> Make prior modification to all the respective database properties files **(mosip_<schema_name>_deploy.properties)** in the respective database directories. Path of properties file and variables list remains same as explained above. Once the properties files are ready then access the directory where the deployment script is kept.

**Step 2** -> Deployment on all databases, run the **"mosip_all_db_deployment.sh"** script which is avialble in the /database directory. To access **"mosip_all_db_deployment.sh"** script, follow the below given commands:
**Step 2** -> Deployment on all databases, run the **"mosip_pre-registration_db_deployment.sh"** script which is avialble in the /database directory. To access **"mosip_all_db_deployment.sh"** script, follow the below given commands:

<em> **Enter:-bash-4.2$** cd /home/madmin/database/ </em>

<em> **Enter:-bash-4.2$** bash mosip_all_db_deployment.sh </em>
<em> **Enter:-bash-4.2$** bash mosip_pre-registration_db_deployment.sh </em>

**Step 3** -> Please observe <em> Post Deployment Validation </em> steps below

Expand Down
Loading

0 comments on commit b8d3b38

Please sign in to comment.