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