Show More
@@ -0,0 +1,28 b'' | |||||
|
1 | ||||
|
2 | ============================ | |||
|
3 | Set Specific Install Version | |||
|
4 | ============================ | |||
|
5 | ||||
|
6 | By default rcstack uses a defined version stored under :file:`.custom/.runtime.env` | |||
|
7 | ||||
|
8 | Check current version by running this command: | |||
|
9 | ||||
|
10 | .. code-block:: bash | |||
|
11 | ||||
|
12 | ./rcstack cli image-info --verbose | |||
|
13 | Image stored version: 4.28.0 | |||
|
14 | Image from runtime: beta | |||
|
15 | runtime-file=/home/rhodecode-docker/.custom/.runtime.env | |||
|
16 | RC_VERSION=beta | |||
|
17 | ||||
|
18 | ||||
|
19 | When self-update is executed the downloaded stored version gets updated. In case a downgrade, or specific | |||
|
20 | version installation is required you can manually set a update version. | |||
|
21 | ||||
|
22 | ||||
|
23 | .. code-block:: bash | |||
|
24 | ||||
|
25 | ./rcstack cli set-runtime-image 5.1.0 | |||
|
26 | ||||
|
27 | This will set the runtime version to 5.1.0. Other options can be used that corresponds to the docker release tags. | |||
|
28 | e.g `beta` or `edge` to always run on the latest images |
@@ -1,208 +1,208 b'' | |||||
1 | # RhodeCode Cluster |
|
1 | # Welcome to RhodeCode rcstack documentation! | |
2 |
|
2 | |||
3 |
RhodeCode |
|
3 | RhodeCode rcstack is a multi-node highly-scalable setup to run RhodeCode services. | |
4 | It consists of Edge Router(Traefik with optional SSL) and Metrics Stack (Prometheus, Loki, Grafana) and |
|
4 | It consists of all RhodeCode services required with additionally | |
5 | all its additional components in single environment using Docker. |
|
5 | Edge Router(Traefik with optional SSL) and Metrics Stack (Prometheus, Loki, Grafana) in single environment using Docker. | |
6 |
|
6 | |||
7 | Using a docker-compose this setup creates following services for RhodeCode: |
|
7 | Using a docker-compose this setup creates following services for RhodeCode: | |
8 |
|
8 | |||
9 |
|
|
9 | Router (mandatory to run): | |
10 |
|
10 | |||
11 | - Traefik, Edge Router, SSL termination etc. |
|
11 | - Traefik, Edge Router, SSL termination etc. | |
12 | Traefik listens to few defaults ports and handles all incomming/outgoing traffic to the stack |
|
12 | Traefik listens to few defaults ports and handles all incomming/outgoing traffic to the stack | |
13 |
|
13 | |||
14 | Core Services: |
|
14 | Core Services: | |
15 |
|
15 | |||
16 | - Database (defaults to PostgreSQL) |
|
16 | - Database (defaults to PostgreSQL) | |
17 | Optionally can be replaced by MySQL, or own external database if needed. |
|
17 | Optionally can be replaced by MySQL, or own external database if needed. | |
18 | - Redis, acts as cache and queue exchange |
|
18 | - Redis, acts as cache and queue exchange | |
19 | - ChannelStream - live websocket communications |
|
19 | - ChannelStream - live websocket communications | |
20 | - Elasticsearch (full text search backend) |
|
20 | - Elasticsearch (full text search backend) | |
21 | - Nginx (static file service) proxy serving RhodeCode static files |
|
21 | - Nginx (static file service) proxy serving RhodeCode static files | |
22 |
|
22 | |||
23 | RhodeCode |
|
23 | RhodeCode | |
24 |
|
24 | |||
25 | - RhodeCode CE/EE web app |
|
25 | - RhodeCode CE/EE web app | |
26 | - VCSServer for GIT/SVN/HG support |
|
26 | - VCSServer for GIT/SVN/HG support | |
27 | - SSH server for cloning over SSH |
|
27 | - SSH server for cloning over SSH | |
28 | - SVN webserver for HTTP support over SVN |
|
28 | - SVN webserver for HTTP support over SVN | |
29 | - Celery workers for asynchronous tasks |
|
29 | - Celery workers for asynchronous tasks | |
30 | - Celery beat for automation tasks |
|
30 | - Celery beat for automation tasks | |
31 |
|
31 | |||
32 | Metrics |
|
32 | Metrics | |
33 |
|
33 | |||
34 | - Loki, logs aggregation |
|
34 | - Loki, logs aggregation | |
35 | - Grafana, metrics Dashboard |
|
35 | - Grafana, metrics Dashboard | |
36 | - Prometheus, metrics time-series |
|
36 | - Prometheus, metrics time-series | |
37 | - Statsd-exporter - statsd to Prometheus bridge |
|
37 | - Statsd-exporter - statsd to Prometheus bridge | |
38 | - Node-exporter - machine stats and usage |
|
38 | - Node-exporter - machine stats and usage | |
39 | - Promtail - log scraping |
|
39 | - Promtail - log scraping | |
40 |
|
40 | |||
41 | ##rcstack for Linux, docker based installer |
|
41 | ## rcstack for Linux, docker based installer | |
42 |
|
42 | |||
43 | To get started with RhodeCode get the new shell installer called rcstack |
|
43 | To get started with RhodeCode get the new shell installer called rcstack | |
44 |
|
44 | |||
45 | ``` |
|
45 | ``` | |
46 | mkdir docker-rhodecode && cd docker-rhodecode |
|
46 | mkdir docker-rhodecode && cd docker-rhodecode | |
47 | curl -L -s -o rcstack https://dls.rhodecode.com/get/master && chmod +x rcstack |
|
47 | curl -L -s -o rcstack https://dls.rhodecode.com/get/master && chmod +x rcstack | |
48 | ./rcstack get-started |
|
48 | ./rcstack get-started | |
49 | ``` |
|
49 | ``` | |
50 |
|
50 | |||
51 | ## Pre requisites |
|
51 | ## Pre requisites | |
52 |
|
52 | |||
53 | To Run this stack Docker engine and Docker Compose needs to be installed on the host machine. |
|
53 | To Run this stack Docker engine and Docker Compose needs to be installed on the host machine. | |
54 | Please run `./rcstack init` to install docker using the installer, or |
|
54 | Please run `./rcstack init` to install docker using the installer, or | |
55 | visit docker site and install docker (min version 20.10) and docker compose: |
|
55 | visit docker site and install docker (min version 20.10) and docker compose: | |
56 |
|
56 | |||
57 | - https://docs.docker.com/engine/install/ |
|
57 | - https://docs.docker.com/engine/install/ | |
58 | - https://docs.docker.com/compose/install/ |
|
58 | - https://docs.docker.com/compose/install/ | |
59 |
|
59 | |||
60 | If there's docker already installed, rcstack will detect that and skip docker installation |
|
60 | If there's docker already installed, rcstack will detect that and skip docker installation | |
61 |
|
61 | |||
62 |
|
62 | |||
63 | # Quick install tutorial |
|
63 | # Quick install tutorial | |
64 |
|
64 | |||
65 | Those are step-by-step installation/run steps. |
|
65 | Those are step-by-step installation/run steps. | |
66 |
|
66 | |||
67 | create configurations / docker definitions: |
|
67 | create configurations / docker definitions: | |
68 |
|
68 | |||
69 | ./rcstack init |
|
69 | ./rcstack init | |
70 |
|
70 | |||
71 |
|
71 | |||
72 | At this point a custom file under .custom/.runtime.env was created. Adjust it if required. |
|
72 | At this point a custom file under .custom/.runtime.env was created. Adjust it if required. | |
73 | Few adjustments that could be done is to change the domain |
|
73 | Few adjustments that could be done is to change the domain | |
74 |
|
74 | |||
75 | Start Traefik router that would handle all incoming traffic, load balance. |
|
75 | Start Traefik router that would handle all incoming traffic, load balance. | |
76 |
|
76 | |||
77 | - IMPORTANT: A valid domain needs to be present in .custom/.runtime.env to access the RhodeCode |
|
77 | - IMPORTANT: A valid domain needs to be present in .custom/.runtime.env to access the RhodeCode | |
78 | This can be a local entry or real domain, e.g rhodecode.local/rhodecode.yourcompany.com (pointing to the machine IP) |
|
78 | This can be a local entry or real domain, e.g rhodecode.local/rhodecode.yourcompany.com (pointing to the machine IP) | |
79 |
|
79 | |||
80 | - IMPORTANT: router binds to some common ports 80, 443, SSH (9022), Loki (3100) if those are |
|
80 | - IMPORTANT: router binds to some common ports 80, 443, SSH (9022), Loki (3100) if those are | |
81 | not available, please adjust them inside the override docker file |
|
81 | not available, please adjust them inside the override docker file | |
82 |
|
82 | |||
83 |
|
83 | |||
84 | ./rcstack stack router up --detach |
|
84 | ./rcstack stack router up --detach | |
85 |
|
85 | |||
86 | Start the database and bootstrap it |
|
86 | Start the database and bootstrap it | |
87 |
|
87 | |||
88 |
|
88 | |||
89 | ./rcontrol stack database up --detach |
|
89 | ./rcontrol stack database up --detach | |
90 |
|
90 | |||
91 | Start other services required |
|
91 | Start other services required | |
92 |
|
92 | |||
93 |
|
93 | |||
94 | ./rcstack stack services up --detach |
|
94 | ./rcstack stack services up --detach | |
95 |
|
95 | |||
96 | Start RhodeCode stack |
|
96 | Start RhodeCode stack | |
97 |
|
97 | |||
98 |
|
98 | |||
99 | ./rcstack stack rhodecode up --detach |
|
99 | ./rcstack stack rhodecode up --detach | |
100 |
|
100 | |||
101 | Check stack status |
|
101 | Check stack status | |
102 |
|
102 | |||
103 | ./rcstack status |
|
103 | ./rcstack status | |
104 |
|
104 | |||
105 | Output should look similar to this: |
|
105 | Output should look similar to this: | |
106 |
|
106 | |||
107 | --- |
|
107 | --- | |
108 | CONTAINER ID IMAGE STATUS NAMES PORTS |
|
108 | CONTAINER ID IMAGE STATUS NAMES PORTS | |
109 | ef54fc528e3a traefik:v2.9.5 Up 2 hours rc_cluster_router-traefik-1 0.0.0.0:80->80/tcp, :::80->80/tcp |
|
109 | ef54fc528e3a traefik:v2.9.5 Up 2 hours rc_cluster_router-traefik-1 0.0.0.0:80->80/tcp, :::80->80/tcp | |
110 | f3ea0539e8b0 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-rhodecode-1 0.0.0.0:10020->10020/tcp, :::10020->10020/tcp |
|
110 | f3ea0539e8b0 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-rhodecode-1 0.0.0.0:10020->10020/tcp, :::10020->10020/tcp | |
111 | 2be52ba58ffe rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-vcsserver-1 |
|
111 | 2be52ba58ffe rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-vcsserver-1 | |
112 | 7cd730ad3263 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-1 |
|
112 | 7cd730ad3263 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-1 | |
113 | dfa231342c87 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-beat-1 |
|
113 | dfa231342c87 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-beat-1 | |
114 | d3d76ce2de96 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-sshd-1 |
|
114 | d3d76ce2de96 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-sshd-1 | |
115 | daaac329414b rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-svn-1 |
|
115 | daaac329414b rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-svn-1 | |
116 | 7b8504fb9acb nginx:1.23.2 Up 2 hours (healthy) rc_cluster_services-nginx-1 80/tcp |
|
116 | 7b8504fb9acb nginx:1.23.2 Up 2 hours (healthy) rc_cluster_services-nginx-1 80/tcp | |
117 | 7279c25feb6b elasticsearch:6.8.23 Up 2 hours (healthy) rc_cluster_services-elasticsearch-1 9200/tcp, 9300/tcp |
|
117 | 7279c25feb6b elasticsearch:6.8.23 Up 2 hours (healthy) rc_cluster_services-elasticsearch-1 9200/tcp, 9300/tcp | |
118 | 19fb93587493 redis:7.0.5 Up 2 hours (healthy) rc_cluster_services-redis-1 6379/tcp |
|
118 | 19fb93587493 redis:7.0.5 Up 2 hours (healthy) rc_cluster_services-redis-1 6379/tcp | |
119 | fb77fb6496c6 channelstream/channelstream:0.7.1 Up 2 hours (healthy) rc_cluster_services-channelstream-1 8000/tcp |
|
119 | fb77fb6496c6 channelstream/channelstream:0.7.1 Up 2 hours (healthy) rc_cluster_services-channelstream-1 8000/tcp | |
120 | cb6c5c022f5b postgres:14.6 Up 2 hours (healthy) rc_cluster_services-database-1 5432/tcp |
|
120 | cb6c5c022f5b postgres:14.6 Up 2 hours (healthy) rc_cluster_services-database-1 5432/tcp | |
121 |
|
121 | |||
122 | At this point you should be able to access: |
|
122 | At this point you should be able to access: | |
123 |
|
123 | |||
124 | - RhodeCode instance at your domain, e.g rhodecode.local, the default access |
|
124 | - RhodeCode instance at your domain, e.g rhodecode.local, the default access | |
125 | credentials are generated in .runtime.env |
|
125 | credentials are generated in .runtime.env | |
126 | ``` |
|
126 | ``` | |
127 | RHODECODE_USER_NAME=admin |
|
127 | RHODECODE_USER_NAME=admin | |
128 | RHODECODE_USER_PASS=super-secret-password |
|
128 | RHODECODE_USER_PASS=super-secret-password | |
129 | ``` |
|
129 | ``` | |
130 |
|
130 | |||
131 | - Grafana monitoring dashboard at rhodecode.local/_grafana, grafana generates default access credentials |
|
131 | - Grafana monitoring dashboard at rhodecode.local/_grafana, grafana generates default access credentials | |
132 | those need to be changed after first login |
|
132 | those need to be changed after first login | |
133 | ``` |
|
133 | ``` | |
134 | user: admin |
|
134 | user: admin | |
135 | pass: admin |
|
135 | pass: admin | |
136 | ``` |
|
136 | ``` | |
137 |
|
137 | |||
138 | # Operation |
|
138 | # Operation | |
139 |
|
139 | |||
140 | ## Data structure / volumes |
|
140 | ## Data structure / volumes | |
141 |
|
141 | |||
142 | There are 4 main volumes defined: |
|
142 | There are 4 main volumes defined: | |
143 |
|
143 | |||
144 |
|
144 | |||
145 | - `/etc/rhodecode/conf` |
|
145 | - `/etc/rhodecode/conf` | |
146 |
|
146 | |||
147 | Shared volume used for configuration files for rhodecode, vcsserver and supervisord, and some cache data |
|
147 | Shared volume used for configuration files for rhodecode, vcsserver and supervisord, and some cache data | |
148 | rhodecode.ini and vcsserver.ini files are located there and can be adjusted |
|
148 | rhodecode.ini and vcsserver.ini files are located there and can be adjusted | |
149 |
|
149 | |||
150 | - `/var/opt/rhodecode_repo_store` |
|
150 | - `/var/opt/rhodecode_repo_store` | |
151 |
|
151 | |||
152 | Used for main repository storage where repositories would be stored |
|
152 | Used for main repository storage where repositories would be stored | |
153 |
|
153 | |||
154 | - `/var/opt/rhodecode_data` |
|
154 | - `/var/opt/rhodecode_data` | |
155 |
|
155 | |||
156 | Data dir for rhodecode cache/lock files, or user sessions (for file backend) |
|
156 | Data dir for rhodecode cache/lock files, or user sessions (for file backend) | |
157 |
|
157 | |||
158 |
|
158 | |||
159 | ## Set License for EE version |
|
159 | ## Set License for EE version | |
160 |
|
160 | |||
161 | In order to install EE edition a license file is required to be present. |
|
161 | In order to install EE edition a license file is required to be present. | |
162 | It can contain your current license, or when empty license can be applied via Web interface. |
|
162 | It can contain your current license, or when empty license can be applied via Web interface. | |
163 |
|
163 | |||
164 | To apply it during build phase save your raw license data into a file |
|
164 | To apply it during build phase save your raw license data into a file | |
165 |
|
165 | |||
166 | `config/rhodecode_enterprise.license` |
|
166 | `config/rhodecode_enterprise.license` | |
167 |
|
167 | |||
168 | If this file is present build phase will read it and license will be applied at creation. |
|
168 | If this file is present build phase will read it and license will be applied at creation. | |
169 | This file can also be empty and license can be applied via a WEB interface after first login. |
|
169 | This file can also be empty and license can be applied via a WEB interface after first login. | |
170 |
|
170 | |||
171 |
|
171 | |||
172 | ## scaling to handle more traffic |
|
172 | ## scaling to handle more traffic | |
173 | In case for bigger setups docker-compose can scale more rhodecode/vcsserver workers: |
|
173 | In case for bigger setups docker-compose can scale more rhodecode/vcsserver workers: | |
174 | Adjust the .custom/docker-compose-apps.override.yaml file and change |
|
174 | Adjust the .custom/docker-compose-apps.override.yaml file and change | |
175 |
|
175 | |||
176 | ``` |
|
176 | ``` | |
177 | services: |
|
177 | services: | |
178 | rhodecode: |
|
178 | rhodecode: | |
179 | deploy: |
|
179 | deploy: | |
180 | # set number of instances of services to be spawned on stack start |
|
180 | # set number of instances of services to be spawned on stack start | |
181 | replicas: 4 |
|
181 | replicas: 4 | |
182 |
|
182 | |||
183 | vcsserver: |
|
183 | vcsserver: | |
184 | deploy: |
|
184 | deploy: | |
185 | # set number of instances of services to be spawned on stack start |
|
185 | # set number of instances of services to be spawned on stack start | |
186 | replicas: 6 |
|
186 | replicas: 6 | |
187 | ``` |
|
187 | ``` | |
188 |
|
188 | |||
189 | Logging is pushed to stdout from all services. |
|
189 | Logging is pushed to stdout from all services. | |
190 |
|
190 | |||
191 |
|
191 | |||
192 | ### Upgrade procedure: |
|
192 | ### Upgrade procedure: | |
193 |
|
193 | |||
194 | - run ./rcstack self-update |
|
194 | - run ./rcstack self-update | |
195 | - run ./rcstack stack-upgrade to get upgrade instructions |
|
195 | - run ./rcstack stack-upgrade to get upgrade instructions | |
196 |
|
196 | |||
197 |
|
197 | |||
198 | With this done, you can now proceed with every step of normal source installation (Creating & building images), but instead of using |
|
198 | With this done, you can now proceed with every step of normal source installation (Creating & building images), but instead of using | |
199 | just `docker-compose` command it needs to be replaced with `docker-compose -f docker-compose.yaml -f docker-compose.source.yaml` |
|
199 | just `docker-compose` command it needs to be replaced with `docker-compose -f docker-compose.yaml -f docker-compose.source.yaml` | |
200 |
|
200 | |||
201 | For example to override the installer build with the source `rhodecode` based image, and also setting proper version, run: |
|
201 | For example to override the installer build with the source `rhodecode` based image, and also setting proper version, run: | |
202 |
|
202 | |||
203 | ``` |
|
203 | ``` | |
204 | RC_VERSION="4.28.0.SRC.2022.12.12.1" docker-compose -f docker-compose-apps.yaml -f docker-compose.source.yaml build --no-cache --progress=plain rhodecode |
|
204 | RC_VERSION="4.28.0.SRC.2022.12.12.1" docker-compose -f docker-compose-apps.yaml -f docker-compose.source.yaml build --no-cache --progress=plain rhodecode | |
205 | ``` |
|
205 | ``` | |
206 |
|
206 | |||
207 | NOTE THAT it's recommended to keep rc_version and source_Ver the same |
|
207 | NOTE THAT it's recommended to keep rc_version and source_Ver the same | |
208 |
|
208 |
@@ -1,36 +1,55 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 | now = datetime.datetime.today() |
|
10 | now = datetime.datetime.today() | |
11 |
|
11 | |||
12 | project = 'RhodeCode rcstack' |
|
12 | project = 'RhodeCode rcstack' | |
13 | copyright = f'2010-{now.year}, RhodeCode Inc.' |
|
13 | copyright = f'2010-{now.year}, RhodeCode Inc.' | |
14 | author = 'RhodeCode Inc.' |
|
14 | author = 'RhodeCode Inc.' | |
15 |
|
15 | |||
16 | # -- General configuration --------------------------------------------------- |
|
16 | # -- General configuration --------------------------------------------------- | |
17 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
|
17 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | |
18 |
|
18 | |||
19 | extensions = [ |
|
19 | extensions = [ | |
20 | 'sphinx_rtd_theme' |
|
20 | 'sphinx_rtd_theme' | |
21 | ] |
|
21 | ] | |
22 |
|
22 | |||
23 | templates_path = ['_templates'] |
|
23 | templates_path = ['_templates'] | |
24 | exclude_patterns = [] |
|
24 | exclude_patterns = [] | |
25 |
|
25 | |||
26 | # The name of the Pygments (syntax highlighting) style to use. |
|
26 | # The name of the Pygments (syntax highlighting) style to use. | |
27 | pygments_style = 'sphinx' |
|
27 | pygments_style = 'sphinx' | |
28 |
|
28 | |||
29 | # -- Options for HTML output ------------------------------------------------- |
|
29 | # -- Options for HTML output ------------------------------------------------- | |
30 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
|
30 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | |
31 |
|
31 | |||
32 | html_theme = 'furo' |
|
32 | html_theme = 'furo' | |
33 | html_static_path = ['_static'] |
|
33 | html_static_path = ['_static'] | |
34 | html_last_updated_fmt = ' %H:%m %b %d, %Y' |
|
34 | html_last_updated_fmt = ' %H:%m %b %d, %Y' | |
35 | html_show_sphinx = False |
|
35 | html_show_sphinx = False | |
36 | html_extra_path = ['extra'] |
|
36 | html_extra_path = ['extra'] | |
|
37 | ||||
|
38 | ||||
|
39 | rst_epilog = ''' | |||
|
40 | .. |RCCEshort| replace:: Community | |||
|
41 | .. |RCEEshort| replace:: Enterprise | |||
|
42 | .. |git| replace:: Git | |||
|
43 | .. |hg| replace:: Mercurial | |||
|
44 | .. |svn| replace:: Subversion | |||
|
45 | ||||
|
46 | .. |RCC| replace:: RhodeCode Control | |||
|
47 | .. |RCE| replace:: RhodeCode Enterprise | |||
|
48 | .. |RCCE| replace:: RhodeCode Community | |||
|
49 | .. |RCEE| replace:: RhodeCode Enterprise | |||
|
50 | .. |RCT| replace:: RhodeCode Tools | |||
|
51 | ||||
|
52 | .. |RCEBOLD| replace:: **RhodeCode Enterprise** | |||
|
53 | .. |RCEITALICS| replace:: `RhodeCode Enterprise` | |||
|
54 | ||||
|
55 | ''' |
@@ -1,122 +1,123 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 | Using a docker-compose this setup creates following services for RhodeCode: |
|
13 | Using a docker-compose this setup creates following services for RhodeCode: | |
14 |
|
14 | |||
15 |
|
15 | |||
16 |
|
16 | |||
17 | **Router (mandatory to run):** |
|
17 | **Router (mandatory to run):** | |
18 |
|
18 | |||
19 |
|
19 | |||
20 | .. code-block:: bash |
|
20 | .. code-block:: bash | |
21 |
|
21 | |||
22 | ./rcstack router --help |
|
22 | ./rcstack router --help | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | `Traefik <https://doc.traefik.io/traefik/>`_ aka Edge Router is responsible for handling all outgoing and incoming traffic to whole stack. |
|
25 | `Traefik <https://doc.traefik.io/traefik/>`_ aka Edge Router is responsible for handling all outgoing and incoming traffic to whole stack. | |
26 | It can do SSL termination, and handle SSL traffic with certificate management. |
|
26 | It can do SSL termination, and handle SSL traffic with certificate management. | |
27 |
|
27 | |||
28 | Traefik listens to few defaults ports and |
|
28 | Traefik listens to few defaults ports and | |
29 | handles all incoming/outgoing traffic to the stack |
|
29 | handles all incoming/outgoing traffic to the stack | |
30 |
|
30 | |||
31 | - 80 (HTTP) |
|
31 | - 80 (HTTP) | |
32 | - 443 (HTTPS) |
|
32 | - 443 (HTTPS) | |
33 | - 9443 (SSH for RhodeCode traffic) |
|
33 | - 9443 (SSH for RhodeCode traffic) | |
34 | - 3100 (Loki log aggregation) |
|
34 | - 3100 (Loki log aggregation) | |
35 |
|
35 | |||
36 |
|
36 | |||
37 | **Services (mandatory to run):** |
|
37 | **Services (mandatory to run):** | |
38 |
|
38 | |||
39 | .. code-block:: bash |
|
39 | .. code-block:: bash | |
40 |
|
40 | |||
41 | ./rcstack services --help |
|
41 | ./rcstack services --help | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | - Database (defaults to PostgreSQL) Optionally can be replaced by MySQL, or own external database if needed. |
|
44 | - Database (defaults to PostgreSQL) Optionally can be replaced by MySQL, or own external database if needed. | |
45 | - Redis, acts as cache and queue exchange |
|
45 | - Redis, acts as cache and queue exchange | |
46 | - ChannelStream - live websocket communications |
|
46 | - ChannelStream - live websocket communications | |
47 | - Elasticsearch (full text search backend) |
|
47 | - Elasticsearch (full text search backend) | |
48 | - Nginx (static file service) proxy serving RhodeCode static files |
|
48 | - Nginx (static file service) proxy serving RhodeCode static files | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | **RhodeCode (mandatory to run):** |
|
51 | **RhodeCode (mandatory to run):** | |
52 |
|
52 | |||
53 | .. code-block:: bash |
|
53 | .. code-block:: bash | |
54 |
|
54 | |||
55 | ./rcstack rhodecode --help |
|
55 | ./rcstack rhodecode --help | |
56 |
|
56 | |||
57 |
|
57 | |||
58 | - RhodeCode CE/EE web app |
|
58 | - RhodeCode CE/EE web app | |
59 | - VCSServer for GIT/SVN/HG support |
|
59 | - VCSServer for GIT/SVN/HG support | |
60 | - SSH server for cloning over SSH |
|
60 | - SSH server for cloning over SSH | |
61 | - SVN webserver for SVN protocol support |
|
61 | - SVN webserver for SVN protocol support | |
62 | - Celery workers for asynchronous tasks |
|
62 | - Celery workers for asynchronous tasks | |
63 | - Celery beat for scheduler and automation tasks |
|
63 | - Celery beat for scheduler and automation tasks | |
64 |
|
64 | |||
65 |
|
65 | |||
66 | **Metrics (Optional)** |
|
66 | **Metrics (Optional)** | |
67 |
|
67 | |||
68 | .. code-block:: bash |
|
68 | .. code-block:: bash | |
69 |
|
69 | |||
70 | ./rcstack metrics --help |
|
70 | ./rcstack metrics --help | |
71 |
|
71 | |||
72 | - Loki, logs aggregation |
|
72 | - Loki, logs aggregation | |
73 | - Grafana, metrics Dashboard |
|
73 | - Grafana, metrics Dashboard | |
74 | - Prometheus, metrics time-series |
|
74 | - Prometheus, metrics time-series | |
75 | - Statsd-exporter - statsd to Prometheus bridge |
|
75 | - Statsd-exporter - statsd to Prometheus bridge | |
76 | - Node-exporter - machine stats and usage |
|
76 | - Node-exporter - machine stats and usage | |
77 | - Promtail - log scraping |
|
77 | - Promtail - log scraping | |
78 |
|
78 | |||
79 |
|
79 | |||
80 | .. toctree:: |
|
80 | .. toctree:: | |
81 | :maxdepth: 1 |
|
81 | :maxdepth: 1 | |
82 | :hidden: |
|
82 | :hidden: | |
83 | :caption: Installation |
|
83 | :caption: Installation | |
84 |
|
84 | |||
85 | install/installation.rst |
|
85 | install/installation.rst | |
86 | install/upgrade.rst |
|
86 | install/upgrade.rst | |
87 |
|
87 | |||
88 |
|
88 | |||
89 | .. toctree:: |
|
89 | .. toctree:: | |
90 | :maxdepth: 1 |
|
90 | :maxdepth: 1 | |
91 | :hidden: |
|
91 | :hidden: | |
92 | :caption: Configuration |
|
92 | :caption: Configuration | |
93 |
|
93 | |||
94 | configuration/configuration-overview.rst |
|
94 | configuration/configuration-overview.rst | |
95 | configuration/scaling-rhodecode.rst |
|
95 | configuration/scaling-rhodecode.rst | |
96 | configuration/enable-ssl-on-traefik.rst |
|
96 | configuration/enable-ssl-on-traefik.rst | |
97 | configuration/data-volumes.rst |
|
97 | configuration/data-volumes.rst | |
98 | configuration/set-license-file.rst |
|
98 | configuration/set-license-file.rst | |
|
99 | configuration/set-specific-install-version.rst | |||
99 |
|
100 | |||
100 |
|
101 | |||
101 | .. toctree:: |
|
102 | .. toctree:: | |
102 | :maxdepth: 1 |
|
103 | :maxdepth: 1 | |
103 | :hidden: |
|
104 | :hidden: | |
104 | :caption: Migration |
|
105 | :caption: Migration | |
105 |
|
106 | |||
106 | migration/migration-to-docker.rst |
|
107 | migration/migration-to-docker.rst | |
107 |
|
108 | |||
108 |
|
109 | |||
109 | .. toctree:: |
|
110 | .. toctree:: | |
110 | :maxdepth: 1 |
|
111 | :maxdepth: 1 | |
111 | :hidden: |
|
112 | :hidden: | |
112 | :caption: Builds & Images |
|
113 | :caption: Builds & Images | |
113 |
|
114 | |||
114 | builds/build-new-image.rst |
|
115 | builds/build-new-image.rst | |
115 | builds/building-images.rst |
|
116 | builds/building-images.rst | |
116 |
|
117 | |||
117 | .. toctree:: |
|
118 | .. toctree:: | |
118 | :maxdepth: 1 |
|
119 | :maxdepth: 1 | |
119 | :hidden: |
|
120 | :hidden: | |
120 | :caption: Changelog |
|
121 | :caption: Changelog | |
121 |
|
122 | |||
122 | changes.rst No newline at end of file |
|
123 | changes.rst |
@@ -1,100 +1,110 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 | TODO: SEE COMPONENT CONFIGURATION |
|
20 | TODO: SEE COMPONENT CONFIGURATION | |
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. Copy over your old configuration into new shared config dir |
|
31 | 2. Copy over your old configuration into new shared config dir | |
32 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
32 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
33 |
|
33 | |||
34 | .. code-block:: |
|
34 | .. code-block:: | |
35 |
|
35 | |||
36 | cp rhodecode.ini to config/_shared/rhodecode_old.ini |
|
36 | cp rhodecode.ini to config/_shared/rhodecode_old.ini | |
37 | cp vcsserver.ini to config/_shared/vcsserver_old.ini |
|
37 | cp vcsserver.ini to config/_shared/vcsserver_old.ini | |
38 |
|
38 | |||
39 | Then compare the new files e.g :file:`rhodecode.ini` with :file:`rhodecode_old.ini` and adjust accordingly, |
|
39 | Then compare the new files e.g :file:`rhodecode.ini` with :file:`rhodecode_old.ini` and adjust accordingly, | |
40 | most important are location of storages/redis/db connection urls. |
|
40 | most important are location of storages/redis/db connection urls. | |
41 |
|
41 | |||
42 |
|
42 | |||
43 | 3. launch stack based on get started |
|
43 | 3. launch stack based on get started | |
44 | ++++++++++++++++++++++++++++++++++++ |
|
44 | ++++++++++++++++++++++++++++++++++++ | |
45 |
|
45 | |||
46 | Run an init command & launch the full stack |
|
46 | Run an init command & launch the full stack | |
47 |
|
47 | |||
48 | .. code-block:: |
|
48 | .. code-block:: | |
49 |
|
49 | |||
50 | ./rcstack init |
|
50 | ./rcstack init | |
51 | ./rcstack stack all up -d |
|
51 | ./rcstack stack all up -d | |
52 |
|
52 | |||
53 |
|
53 | |||
54 | 4. make a db dump |
|
54 | 4. make a db dump | |
55 | +++++++++++++++++ |
|
55 | +++++++++++++++++ | |
56 |
|
56 | |||
57 | If docker-based DB is selected, otherwise this step can be skipped. |
|
57 | If docker-based DB is selected, otherwise this step can be skipped. | |
58 |
|
58 | |||
59 | create a backup of your existing database, so it can be migrated to docker instance. |
|
59 | create a backup of your existing database, so it can be migrated to docker instance. | |
60 | If you plan to use you old running DB, this step can be omitted. |
|
60 | If you plan to use you old running DB, this step can be omitted. | |
61 | Adjust rhodecode.ini to point your docker rhodecode to old DB |
|
61 | Adjust rhodecode.ini to point your docker rhodecode to old DB | |
62 |
|
62 | |||
63 |
|
63 | |||
64 | 5. restore db |
|
64 | 5. restore db | |
65 | +++++++++++++ |
|
65 | +++++++++++++ | |
66 |
|
66 | |||
67 | If docker-based DB is selected |
|
67 | If docker-based DB is selected | |
68 | Restore the database into docker container running DB |
|
68 | Restore the database into docker container running DB | |
69 |
|
69 | |||
|
70 | ||||
|
71 | 6. move data into docker storage | |||
|
72 | ++++++++++++++++++++++++++++++++ | |||
|
73 | ||||
|
74 | Step one is to move the required componenst to the :file:`.custom/storage` directory inside the docker | |||
|
75 | compose stack. This directory is mounted later on so data can be copied over into docker storage engine volumes. | |||
|
76 | ||||
|
77 | ||||
70 | .. code-block:: |
|
78 | .. code-block:: | |
71 |
|
79 | |||
72 | #. mv repositories data to .custom/storage |
|
80 | #. mv repositories data to .custom/storage | |
73 | +++++ |
|
81 | +++++ | |
74 |
|
82 | |||
75 | #. mv gists data to .custom/storage |
|
83 | #. mv gists data to .custom/storage | |
76 | +++++ |
|
84 | +++++ | |
77 |
|
85 | |||
78 | #. mv artifacts data to .custom/storage |
|
86 | #. mv artifacts data to .custom/storage | |
79 | +++++ |
|
87 | +++++ | |
80 |
|
88 | |||
|
89 | ||||
|
90 | Once that is done. | |||
|
91 | ||||
|
92 | .. code-block:: | |||
|
93 | ||||
|
94 | ||||
81 | #. mv tarball cache data to .custom/storage |
|
95 | #. mv tarball cache data to .custom/storage | |
82 | +++++ |
|
96 | +++++ | |
83 |
|
97 | |||
84 | #. ./rcstack cli storage |
|
98 | #. ./rcstack cli storage | |
85 | +++++ |
|
99 | +++++ | |
86 |
|
100 | |||
87 | #. move repos to /vol/repovolume |
|
101 | #. move repos to /vol/repovolume | |
88 | +++++ |
|
102 | +++++ | |
89 |
|
103 | |||
90 | #. move artifacts data to /vol/datavolume |
|
104 | #. move artifacts data to /vol/datavolume | |
91 | +++++ |
|
105 | +++++ | |
92 |
|
106 | |||
93 | #. move tarballcache data to /vol/datavolume |
|
107 | #. move tarballcache data to /vol/datavolume | |
94 | +++++ |
|
108 | +++++ | |
95 |
|
109 | |||
96 | #. cp rhodecode.ini to config/_shared/rhodecode.ini |
|
|||
97 | +++++ |
|
|||
98 |
|
110 | |||
99 | #. cp vcsserver.ini to config/_shared/vcsserver.ini |
|
|||
100 | +++++ |
|
General Comments 0
You need to be logged in to leave comments.
Login now