Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
chore: update dbcopyall8 command (#1204)
Browse files Browse the repository at this point in the history
* chore: update dbcopyall8 command
  • Loading branch information
mumarkhan999 authored Oct 11, 2023
1 parent be2d642 commit e0f04a7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,16 @@ dev.dbshell:

DB_NAMES_LIST = credentials discovery ecommerce notes registrar xqueue edxapp edxapp_csmh dashboard analytics-api reports reports_v1
_db_copy8_targets = $(addprefix dev.dbcopy8.,$(DB_NAMES_LIST))
dev.dbcopyall8: ## Copy data from old mysql 5.7 containers into new mysql8 dbs
dev.dbcopyall8: ## Clean mysql80 container and copy data from old mysql 5.7 containers into new mysql8 dbs
$(MAKE) stop
$(MAKE) dev.remove-containers.mysql80
docker volume rm devstack_mysql80_data
$(MAKE) dev.up.mysql57+mysql80
$(MAKE) dev.wait-for.mysql57+mysql80
sleep 10
docker compose exec -T mysql80 mysql -uroot mysql < provision-mysql80.sql
$(MAKE) $(_db_copy8_targets)
$(MAKE) stop

dev.dbcopy8.%: ## Copy data from old mysql 5.7 container into a new 8 db
docker compose exec mysql57 mysqldump "$*" > .dev/$*.sql
Expand Down
20 changes: 13 additions & 7 deletions docs/manual_upgrades.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@ Please add new instructions to the top, include a date, and make a post in the `

The MySQL service has been upgraded from version 5.7 to 8.0. Developers will need to follow the following instructions.

1. Stop the running containers ::
1. Take latest ``git pull`` of ``devstack`` and ``edx-platform``.

make dev.stop

2. Take latest ``git pull`` of ``devstack`` and ``edx-platform``
3. Take the latest pull of images ::
2. Take the latest pull of images ::

make dev.pull

4. Run provisioning command ::
3. Run provisioning command ::

make dev.provision

5. [Optional] Additionally, there is a database copy command to help you transfer data from MySQL 5.7 to 8.0. After provisioning use the following command ::
4. [Optional] Additionally, there is a database copy command to help you transfer data from MySQL 5.7 to 8.0. After provisioning use the ``dev.dbcopyall8`` command. This command will stop all of your services, clean your ``mysql80`` container, and copy all of your databases from ``mysql57`` to ``mysql80``. ::

make dev.dbcopyall8

Expand All @@ -46,6 +43,15 @@ This command copies the following databases:

If you prefer not to copy all databases, update ``DB_NAMES_LIST`` in the ``Makefile`` of devstack before running the dbcopy command.

5. Now start your desired services again using ``dev.up`` command. For example running following command will start ``lms``, ``cms`` ::

make dev.up.lms+cms

6. You might need to apply latest migrations to your ``mysql80`` container for some services. To do that, you can use ``dev.migrate`` command. For example for ``lms`` you can run ::

make dev.migrate.lms


2023-08-02 - Forum upgrade from Ruby 2 to 3
*******************************************

Expand Down

0 comments on commit e0f04a7

Please sign in to comment.