...
Changes to existing APIs
- createAccount *# New parameters
- accountid : UUID of the account
- userid: UUID for the User
- createUser
...
- Each zone becomes part of a separate Region: Copy existing DB to all Regions and disable all zones except one in each Region.
- Upgrade existing MS to 4.1. This MS will become region 1
- Disable all the zones in region 1
- Dump region 1 DB
- mysqldump -u cloud -p -h <region1_db_host> cloud > region1.sql
- Install 4.1 MS in the remaining Regions
- Set the region_id while installing the DB
- cloud-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<password> -e <encryption_type> -m <management_server_key> -k <database_key> -r <region_id>
- Copy region 1 DB to other regions*** mysql -u cloud -p -h <region2_db_host> cloud < region1.sql
- Start all management servers. At this point all the zones are disabled
- Selectively enable zones in the required regions
- All zones remain in the same Region: Nothing to do here.
- Zones are divided among Regions: Copy existing DB to all regions and disabling the zones in all Regions other than the selected Region
...
If an environment has only 1 region, functionality will be same as the current CS installation. Id of this region will be 1. All accounts/users/domains will have region_id as 1
Default local region will be added with name "Local" and end_point "http://localhost:8080/client". Use updateRegion API to set a different name or end_point for this region
Adding 2nd Region
1. Install a 2nd CS instance.
...
- mysqldump -u cloud -p -h <region1_db_host> cloud account user domain > region1.sql
- mysql -u cloud -p -h <region2_db_host> cloud < region1.sql
6. Remove project accounts after copying:
- mysql> delete from account where type = 5;
7. Set default zone as null
- mysql> update account set default_zone_id = null;
8. Restart mgmt servers in region 2
...
- mysqldump -u cloud -p -h <region1_db_host> cloud account user domain > region1.sql
- mysql -u cloud -p -h <regionN_db_host> cloud < region1.sql
6. Remove project accounts after copying:
- mysql> delete from account where type = 5;
7. Set default zone as null
- mysql> update account set default_zone_id = null;
8. Restart mgmt servers in region N
...