Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2426

Write next draft database migration code

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      0.5
    • Sprint:
      Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep, Fall 1: 14 Sep - 25 Sep, Fall 2: 28 Sep - 9 Oct

      Description

      Move database copy logic to role mysql.

      Modify variables files to mention old database only. "Old" database is the one we want to copy.

      example_common.yml:

      • first_rds_db_name - the name of the old database we want to copy
      • first_db_instance_id - the RDS hosting the old database we want to copy

      example_secrets.yml:

      • first_rds_admin_password - admin password for the RDS hosting the old database we want to copy
      • first_rds_admin_user - admin user name for the RDS hosting the old database we want to copy

      Add logic to role mysql to run the following tasks if and only if all of the above variables are defined and first_rds_db_name is different from rds_db_name. (Use when statements.)

      Tasks:

      • Create mysql dump from first_rds_db_name hosted on first_db_instance_id
      • Load data into rds_db_name hosted on rds_instance_id

      Also, modify the code to stop assuming that RDS admin user is named "admin." This should be configurable.

        Attachments

          Issue Links

            Activity

            ann.loraine Ann Loraine created issue -
            ann.loraine Ann Loraine made changes -
            Field Original Value New Value
            Epic Link IGBF-2323 [ 18477 ]
            ann.loraine Ann Loraine made changes -
            Link This issue relates to IGBF-2421 [ IGBF-2421 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Description Move logic to role mysql.

            Modify variables files to mention old database only:

            example_common.yml:
            * first_rds_db_name - the name of the database we want to copy
            * first_db_instance_id - the RDS hosting the database we want to copy

            example_secrets.yml:
            * first_rds_admin_password - admin password for the RDS hosting the database we want to copy
            * first_rds_admin_user - admin user name for the RDS hosting the database we want to copy

            Add logic to role mysql to run the following tasks if and only if all of the above variables are defined *and* first_rds_db_name is *different from* rds_db_name. (Use when statements.)

            Tasks:

            * Create mysql dump from first_rds_db_name hosted on first_db_instance_id
            * Load data into rds_db_name hosted on rds_instance_id

            Also, modify the code to not assume that RDS admin password is named "admin." This should be configurable.
            Move database copy logic to role mysql.

            Modify variables files to mention old database only. "Old" database is the one we want to copy.

            example_common.yml:
            * first_rds_db_name - the name of the old database we want to copy
            * first_db_instance_id - the RDS hosting the old database we want to copy

            example_secrets.yml:
            * first_rds_admin_password - admin password for the RDS hosting the old database we want to copy
            * first_rds_admin_user - admin user name for the RDS hosting the old database we want to copy

            Add logic to role mysql to run the following tasks if and only if all of the above variables are defined *and* first_rds_db_name is *different from* rds_db_name. (Use when statements.)

            Tasks:

            * Create mysql dump from first_rds_db_name hosted on first_db_instance_id
            * Load data into rds_db_name hosted on rds_instance_id

            Also, modify the code to stop assuming that RDS admin user is named "admin." This should be configurable.
            ann.loraine Ann Loraine made changes -
            Description Move database copy logic to role mysql.

            Modify variables files to mention old database only. "Old" database is the one we want to copy.

            example_common.yml:
            * first_rds_db_name - the name of the old database we want to copy
            * first_db_instance_id - the RDS hosting the old database we want to copy

            example_secrets.yml:
            * first_rds_admin_password - admin password for the RDS hosting the old database we want to copy
            * first_rds_admin_user - admin user name for the RDS hosting the old database we want to copy

            Add logic to role mysql to run the following tasks if and only if all of the above variables are defined *and* first_rds_db_name is *different from* rds_db_name. (Use when statements.)

            Tasks:

            * Create mysql dump from first_rds_db_name hosted on first_db_instance_id
            * Load data into rds_db_name hosted on rds_instance_id

            Also, modify the code to stop assuming that RDS admin user is named "admin." This should be configurable.
            Move database copy logic to role mysql.

            Modify variables files to mention old database only. "Old" database is the one we want to copy.

            example_common.yml:
            * first_rds_db_name - the name of the old database we want to copy
            * first_db_instance_id - the RDS hosting the old database we want to copy

            example_secrets.yml:
            * first_rds_admin_password - admin password for the RDS hosting the old database we want to copy
            * first_rds_admin_user - admin user name for the RDS hosting the old database we want to copy

            Add logic to role mysql to run the following tasks if and only if all of the above variables are defined *and* first_rds_db_name is *different from* rds_db_name. (Use when statements.)

            Tasks:

            * Create mysql dump from first_rds_db_name hosted on first_db_instance_id
            * Load data into rds_db_name hosted on rds_instance_id

            Also, modify the code to stop assuming that RDS admin user is named "admin." This should be configurable.


            cdias1 Chester Dias (Inactive) made changes -
            Assignee Chester Dias [ cdias1 ]
            cdias1 Chester Dias (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            Hide
            cdias1 Chester Dias (Inactive) added a comment -

            [~aloraine] first_rds_admin_user: we don't need to pass this in example_secrets.yml, I will get this from the rds_instance_info module.

            Show
            cdias1 Chester Dias (Inactive) added a comment - [~aloraine] first_rds_admin_user: we don't need to pass this in example_secrets.yml, I will get this from the rds_instance_info module.
            Hide
            ann.loraine Ann Loraine added a comment -

            Clarification:

            • "first" database, rds, etc refer to the database we are planning to copy and do the mysql dump on. It is the pre-existing system we are going to copy.
            • the variables that were already there when you started work are associated with the new mysql database that will get populated if "first" variables are assigned
            • the admin user and password for the "first" rds host might be different from admin user and password for the rds host and database being set up for the new app store
            Show
            ann.loraine Ann Loraine added a comment - Clarification: "first" database, rds, etc refer to the database we are planning to copy and do the mysql dump on. It is the pre-existing system we are going to copy. the variables that were already there when you started work are associated with the new mysql database that will get populated if "first" variables are assigned the admin user and password for the "first" rds host might be different from admin user and password for the rds host and database being set up for the new app store
            Hide
            cdias1 Chester Dias (Inactive) added a comment -

            Got it. Thanks

            Show
            cdias1 Chester Dias (Inactive) added a comment - Got it. Thanks
            ann.loraine Ann Loraine made changes -
            Link This issue blocks IGBF-2371 [ IGBF-2371 ]
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun [ 96 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 July [ 96, 97 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            Hide
            cdias1 Chester Dias (Inactive) added a comment - - edited

            Summary of Tasks
            1. Gather information of old DBs if first_db_instance_id!=db_instance_id and first_rds_db_name|string !="None"
            2. Create mysql dump of old DB if first_rds_db_name != rds_db_name and first_rds_db_name|string !="None" and first_rds_admin_password|string !="None"
            3. Load data into the newly created DB if first_rds_db_name != rds_db_name and first_rds_db_name|string !="None"

            Please Review: https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2426#diff

            Show
            cdias1 Chester Dias (Inactive) added a comment - - edited Summary of Tasks 1. Gather information of old DBs if first_db_instance_id!=db_instance_id and first_rds_db_name|string !="None" 2. Create mysql dump of old DB if first_rds_db_name != rds_db_name and first_rds_db_name|string !="None" and first_rds_admin_password|string !="None" 3. Load data into the newly created DB if first_rds_db_name != rds_db_name and first_rds_db_name|string !="None" Please Review: https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2426#diff
            cdias1 Chester Dias (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            cdias1 Chester Dias (Inactive) made changes -
            Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            ann.loraine Ann Loraine made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ] Chester Dias [ cdias1 ]
            Hide
            ann.loraine Ann Loraine added a comment -

            Thank you for making the requested changes. Please submit PR at your convenience.
            attn: Chester Dias

            Show
            ann.loraine Ann Loraine added a comment - Thank you for making the requested changes. Please submit PR at your convenience. attn: Chester Dias
            Show
            cdias1 Chester Dias (Inactive) added a comment - PR https://bitbucket.org/lorainelab/appstore-playbooks/pull-requests/31/igbf-2426-added-code-for-the-copying-data/diff
            cdias1 Chester Dias (Inactive) made changes -
            Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
            cdias1 Chester Dias (Inactive) made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            ann.loraine Ann Loraine made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            ann.loraine Ann Loraine made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul [ 96, 97 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 3 Jul - 14 Jul [ 96, 97, 98 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul [ 96, 97, 98 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul [ 96, 97, 98, 99 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            Hide
            ann.loraine Ann Loraine added a comment -

            Blocked by S3 bucket copy-over.

            Show
            ann.loraine Ann Loraine added a comment - Blocked by S3 bucket copy-over.
            ann.loraine Ann Loraine made changes -
            Link This issue is blocked by IGBF-2427 [ IGBF-2427 ]
            ann.loraine Ann Loraine made changes -
            Status Post-merge Testing In Progress [ 10003 ] Merged Needs Testing [ 10002 ]
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul [ 96, 97, 98, 99 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 29 Jul - 12 Aug [ 96, 97, 98, 99, 100 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug [ 96, 97, 98, 99, 100 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug [ 96, 97, 98, 99, 100, 101 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug [ 96, 97, 98, 99, 100, 101 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep [ 96, 97, 98, 99, 100, 101, 102 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep [ 96, 97, 98, 99, 100, 101, 102 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep, Fall 1: 14 Sep - 25 Sep [ 96, 97, 98, 99, 100, 101, 102, 103 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Sprint Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep, Fall 1: 14 Sep - 25 Sep [ 96, 97, 98, 99, 100, 101, 102, 103 ] Summer 1: 8 Jun - 19 Jun, Summer 2: 22 Jun - 3 Jul, Summer 3: 6 Jul - 17 Jul, Summer 4: 14 Jul - 28 Jul, Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep, Fall 1: 14 Sep - 25 Sep, Fall 2: 28 Sep - 9 Oct [ 96, 97, 98, 99, 100, 101, 102, 103, 104 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            ann.loraine Ann Loraine made changes -
            Resolution Done [ 10000 ]
            Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
            ann.loraine Ann Loraine made changes -
            Assignee Chester Dias [ cdias1 ]

              People

              • Assignee:
                cdias1 Chester Dias (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: