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

Commit e0f04a7

Browse files
authored
chore: update dbcopyall8 command (#1204)
* chore: update dbcopyall8 command
1 parent be2d642 commit e0f04a7

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,16 @@ dev.dbshell:
464464

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

472478
dev.dbcopy8.%: ## Copy data from old mysql 5.7 container into a new 8 db
473479
docker compose exec mysql57 mysqldump "$*" > .dev/$*.sql

docs/manual_upgrades.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,17 @@ Please add new instructions to the top, include a date, and make a post in the `
1212

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

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

17-
make dev.stop
18-
19-
2. Take latest ``git pull`` of ``devstack`` and ``edx-platform``
20-
3. Take the latest pull of images ::
17+
2. Take the latest pull of images ::
2118

2219
make dev.pull
2320

24-
4. Run provisioning command ::
21+
3. Run provisioning command ::
2522

2623
make dev.provision
2724

28-
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 ::
25+
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``. ::
2926

3027
make dev.dbcopyall8
3128

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

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

46+
5. Now start your desired services again using ``dev.up`` command. For example running following command will start ``lms``, ``cms`` ::
47+
48+
make dev.up.lms+cms
49+
50+
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 ::
51+
52+
make dev.migrate.lms
53+
54+
4955
2023-08-02 - Forum upgrade from Ruby 2 to 3
5056
*******************************************
5157

0 commit comments

Comments
 (0)