migration-to-docker.rst
110 lines
| 2.7 KiB
| text/x-rst
|
RstLexer
r276 | =================== | |||
Migration to Docker | ||||
=================== | ||||
r80 | ||||
r276 | ||||
Migrate old pre 4.28.0 installer based releases | ||||
----------------------------------------------- | ||||
1. Decide on components use | ||||
+++++++++++++++++++++++++++ | ||||
r80 | ||||
r155 | By default, RhodeCode stack uses Redis and Postgres. | |||
r80 | We recommend using those in Docker as things like | |||
backup/restore are much easier, and possible to run by our installer | ||||
r276 | If you plan to use your own redis or DB, disable those services in | |||
:file:`.custom/docker-compose-services.override.yaml` by setting ``replicas: 0`` | ||||
TODO: SEE COMPONENT CONFIGURATION | ||||
Select your DB type by commenting postgres or mysql db in :file:`.custom/docker-compose-services.override.yaml` | ||||
For Sqlite, disable both DB types. | ||||
r80 | ||||
r276 | .. note:: | |||
r80 | ||||
r276 | Selecting your own Redis, DB etc would require pointing to those instance inside .ini config files. By default | |||
rcstack is configured to talk to docker based addresses of those services. | ||||
r80 | ||||
r276 | ||||
2. Copy over your old configuration into new shared config dir | ||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||||
.. code-block:: | ||||
r155 | ||||
cp rhodecode.ini to config/_shared/rhodecode_old.ini | ||||
cp vcsserver.ini to config/_shared/vcsserver_old.ini | ||||
r276 | Then compare the new files e.g :file:`rhodecode.ini` with :file:`rhodecode_old.ini` and adjust accordingly, | |||
most important are location of storages/redis/db connection urls. | ||||
3. launch stack based on get started | ||||
++++++++++++++++++++++++++++++++++++ | ||||
Run an init command & launch the full stack | ||||
.. code-block:: | ||||
./rcstack init | ||||
./rcstack stack all up -d | ||||
4. make a db dump | ||||
+++++++++++++++++ | ||||
If docker-based DB is selected, otherwise this step can be skipped. | ||||
r155 | ||||
create a backup of your existing database, so it can be migrated to docker instance. | ||||
r276 | If you plan to use you old running DB, this step can be omitted. | |||
r155 | Adjust rhodecode.ini to point your docker rhodecode to old DB | |||
r80 | ||||
r276 | ||||
5. restore db | ||||
+++++++++++++ | ||||
r80 | If docker-based DB is selected | |||
Restore the database into docker container running DB | ||||
r280 | ||||
6. move data into docker storage | ||||
++++++++++++++++++++++++++++++++ | ||||
Step one is to move the required componenst to the :file:`.custom/storage` directory inside the docker | ||||
compose stack. This directory is mounted later on so data can be copied over into docker storage engine volumes. | ||||
r276 | .. code-block:: | |||
#. mv repositories data to .custom/storage | ||||
+++++ | ||||
r80 | ||||
r276 | #. mv gists data to .custom/storage | |||
+++++ | ||||
r80 | ||||
r276 | #. mv artifacts data to .custom/storage | |||
+++++ | ||||
r80 | ||||
r280 | ||||
Once that is done. | ||||
.. code-block:: | ||||
r276 | #. mv tarball cache data to .custom/storage | |||
+++++ | ||||
r80 | ||||
r276 | #. ./rcstack cli storage | |||
+++++ | ||||
r80 | ||||
r276 | #. move repos to /vol/repovolume | |||
+++++ | ||||
r80 | ||||
r276 | #. move artifacts data to /vol/datavolume | |||
+++++ | ||||
r80 | ||||
r276 | #. move tarballcache data to /vol/datavolume | |||
+++++ | ||||
r80 | ||||