##// END OF EJS Templates
docs(misc): various docs improvements
super-admin -
Show More
@@ -1,80 +1,83 b''
1 # Configuration file for the Sphinx documentation builder.
1 # Configuration file for the Sphinx documentation builder.
2 #
2 #
3 # For the full list of built-in configuration values, see the documentation:
3 # For the full list of built-in configuration values, see the documentation:
4 # https://www.sphinx-doc.org/en/master/usage/configuration.html
4 # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
5
6 # -- Project information -----------------------------------------------------
6 # -- Project information -----------------------------------------------------
7 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
7 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8 import datetime
8 import datetime
9
9
10
10
11 def _get_version():
11 def _get_version():
12 with open("../../VERSION") as f:
12 with open("../../VERSION") as f:
13 return f.read().strip()
13 return f.read().strip()
14
14
15
15
16 now = datetime.datetime.today()
16 now = datetime.datetime.today()
17
17
18 # The full project version, used as the replacement for |release| and e.g. in the HTML templates.
18 # The full project version, used as the replacement for |release| and e.g. in the HTML templates.
19 # For example, for the Python documentation, this may be something like 2.6.0rc1.
19 # For example, for the Python documentation, this may be something like 2.6.0rc1.
20 # If you don’t need the separation provided between version and release, just set them both to the same value.
20 # If you don’t need the separation provided between version and release, just set them both to the same value.
21 release = _get_version()
21 release = _get_version()
22
22
23
23
24 project = 'RhodeCode rcstack'
24 project = 'RhodeCode rcstack'
25 copyright = f'2010-{now.year}, RhodeCode Inc.'
25 copyright = f'2010-{now.year}, RhodeCode Inc.'
26 author = 'RhodeCode Inc.'
26 author = 'RhodeCode Inc.'
27
27
28 # -- General configuration ---------------------------------------------------
28 # -- General configuration ---------------------------------------------------
29 # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
29 # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
30
30
31 extensions = [
31 extensions = [
32 'sphinx.ext.autodoc',
32 'sphinx.ext.autodoc',
33 'sphinx.ext.intersphinx',
33 'sphinx.ext.intersphinx',
34 'sphinx.ext.todo',
34 'sphinx.ext.todo',
35 'sphinx.ext.imgmath'
35 'sphinx.ext.imgmath'
36 ]
36 ]
37
37
38 templates_path = ['_templates']
38 templates_path = ['_templates']
39 exclude_patterns = []
39 exclude_patterns = []
40
40
41 # The name of the Pygments (syntax highlighting) style to use.
41 # The name of the Pygments (syntax highlighting) style to use.
42 pygments_style = 'sphinx'
42 pygments_style = 'sphinx'
43
43
44 # -- Options for HTML output -------------------------------------------------
44 # -- Options for HTML output -------------------------------------------------
45 # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
45 # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
46
46
47 # https://github.com/pradyunsg/furo/tree/main/src/furo/theme/furo
47 # https://github.com/pradyunsg/furo/tree/main/src/furo/theme/furo
48 html_theme = 'furo'
48 html_theme = 'furo'
49
49
50 # Add any paths that contain custom static files (such as style sheets) here,
50 # Add any paths that contain custom static files (such as style sheets) here,
51 # relative to this directory. They are copied after the builtin static files,
51 # relative to this directory. They are copied after the builtin static files,
52 # so a file named "default.css" will overwrite the builtin "default.css".
52 # so a file named "default.css" will overwrite the builtin "default.css".
53 html_static_path = ['_static']
53 html_static_path = ['_static']
54
54
55 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
55 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
56 # using the given strftime format.
56 # using the given strftime format.
57 html_last_updated_fmt = ' %H:%m %b %d, %Y'
57 html_last_updated_fmt = ' %H:%m %b %d, %Y'
58
58
59 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
59 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
60 html_show_sphinx = False
60 html_show_sphinx = False
61
61
62 html_extra_path = ['extra']
62 html_extra_path = ['extra']
63
63
64
64
65 rst_epilog = '''
65 rst_epilog = '''
66 .. |RCCEshort| replace:: Community
66 .. |RCCEshort| replace:: Community
67 .. |RCEEshort| replace:: Enterprise
67 .. |RCEEshort| replace:: Enterprise
68 .. |git| replace:: Git
68 .. |git| replace:: Git
69 .. |hg| replace:: Mercurial
69 .. |hg| replace:: Mercurial
70 .. |svn| replace:: Subversion
70 .. |svn| replace:: Subversion
71
71 .. |repo| replace:: repository
72 .. |repos| replace:: repositories
73 .. |authtoken| replace:: Authentication Token
74 .. |authtokens| replace:: **Auth Tokens**
72 .. |RCC| replace:: RhodeCode Control
75 .. |RCC| replace:: RhodeCode Control
73 .. |RCE| replace:: RhodeCode Enterprise
76 .. |RCE| replace:: RhodeCode Enterprise
74 .. |RCCE| replace:: RhodeCode Community
77 .. |RCCE| replace:: RhodeCode Community
75 .. |RCEE| replace:: RhodeCode Enterprise
78 .. |RCEE| replace:: RhodeCode Enterprise
76 .. |RCT| replace:: RhodeCode Tools
79 .. |RCT| replace:: RhodeCode Tools
77
80
78 .. |RCEBOLD| replace:: **RhodeCode Enterprise**
81 .. |RCEBOLD| replace:: **RhodeCode Enterprise**
79 .. |RCEITALICS| replace:: `RhodeCode Enterprise`
82 .. |RCEITALICS| replace:: `RhodeCode Enterprise`
80 '''
83 '''
@@ -1,184 +1,183 b''
1 Welcome to RhodeCode rcstack documentation!
1 Welcome to RhodeCode rcstack documentation!
2 ===========================================
2 ===========================================
3
3
4
4
5 =================
5 =================
6 RhodeCode rcstack
6 RhodeCode rcstack
7 =================
7 =================
8
8
9 RhodeCode rcstack is a multi-node highly-scalable setup to run RhodeCode services.
9 RhodeCode rcstack is a multi-node highly-scalable setup to run RhodeCode services.
10 It consists of all RhodeCode services required with additionally
10 It consists of all RhodeCode services required with additionally
11 Edge Router(Traefik with optional SSL) and Metrics Stack (Prometheus, Loki, Grafana) in single environment using Docker.
11 Edge Router(Traefik with optional SSL) and Metrics Stack (Prometheus, Loki, Grafana) in single environment using Docker.
12
12
13 .. only:: html
13 .. only:: html
14
14
15 Latest Version
15 Latest Version
16 --------------
16 --------------
17
17
18 The latest version of rcstack is |release|.
18 The latest version of rcstack is |release|.
19
19
20
20
21 Overview
21 Overview
22 --------
22 --------
23
23
24 To quickly get and install rcstack run this command
24 To quickly get and install rcstack run this command
25
25
26 .. code-block:: bash
26 .. code-block:: bash
27
27
28 mkdir docker-rhodecode && cd docker-rhodecode
28 mkdir docker-rhodecode && cd docker-rhodecode
29 curl -L -s -o rcstack https://dls.rhodecode.com/get-rcstack && chmod +x rcstack
29 curl -L -s -o rcstack https://dls.rhodecode.com/get-rcstack && chmod +x rcstack
30 ./rcstack get-started
30 ./rcstack get-started
31
31
32
32
33 Using a docker-compose this setup creates following services for RhodeCode:
33 Using a docker-compose this setup creates following services for RhodeCode:
34
34
35
35
36
36
37 **Router (mandatory to run):**
37 **Router (mandatory to run):**
38
38
39
39
40 .. code-block:: bash
40 .. code-block:: bash
41
41
42 ./rcstack router --help
42 ./rcstack router --help
43
43
44
44
45 `Traefik <https://doc.traefik.io/traefik/>`_ aka Edge Router is responsible for handling all outgoing and incoming traffic to whole stack.
45 `Traefik <https://doc.traefik.io/traefik/>`_ aka Edge Router is responsible for handling all outgoing and incoming traffic to whole stack.
46 It can do SSL termination, and handle SSL traffic with certificate management.
46 It can do SSL termination, and handle SSL traffic with certificate management.
47
47
48 Traefik listens to few defaults ports and
48 Traefik listens to few defaults ports and
49 handles all incoming/outgoing traffic to the stack
49 handles all incoming/outgoing traffic to the stack
50
50
51 - 80 (HTTP)
51 - 80 (HTTP)
52 - 443 (HTTPS)
52 - 443 (HTTPS)
53 - 9022 (SSH for RhodeCode traffic)
53 - 9022 (SSH for RhodeCode traffic)
54 - 3100 (Loki log aggregation)
54 - 3100 (Loki log aggregation)
55
55
56
56
57 **Services (mandatory to run):**
57 **Services (mandatory to run):**
58
58
59 .. code-block:: bash
59 .. code-block:: bash
60
60
61 ./rcstack services --help
61 ./rcstack services --help
62
62
63
63
64 - Database (defaults to PostgreSQL) Optionally can be replaced by MySQL, or own external database if needed.
64 - Database (defaults to PostgreSQL) Optionally can be replaced by MySQL, or own external database if needed.
65 - Redis, acts as cache and queue exchange
65 - Redis, acts as cache and queue exchange
66 - ChannelStream - live websocket communications
66 - ChannelStream - live websocket communications
67 - Elasticsearch (full text search backend)
67 - Elasticsearch (full text search backend)
68 - Nginx (static file service) proxy serving RhodeCode static files
68 - Nginx (static file service) proxy serving RhodeCode static files
69
69
70
70
71 **RhodeCode (mandatory to run):**
71 **RhodeCode (mandatory to run):**
72
72
73 .. code-block:: bash
73 .. code-block:: bash
74
74
75 ./rcstack rhodecode --help
75 ./rcstack rhodecode --help
76
76
77
77
78 - RhodeCode CE/EE web app
78 - RhodeCode CE/EE web app
79 - VCSServer for GIT/SVN/HG support
79 - VCSServer for GIT/SVN/HG support
80 - SSH server for cloning over SSH
80 - SSH server for cloning over SSH
81 - SVN webserver for SVN protocol support
81 - SVN webserver for SVN protocol support
82 - Celery workers for asynchronous tasks
82 - Celery workers for asynchronous tasks
83 - Celery beat for scheduler and automation tasks
83 - Celery beat for scheduler and automation tasks
84
84
85
85
86 **Metrics (Optional)**
86 **Metrics (Optional)**
87
87
88 .. code-block:: bash
88 .. code-block:: bash
89
89
90 ./rcstack metrics --help
90 ./rcstack metrics --help
91
91
92 - Loki, logs aggregation
92 - Loki, logs aggregation
93 - Grafana, metrics Dashboard
93 - Grafana, metrics Dashboard
94 - Prometheus, metrics time-series
94 - Prometheus, metrics time-series
95 - Statsd-exporter - statsd to Prometheus bridge
95 - Statsd-exporter - statsd to Prometheus bridge
96 - Node-exporter - machine stats and usage
96 - Node-exporter - machine stats and usage
97 - Promtail - log scraping
97 - Promtail - log scraping
98
98
99
99
100 System Requirements
100 System Requirements
101 -------------------
101 -------------------
102
102
103 Hardware
103 Hardware
104 ++++++++
104 ++++++++
105
105
106 2 CPU cores and 2GB RAM is typically sufficient for small teams/projects.
106 2 CPU cores and 2GB RAM is typically sufficient for small teams/projects.
107 We recommend 2-4 CPU cores and 4-8GB of RAM to unlock full potential of all services running in the
107 We recommend 2-4 CPU cores and 4-8GB of RAM to unlock full potential of all services running in the
108 RhodeCode Stack.
108 RhodeCode Stack.
109
109
110
110
111 OS Support
111 OS Support
112 ++++++++++
112 ++++++++++
113
113
114
114
115 rcstack works on any linux distribution, and has a beta support for MacOS.
115 rcstack works on any linux distribution, and has a beta support for MacOS.
116 There are two requirements for OS to be able to run whole rcstack.
116 There are two requirements for OS to be able to run whole rcstack.
117
117
118 - Ability to run Docker daemon
118 - Ability to run Docker daemon
119 - Ability to run a certain standard unix tools like:
119 - Ability to run a certain standard unix tools like:
120
120
121 - curl
121 - curl
122 - tar
122 - tar
123 - find
123 - find
124 - gzip
124 - gzip
125
125
126
126
127
127
128 .. toctree::
128 .. toctree::
129 :maxdepth: 1
129 :maxdepth: 1
130 :hidden:
130 :hidden:
131 :caption: Installation
131 :caption: Installation
132
132
133 install/installation.rst
133 install/installation.rst
134 install/upgrade.rst
134 install/upgrade.rst
135
135
136
136
137 .. toctree::
137 .. toctree::
138 :maxdepth: 1
138 :maxdepth: 1
139 :hidden:
139 :hidden:
140 :caption: Configuration
140 :caption: Configuration
141
141
142 configuration/configuration-overview.rst
142 configuration/configuration-overview.rst
143 configuration/configuration-of-components.rst
143 configuration/configuration-of-components.rst
144 configuration/scaling-rhodecode.rst
144 configuration/scaling-rhodecode.rst
145 configuration/enable-ssl-on-traefik.rst
145 configuration/enable-ssl-on-traefik.rst
146 configuration/ssl-certificates.rst
146 configuration/ssl-certificates.rst
147 configuration/data-volumes.rst
147 configuration/data-volumes.rst
148 configuration/set-license-file.rst
148 configuration/set-license-file.rst
149 configuration/set-specific-install-version.rst
149 configuration/set-specific-install-version.rst
150
150
151
152 .. toctree::
151 .. toctree::
153 :maxdepth: 1
152 :maxdepth: 1
154 :hidden:
153 :hidden:
155 :caption: Usage
154 :caption: Usage
156
155
157 usage/monitoring-unhealthy-containers.rst
156 usage/monitoring-unhealthy-containers.rst
158
157 usage/full-text-search-setup.rst
159
158
160 .. toctree::
159 .. toctree::
161 :maxdepth: 1
160 :maxdepth: 1
162 :hidden:
161 :hidden:
163 :caption: Migration
162 :caption: Migration
164
163
165 migration/migration-to-docker.rst
164 migration/migration-to-docker.rst
166
165
167
166
168 .. toctree::
167 .. toctree::
169 :maxdepth: 1
168 :maxdepth: 1
170 :hidden:
169 :hidden:
171 :caption: Builds & Images
170 :caption: Builds & Images
172
171
173 builds/build-new-image.rst
172 builds/build-new-image.rst
174 builds/building-images.rst
173 builds/building-images.rst
175 dev/dev-setup.rst
174 dev/dev-setup.rst
176 dev/step-by-step-example.rst
175 dev/step-by-step-example.rst
177
176
178
177
179 .. toctree::
178 .. toctree::
180 :maxdepth: 1
179 :maxdepth: 1
181 :hidden:
180 :hidden:
182 :caption: Changelog
181 :caption: Changelog
183
182
184 changes.rst No newline at end of file
183 changes.rst
@@ -1,84 +1,101 b''
1 .. _upgrade:
1 .. _upgrade:
2
2
3 Upgrade rcstack
3 Upgrade rcstack
4 ===============
4 ===============
5
5
6
6
7 It's usually recommended to start with updating the installer itself by running:
7 It's usually recommended to start with updating the installer itself by running:
8
8
9 .. code-block:: bash
9 .. code-block:: bash
10
10
11 ./rcstack self-update
11 ./rcstack self-update
12
12
13
13
14 .. note::
15
16 It's possible to change the update channel, or update to only specific versions. This can be done by providing
17 extra flags to self-update
18
19 .. code-block:: bash
20
21 # upgrade to master branch release line
22 ./rcstack self-update --force --cli-revision master --docker-revision master
23
24 # upgrade to a specific version corresponding to a git tag
25 ./rcstack self-update --force --cli-revision v5.3.0 --docker-revision v5.3.0
26
27
28 Upgrade of services
29 ===================
30
14 Then upgrade each stack based on instructions provided from the help output:
31 Then upgrade each stack based on instructions provided from the help output:
15
32
16 .. code-block:: bash
33 .. code-block:: bash
17
34
18 ./rcstack stack-upgrade <STACK_NAME>
35 ./rcstack stack-upgrade <STACK_NAME>
19
36
20
37
21 .. note::
38 .. note::
22
39
23 ./rcstack stack-upgrade rhodecode is a 0 downtime upgrade procedure.
40 ./rcstack stack-upgrade rhodecode is a 0 downtime upgrade procedure.
24 This will spawn 2x more nodes to perform the upgrade and then remove the old instances.
41 This will spawn 2x more nodes to perform the upgrade and then remove the old instances.
25 This way all incoming traffic will be handled continuously without any interruptions on upgrade
42 This way all incoming traffic will be handled continuously without any interruptions on upgrade
26
43
27
44
28 Example for full upgrade procedure:
45 Example for full upgrade procedure:
29
46
30
47
31 .. code-block:: bash
48 .. code-block:: bash
32
49
33 ./rcstack self-update
50 ./rcstack self-update
34 ./rcstack stack-upgrade router
51 ./rcstack stack-upgrade router
35 ./rcstack stack-upgrade services
52 ./rcstack stack-upgrade services
36 ./rcstack stack-upgrade rhodecode
53 ./rcstack stack-upgrade rhodecode
37 ./rcstack stack-upgrade metrics
54 ./rcstack stack-upgrade metrics
38
55
39
56
40 .. note::
57 .. note::
41
58
42 ./rcstack stack-upgrade does scaling of services which might use more RAM to handle the double instance amount.
59 ./rcstack stack-upgrade does scaling of services which might use more RAM to handle the double instance amount.
43 To avoid that stop each stack before running stack upgrade. This way services get upgraded without 2x scaling.
60 To avoid that stop each stack before running stack upgrade. This way services get upgraded without 2x scaling.
44 This method however would cause a downtime.
61 This method however would cause a downtime.
45
62
46 .. code-block:: bash
63 .. code-block:: bash
47
64
48 ./rcstack self-update
65 ./rcstack self-update
49 ./rcstack stack router down && ./rcstack stack-upgrade router
66 ./rcstack stack router down && ./rcstack stack-upgrade router
50 ./rcstack stack services down && ./rcstack stack-upgrade services
67 ./rcstack stack services down && ./rcstack stack-upgrade services
51 ./rcstack stack rhodecode down && ./rcstack stack-upgrade rhodecode
68 ./rcstack stack rhodecode down && ./rcstack stack-upgrade rhodecode
52 ./rcstack stack metrics down && ./rcstack stack-upgrade metrics
69 ./rcstack stack metrics down && ./rcstack stack-upgrade metrics
53
70
54
71
55 The above upgrade uses default timeouts to wait for any currently ongoing traffic to stop to kill the workers.
72 The above upgrade uses default timeouts to wait for any currently ongoing traffic to stop to kill the workers.
56 There are two additional flags that can be used for a faster upgrade that could let to end users errors, or small downtime
73 There are two additional flags that can be used for a faster upgrade that could let to end users errors, or small downtime
57 but will enforce the upgrade to be performed as fast as possible.
74 but will enforce the upgrade to be performed as fast as possible.
58
75
59
76
60 Fast upgrade with max 65s wait time after new upgraded containers start, and wait 5s before force killing old
77 Fast upgrade with max 65s wait time after new upgraded containers start, and wait 5s before force killing old
61 containers. This is still 0 downtime upgrade, but stoping existing containers is forced to 5s
78 containers. This is still 0 downtime upgrade, but stoping existing containers is forced to 5s
62 which might result in killed ongoing connections
79 which might result in killed ongoing connections
63
80
64
81
65 .. code-block:: bash
82 .. code-block:: bash
66
83
67 ./rcstack stack-upgrade rhodecode --stop-wait 65 --docker-stop-wait 5
84 ./rcstack stack-upgrade rhodecode --stop-wait 65 --docker-stop-wait 5
68
85
69
86
70
87
71 Install specific version
88 Install specific version of RhodeCode
72 ++++++++++++++++++++++++
89 +++++++++++++++++++++++++++++++++++++
73
90
74
91
75 In order to run a specific version of RhodeCode stack simply follow this:
92 In order to run a specific version of RhodeCode stack simply follow this:
76
93
77
94
78 .. code-block:: bash
95 .. code-block:: bash
79
96
80
97
81 ./rcstack cli set-runtime-image 5.0.0
98 ./rcstack cli set-runtime-image 5.0.0
82 ./rcstack stack all down
99 ./rcstack stack all down
83 ./rcstack stack all up -d
100 ./rcstack stack all up -d
84
101
@@ -1,301 +1,310 b''
1 ===================
1 ===================
2 Migration to Docker
2 Migration to Docker
3 ===================
3 ===================
4
4
5
5
6 Migrate old pre 4.28.0 installer based releases
6 Migrate old pre 4.28.0 installer based releases
7 -----------------------------------------------
7 -----------------------------------------------
8
8
9
9
10 1. Decide on components use
10 1. Decide on components use
11 +++++++++++++++++++++++++++
11 +++++++++++++++++++++++++++
12
12
13 By default, RhodeCode stack uses Redis and Postgres.
13 By default, RhodeCode stack uses Redis and Postgres.
14 We recommend using those in Docker as things like
14 We recommend using those in Docker as things like
15 backup/restore are much easier, and possible to run by our installer
15 backup/restore are much easier, and possible to run by our installer
16
16
17 If you plan to use your own redis or DB, disable those services in
17 If you plan to use your own redis or DB, disable those services in
18 :file:`.custom/docker-compose-services.override.yaml` by setting ``replicas: 0``
18 :file:`.custom/docker-compose-services.override.yaml` by setting ``replicas: 0``
19
19
20 see: :ref:`configuration-of-components`
20 see: :ref:`configuration-of-components`
21
21
22 Select your DB type by commenting postgres or mysql db in :file:`.custom/docker-compose-services.override.yaml`
22 Select your DB type by commenting postgres or mysql db in :file:`.custom/docker-compose-services.override.yaml`
23 For Sqlite, disable both DB types.
23 For Sqlite, disable both DB types.
24
24
25 .. note::
25 .. note::
26
26
27 Selecting your own Redis, DB etc would require pointing to those instance inside .ini config files. By default
27 Selecting your own Redis, DB etc would require pointing to those instance inside .ini config files. By default
28 rcstack is configured to talk to docker based addresses of those services.
28 rcstack is configured to talk to docker based addresses of those services.
29
29
30
30
31 2. bootstrap the environment for rcstack
31 2. bootstrap the environment for rcstack
32 ++++++++++++++++++++++++++++++++++++++++
32 ++++++++++++++++++++++++++++++++++++++++
33
33
34 .. code-block::
34 .. code-block::
35
35
36 ./rcstack init
36 ./rcstack init
37
37
38
38
39 During the install/configure phase pick corresponding edition (ce/ee)
39 During the install/configure phase pick corresponding edition (ce/ee)
40 transfer your license-token, and domain used in previous setup.
40 transfer your license-token, and domain used in previous setup.
41
41
42
42
43 Then ensure 4.28.0 version is set for proper migration
43 Then ensure 4.28.0 version is set for proper migration
44
44
45 .. code-block::
45 .. code-block::
46
46
47 ./rcstack cli set-runtime-image 4.28.0
47 ./rcstack cli set-runtime-image 4.28.0
48
48
49
49
50 3. Copy over your old configuration into new shared config dir
50 3. Copy over your old configuration into new shared config dir
51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
52
52
53 The init command will generate a docker optimized configurations, those by default have
53 The init command will generate a docker optimized configurations, those by default have
54 all services configured to be run against docker stack. Few options should be copied from old
54 all services configured to be run against docker stack. Few options should be copied from old
55 .ini config files for best backward compatibility and smooth migration.
55 .ini config files for best backward compatibility and smooth migration.
56
56
57 The new .ini files are located in the :file:`config/_shared/` directory.
57 The new .ini files are located in the :file:`config/_shared/` directory.
58 This is located in directory where rcstack is installed.
58 This is located in directory where rcstack is installed.
59
59
60 Assumes installation is inside a directory :file:`/home/rcdev/.rccontrol/enterprise-1`
60 Assumes installation is inside a directory :file:`/home/rcdev/.rccontrol/enterprise-1`
61
61
62 .. code-block::
62 .. code-block::
63
63
64 cp /home/rcdev/.rccontrol/enterprise-1/rhodecode.ini /root/docker-rhodecode/config/_shared/rhodecode_old.ini
64 cp /home/rcdev/.rccontrol/enterprise-1/rhodecode.ini /root/docker-rhodecode/config/_shared/rhodecode_old.ini
65 cp /home/rcdev/.rccontrol/vcsserver-1/vcsserver.ini /root/docker-rhodecode/config/_shared/vcsserver_old.ini
65 cp /home/rcdev/.rccontrol/vcsserver-1/vcsserver.ini /root/docker-rhodecode/config/_shared/vcsserver_old.ini
66
66
67 Then compare the new files e.g :file:`rhodecode.ini` with :file:`rhodecode_old.ini` and adjust accordingly,
67 Then compare the new files e.g :file:`rhodecode.ini` with :file:`rhodecode_old.ini` and adjust accordingly,
68 most important items for review are:
68 most important items for review are:
69
69
70 - location of storages paths (those should be left Dockerized)
70 - location of storages paths (those should be left Dockerized)
71 - redis/db connection urls (depends on choice of services, either Docker urls, or external urls)
71 - redis/db connection urls (depends on choice of services, either Docker urls, or external urls)
72 - app_instance_uuid = COPY_OLD_VALUE
72 - app_instance_uuid = COPY_OLD_VALUE
73 - rhodecode.encrypted_values.secret = COPY_OLD_VALUE
73 - rhodecode.encrypted_values.secret = COPY_OLD_VALUE
74 - beaker.session.secret = COPY_OLD_VALUE
74 - beaker.session.secret = COPY_OLD_VALUE
75 - email configuration
75 - email configuration
76
76
77
77
78 For example, if you leave on your *own* redis instance then no adjustment is needed, if you decide to use
78 For example, if you leave on your *own* redis instance then no adjustment is needed, if you decide to use
79 docker based redis, here's an example change you need to make:
79 docker based redis, here's an example change you need to make:
80
80
81 .. code-block:: ini
81 .. code-block:: ini
82
82
83 #rc_cache.cache_perms.arguments.host = localhost # this was commented out
83 #rc_cache.cache_perms.arguments.host = localhost # this was commented out
84 # new options is change to connect to docker redis instance, hostname is just the name of compose service (redis)
84 # new options is change to connect to docker redis instance, hostname is just the name of compose service (redis)
85 rc_cache.cache_perms.arguments.host = redis
85 rc_cache.cache_perms.arguments.host = redis
86 rc_cache.cache_perms.arguments.port = 6379
86 rc_cache.cache_perms.arguments.port = 6379
87 rc_cache.cache_perms.arguments.db = 0
87 rc_cache.cache_perms.arguments.db = 0
88 rc_cache.cache_perms.arguments.socket_timeout = 30
88 rc_cache.cache_perms.arguments.socket_timeout = 30
89
89
90
90
91 4. launch services stack
91 4. launch services stack
92 ++++++++++++++++++++++++
92 ++++++++++++++++++++++++
93
93
94 Launch the service stack with Database and all required services
94 Launch the service stack with Database and all required services
95
95
96 .. code-block:: bash
96 .. code-block:: bash
97
97
98 ./rcstack stack services up -d
98 ./rcstack stack services up -d
99
99
100 Check the status of service stack by checking the status command
100 Check the status of service stack by checking the status command
101
101
102 .. code-block:: bash
102 .. code-block:: bash
103
103
104 ./rcstack status
104 ./rcstack status
105
105
106 Running hostname: https://code.rhodecode.com
106 Running hostname: https://code.rhodecode.com
107 CONTAINER ID NAMES IMAGE STATUS PORTS
107 CONTAINER ID NAMES IMAGE STATUS PORTS
108 5746f723d892 rc_cluster_services-channelstream-1 channelstream/channelstream:0.7.1 Up About a minute (healthy) 8000/tcp
108 5746f723d892 rc_cluster_services-channelstream-1 channelstream/channelstream:0.7.1 Up About a minute (healthy) 8000/tcp
109 bef9599eef0c rc_cluster_services-database-1 postgres:14.9 Up About a minute (healthy) 5432/tcp
109 bef9599eef0c rc_cluster_services-database-1 postgres:14.9 Up About a minute (healthy) 5432/tcp
110 addf574b6f1c rc_cluster_services-elasticsearch-1 elasticsearch:6.8.23 Up About a minute (healthy) 9200/tcp, 9300/tcp
110 addf574b6f1c rc_cluster_services-elasticsearch-1 elasticsearch:6.8.23 Up About a minute (healthy) 9200/tcp, 9300/tcp
111 9f89816cc6dc rc_cluster_services-nginx-errors-1 nginx:1.25.2 Up About a minute 80/tcp
111 9f89816cc6dc rc_cluster_services-nginx-errors-1 nginx:1.25.2 Up About a minute 80/tcp
112 1c8e90e8ab7d rc_cluster_services-nginx-statics-1 nginx:1.25.2 Up About a minute (health) 80/tcp
112 1c8e90e8ab7d rc_cluster_services-nginx-statics-1 nginx:1.25.2 Up About a minute (health) 80/tcp
113 fcb8378cd506 rc_cluster_services-redis-1 redis:7.0.12 Up About a minute (healthy) 6379/tcp
113 fcb8378cd506 rc_cluster_services-redis-1 redis:7.0.12 Up About a minute (healthy) 6379/tcp
114
114
115
115
116
116
117 5. make a db dump
117 5. make a db dump
118 +++++++++++++++++
118 +++++++++++++++++
119
119
120 .. note::
120 .. note::
121
121
122 Run this only if docker-based DB is selected. Skip otherwise
122 Run this only if docker-based DB is selected. Skip otherwise
123
123
124 create a backup of your existing database, so it can be migrated to docker instance.
124 create a backup of your existing database, so it can be migrated to docker instance.
125 Place the backup file into :file:`.custom/db_dump`
125 Place the backup file into :file:`.custom/db_dump`
126
126
127
127
128 .. code-block:: bash
128 .. code-block:: bash
129
129
130 # For MySQL DBs
130 # For MySQL DBs
131 $ mysqldump -u <uname> -p <pass> rhodecode_db_name > .custom/db_dump/mysql-db-backup.sql
131 $ mysqldump -u <uname> -p <pass> rhodecode_db_name > .custom/db_dump/mysql-db-backup.sql
132
132
133 # For PostgreSQL DBs
133 # For PostgreSQL DBs
134 $ PGPASSWORD=<pass> pg_dump --inserts -U <uname> -h localhost rhodecode_db_name > .custom/db_dump/postgresql-db-backup.sql
134 $ PGPASSWORD=<pass> pg_dump --inserts -U <uname> -h localhost rhodecode_db_name > .custom/db_dump/postgresql-db-backup.sql
135
135
136 # For SQLite
136 # For SQLite
137 $ sqlite3 rhodecode.db β€˜.dump’ > .custom/db_dump/sqlite-db-backup.sql
137 $ sqlite3 rhodecode.db β€˜.dump’ > .custom/db_dump/sqlite-db-backup.sql
138
138
139
139
140
140
141 6. restore db
141 6. restore db
142 +++++++++++++
142 +++++++++++++
143
143
144
144
145 .. note::
145 .. note::
146
146
147 Run this only if docker-based DB is selected. Skip otherwise
147 Run this only if docker-based DB is selected. Skip otherwise
148
148
149 Cleanup previous db created by init script, and re-create it.
149 Cleanup previous db created by init script, and re-create it.
150 Restore the database into docker container running DB.
150 Restore the database into docker container running DB.
151 Run the ./rcstack cli db command:
151 Run the ./rcstack cli db command:
152
152
153 .. code-block:: bash
153 .. code-block:: bash
154
154
155 ./rcstack cli db
155 ./rcstack cli db
156
156
157 attaching pg_data under: /var/lib/postgresql/data
157 attaching pg_data under: /var/lib/postgresql/data
158 attaching $PWD/.custom/db_dump under: /var/rc-data-dump
158 attaching $PWD/.custom/db_dump under: /var/rc-data-dump
159
159
160 restore dump:
160 restore dump:
161 \i /var/rc-data-dump/your_dump.sql
161 \i /var/rc-data-dump/your_dump.sql
162
162
163 psql (14.9 (Debian 14.9-1.pgdg120+1))
163 psql (14.9 (Debian 14.9-1.pgdg120+1))
164 Type "help" for help.
164 Type "help" for help.
165
165
166 rhodecode=# \connect template1
166 rhodecode=# \connect template1
167 template1=# drop database rhodecode;
167 template1=# drop database rhodecode;
168 template1=# create database rhodecode;
168 template1=# create database rhodecode;
169 template1=# \connect rhodecode
169 template1=# \connect rhodecode
170 rhodecode=# \i /var/rc-data-dump/postgresql-db-backup.sql
170 rhodecode=# \i /var/rc-data-dump/postgresql-db-backup.sql
171
171
172
172
173 This will restore the previously stored DB dump into new dockerized DB.
173 This will restore the previously stored DB dump into new dockerized DB.
174
174
175
175
176 7. move data into docker storage
176 7. move data into docker storage
177 ++++++++++++++++++++++++++++++++
177 ++++++++++++++++++++++++++++++++
178
178
179 Step one is to move the required components to the :file:`.custom/storage` directory inside the docker
179 Step one is to move the required components to the :file:`.custom/storage` directory inside the docker
180 compose stack. This directory is mounted later on so data can be copied over into docker storage engine volumes.
180 compose stack. This directory is mounted later on so data can be copied over into docker storage engine volumes.
181
181
182 .. note::
182 .. note::
183
183
184 The tarball cache can be omitted since RhodeCode uses a new system which is not compatible with older release
184 The tarball cache can be omitted since RhodeCode uses a new system which is not compatible with older release
185
185
186 .. note::
186 .. note::
187
187
188 The path for artifacts can be found inside the **old** .ini file and DB
188 The path for artifacts can be found inside the **old** .ini file and DB
189
189
190 .. code-block:: ini
190 .. code-block:: ini
191
191
192 #artifacts, %(here)s is current location of old .ini file
192 #artifacts, %(here)s is current location of old .ini file
193 file_store.storage_path = %(here)s/data/file_store
193 file_store.storage_path = %(here)s/data/file_store
194
194
195
195
196 7.1. Copy artifacts into docker shared dir
196 7.1. Copy artifacts into docker shared dir
197
197
198 .. code-block:: bash
198 .. code-block:: bash
199
199
200 mv -v .rccontrol/enterprise-1/data/file_store .custom/storage/
200 mv -v .rccontrol/enterprise-1/data/file_store .custom/storage/
201
201
202
202
203 7.2. Copy gists into docker shared dir
203 7.2. Copy gists into docker shared dir
204
204
205 .. code-block:: bash
205 .. code-block:: bash
206
206
207 mv -v /home/rhodecode/repos/.gist .custom/storage/repos/.gist
207 mv -v /home/rhodecode/repos/.gist .custom/storage/repos/.gist
208
208
209
209
210 7.3. Copy repositories into docker shared dir
210 7.3. Copy repositories into docker shared dir
211
211
212 .. code-block:: bash
212 .. code-block:: bash
213
213
214 mv -v /home/rhodecode/repos .custom/storage/
214 mv -v /home/rhodecode/repos .custom/storage/
215
215
216
216
217 Once that is done, we can now move from the host directory into docker storage engine volumes.
217 Once that is done, we can now move from the host directory into docker storage engine volumes.
218
218
219 .. code-block:: bash
219 .. code-block:: bash
220
220
221 ./rcstack cli storage
221 ./rcstack cli storage
222
222
223 attaching rc_datavolume under: /vol/datavolume
223 attaching rc_datavolume under: /vol/datavolume
224 attaching rc_reposvolume under: /vol/repovolume
224 attaching rc_reposvolume under: /vol/repovolume
225 attaching $PWD/.custom/storage under: /vol/backupvolume
225 attaching $PWD/.custom/storage under: /vol/backupvolume
226
226
227 root@a27697d13f44:/vol#
227 root@a27697d13f44:/vol#
228
228
229 7.4. Move artifacts
229 7.4. Move artifacts
230
230
231 .. code-block:: bash
231 .. code-block:: bash
232
232
233 root@a27697d13f44:/vol# mv /vol/backupvolume/repos/* /vol/repovolume/
233 root@a27697d13f44:/vol# mv /vol/backupvolume/repos/* /vol/repovolume/
234
234
235
235
236 7.5. Move gists
236 7.5. Move gists
237
237
238 .. code-block:: bash
238 .. code-block:: bash
239
239
240 root@a27697d13f44:/vol# mv /vol/backupvolume/repos/* /vol/repovolume/
240 root@a27697d13f44:/vol# mv /vol/backupvolume/repos/* /vol/repovolume/
241
241
242 7.6. Move repositories
242 7.6. Move repositories
243
243
244 .. code-block:: bash
244 .. code-block:: bash
245
245
246 root@a27697d13f44:/vol# mv /vol/backupvolume/repos/* /vol/repovolume/
246 root@a27697d13f44:/vol# mv /vol/backupvolume/repos/* /vol/repovolume/
247
247
248
248
249 8. Ensure other old services are stopped
249 8. Ensure other old services are stopped
250 ++++++++++++++++++++++++++++++++++++++++
250 ++++++++++++++++++++++++++++++++++++++++
251
251
252 At this point we're going to run the whole stack, because the router binds to some of the common
252 At this point we're going to run the whole stack, because the router binds to some of the common
253 ports, we need to make sure old db/nginx are stopped before we proceed.
253 ports, we need to make sure old db/nginx are stopped before we proceed.
254
254
255 It's also important to stop running RhodeCode services.
255 It's also important to stop running RhodeCode services.
256
256
257 This is where a first downtime of previously ran setup would occur.
257 This is where a first downtime of previously ran setup would occur.
258
258
259
259
260
260
261 9. Start complete stack
261 9. Start complete stack
262 +++++++++++++++++++++++
262 +++++++++++++++++++++++
263
263
264 .. code-block:: bash
264 .. code-block:: bash
265
265
266 ./rcstack stack all up -d
266 ./rcstack stack all up -d
267
267
268
268
269
269
270 10. Fix DB paths
270 10. Fix DB paths
271 ++++++++++++++++
271 ++++++++++++++++
272
272
273 Docker internally changed the paths used before, he're a way to change it using ishell. But this can
273 Docker internally changed the paths used before, he're a way to change it using ishell. But this can
274 be also adjusted in the UI
274 be also adjusted in the UI
275
275
276 .. code-block:: bash
276 .. code-block:: bash
277
277
278 ./rcstack cli ishell
278 ./rcstack cli ishell
279
279
280
280
281 .. code-block:: python
281 .. code-block:: python
282
282
283 ui1 = RhodeCodeUi.query().filter(RhodeCodeUi.ui_key=='usercache').scalar()
283 ui1 = RhodeCodeUi.query().filter(RhodeCodeUi.ui_key=='usercache').scalar()
284 ui2 = RhodeCodeUi.query().filter(RhodeCodeUi.ui_key=='store_location').scalar()
284 ui2 = RhodeCodeUi.query().filter(RhodeCodeUi.ui_key=='store_location').scalar()
285 ui3 = RhodeCodeUi.query().filter(RhodeCodeUi.ui_key=='/').scalar()
285 ui3 = RhodeCodeUi.query().filter(RhodeCodeUi.ui_key=='/').scalar()
286
286
287 ui1.ui_value = '/var/opt/rhodecode_repo_store/.cache/lfs_store'
287 ui1.ui_value = '/var/opt/rhodecode_repo_store/.cache/lfs_store'
288 ui2.ui_value = '/var/opt/rhodecode_repo_store/.cache/largefiles'
288 ui2.ui_value = '/var/opt/rhodecode_repo_store/.cache/largefiles'
289 ui3.ui_value = '/var/opt/rhodecode_repo_store'
289 ui3.ui_value = '/var/opt/rhodecode_repo_store'
290
290
291 Session().add(ui1);Session().commit()
291 Session().add(ui1);Session().commit()
292 Session().add(ui2);Session().commit()
292 Session().add(ui2);Session().commit()
293 Session().add(ui3);Session().commit()
293 Session().add(ui3);Session().commit()
294
294
295
295
296 11. Run full remap & rescan
297 +++++++++++++++++++++++++++
298
299 From RhodeCode web-interface, the last step is to run a full remap & rescan action.
300
301 1. From the RhodeCode Web interface, open
302 :menuselection:`Admin --> Settings --> Remap and rescan`
303 2. Select :guilabel:`Invalidate cache for all repositories` to ensure we cleanup old caches from previous installs
304 3. Click :guilabel:`Rescan Repositories` action
296
305
297
306
298 SSL Certificates
307 SSL Certificates
299 ^^^^^^^^^^^^^^^^
308 ^^^^^^^^^^^^^^^^
300
309
301 - see: :ref:`configuration-of-ssl-certificates` No newline at end of file
310 - see: :ref:`configuration-of-ssl-certificates`
General Comments 0
You need to be logged in to leave comments. Login now