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
Browse files Browse the repository at this point in the history
  • Loading branch information
mumarkhan999 committed Oct 9, 2023
1 parent 1b72ded commit b580c3e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,23 @@ dev.shell.%: ## Run a shell on the specified service's container.
dev.dbshell:
docker compose exec mysql80 bash -c "mysql"

dev.dbsetupmysql8:
docker compose exec -T mysql80 bash -e -c "mysql -uroot mysql" < provision-mysql80.sql

dev.dbcleanmysql8:
docker container rm edx.devstack.mysql80
docker volume rm devstack_mysql80_data

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.dbcleanmysql8
$(MAKE) dev.up.mysql57+mysql80
$(MAKE) dev.wait-for.mysql57+mysql80
$(MAKE) dev.dbsetupmysql8
$(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
17 changes: 11 additions & 6 deletions docs/manual_upgrades.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ 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 ::

make dev.stop

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

make dev.pull
Expand All @@ -25,7 +21,8 @@ The MySQL service has been upgraded from version 5.7 to 8.0. Developers will nee

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 ::
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 ``dev.dbcopyall8`` command.
This command will stop all of your services. Will clean your ``mysql80`` container and copy all of your databases from ``mysql57`` to ``mysql80``. ::

make dev.dbcopyall8

Expand All @@ -46,6 +43,14 @@ 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.

6. Now start your services again ::

make dev.up

7. You might need to apply latest migrations to your ``mysql80`` container. To do that, run the following command ::

make dev.migrate

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

Expand Down

0 comments on commit b580c3e

Please sign in to comment.