Show More
@@ -36,11 +36,13 b' Metrics' | |||||
36 | - Node-exporter - machine stats and usage |
|
36 | - Node-exporter - machine stats and usage | |
37 | - Promtail - log scraping |
|
37 | - Promtail - log scraping | |
38 |
|
38 | |||
39 | ## Download the rccontrol for Linux |
|
39 | ##rccontrol for Linux, new docker based installer | |
40 |
|
40 | |||
41 | ```shell |
|
41 | To get started with RhodeCode get the new shell installer called rccontrol | |
42 | curl -o rccontrol https://code.rhodecode.com/rhodecode-enterprise-docker/raw/master/scripts/rccontrol/rccontrol && chmod +x rccontrol |
|
42 | ||
43 | ``` |
|
43 | ```shell | |
|
44 | curl -o rccontrol https://code.rhodecode.com/rhodecode-enterprise-docker/raw/master/scripts/rccontrol/rccontrol && chmod +x rccontrol | |||
|
45 | ``` | |||
44 |
|
46 | |||
45 | ## Pre requisites |
|
47 | ## Pre requisites | |
46 |
|
48 | |||
@@ -51,28 +53,8 b' visit docker site and install docker (min version 20.10) and docker compose:' | |||||
51 | - https://docs.docker.com/engine/install/ |
|
53 | - https://docs.docker.com/engine/install/ | |
52 | - https://docs.docker.com/compose/install/ |
|
54 | - https://docs.docker.com/compose/install/ | |
53 |
|
55 | |||
54 | The instructions below outline installation of the current stable release (v1.29.2) of Compose. |
|
56 | rccontrol installer can install docker on linux machine, but if manual installation is required it's also possible. | |
55 |
|
57 | |||
56 | ## Data structure |
|
|||
57 |
|
||||
58 | There are 4 volumes defined: |
|
|||
59 |
|
||||
60 |
|
||||
61 | - `/etc/rhodecode/conf` |
|
|||
62 |
|
||||
63 | Shared volume used for configuration files for rhodecode, vcsserver and supervisord, and some cache data |
|
|||
64 |
|
||||
65 | - `/var/opt/rhodecode_repo_store` |
|
|||
66 |
|
||||
67 | Used for main repository storage where repositories would be stored |
|
|||
68 |
|
||||
69 | - `/var/opt/rhodecode_data` |
|
|||
70 |
|
||||
71 | Data dir for rhodecode cache/lock files, or user sessions (for file backend) |
|
|||
72 |
|
||||
73 | - `/var/log/rhodecode` |
|
|||
74 |
|
||||
75 | Used to store all logs from RhodeCode |
|
|||
76 |
|
58 | |||
77 |
|
59 | |||
78 | ## Setup/Build options |
|
60 | ## Setup/Build options | |
@@ -83,8 +65,7 b' There are 3 options to run the docker stack.' | |||||
83 | - [Standalone cluster build from source](#standalone-cluster-build-from-source) |
|
65 | - [Standalone cluster build from source](#standalone-cluster-build-from-source) | |
84 | - [dev environment setup](#dev-env-build) |
|
66 | - [dev environment setup](#dev-env-build) | |
85 |
|
67 | |||
86 |
|
68 | # Quick install tutorial | ||
87 | # quick install tutorial |
|
|||
88 |
|
69 | |||
89 | Those are step-by-step installation/run steps. |
|
70 | Those are step-by-step installation/run steps. | |
90 |
|
71 | |||
@@ -113,7 +94,7 b' Those are step-by-step installation/run steps.' | |||||
113 |
|
94 | |||
114 | Check stack status |
|
95 | Check stack status | |
115 |
|
96 | |||
116 | ./rccontrol status |
|
97 | ./rccontrol status --simple | |
117 |
|
98 | |||
118 | Output should look similar like this: |
|
99 | Output should look similar like this: | |
119 |
|
100 | |||
@@ -132,7 +113,6 b' Those are step-by-step installation/run steps.' | |||||
132 | fb77fb6496c6 channelstream/channelstream:0.7.1 Up About a minute (healthy) rc_cluster_services-channelstream-1 8000/tcp |
|
113 | fb77fb6496c6 channelstream/channelstream:0.7.1 Up About a minute (healthy) rc_cluster_services-channelstream-1 8000/tcp | |
133 | cb6c5c022f5b postgres:14.6 Up About a minute (healthy) rc_cluster_services-database-1 5432/tcp |
|
114 | cb6c5c022f5b postgres:14.6 Up About a minute (healthy) rc_cluster_services-database-1 5432/tcp | |
134 |
|
115 | |||
135 |
|
||||
136 | # Standalone cluster build from installer |
|
116 | # Standalone cluster build from installer | |
137 |
|
117 | |||
138 | If you;d like to build your own custom image here's a quick how to.: |
|
118 | If you;d like to build your own custom image here's a quick how to.: | |
@@ -172,7 +152,91 b' Follow these steps to build and run the RhodeCode Cluster via Docker-compose.' | |||||
172 |
|
152 | |||
173 | ./rccontrol build |
|
153 | ./rccontrol build | |
174 |
|
154 | |||
|
155 | # Standalone cluster build from source code | |||
|
156 | ||||
|
157 | There's an option to build the latest release from the source code as a docker installation. | |||
|
158 | If you;d like to build your own custom image based on the source code here's a quick how to.: | |||
|
159 | Follow these steps to build and run the RhodeCode Cluster via Docker-compose. | |||
|
160 | ||||
|
161 | 1) Run init to setup needed docker env and files: | |||
|
162 | ||||
|
163 | ./rccontrol init | |||
|
164 | ||||
|
165 | 2) Run artifacts fetch like installer and certain needed build binaries: | |||
|
166 | ||||
|
167 | Start by fetching required installer binaries. | |||
|
168 | Only local-archive is required to be present, installer is disregarded for source build | |||
|
169 | ||||
|
170 | ```shell | |||
|
171 | ./rccontrol get-build-artifacts | |||
|
172 | ``` | |||
|
173 | ||||
|
174 | This will download required installer files and put them into the `.cache` directory. | |||
|
175 | This directory should look similar to that after downloads have finish: | |||
|
176 | ||||
|
177 | ```shell | |||
|
178 | drwxr-xr-x 8 rcdev rcdev 256B Feb 8 13:35 . | |||
|
179 | drwxr-xr-x 14 rcdev rcdev 448B Feb 8 10:40 .. | |||
|
180 | -rw-r--r-- 1 rcdev rcdev 0B Feb 8 20:44 .dirkeep | |||
|
181 | -rwxr-xr-x 1 rcdev rcdev 241M Feb 8 13:35 RhodeCode-installer-linux-build20210208_0800 | |||
|
182 | -rw-r--r-- 1 rcdev rcdev 156M Feb 8 13:35 RhodeCodeCommunity-4.24.1+x86_64-linux_build20210208_0800.tar.bz2 | |||
|
183 | -rw-r--r-- 1 rcdev rcdev 171M Feb 8 13:35 RhodeCodeEnterprise-4.24.1+x86_64-linux_build20210208_0800.tar.bz2 | |||
|
184 | -rw-r--r-- 1 rcdev rcdev 145M Feb 8 13:35 RhodeCodeVCSServer-4.24.1+x86_64-linux_build20210208_0800.tar.bz2 | |||
|
185 | -rw-r--r-- 1 rcdev rcdev 109M Feb 8 13:35 locale-archive | |||
|
186 | ``` | |||
|
187 | ||||
|
188 | 3) get source code needed to create a build | |||
|
189 | ||||
|
190 | This step will create source code copies into the `.source/` path. So it will look like this: | |||
|
191 | ```shell | |||
|
192 | -rw-r--r-- 1 docker docker 0 Nov 25 12:27 .dirkeep | |||
|
193 | drwxr-xr-x 1 docker docker 1184 Nov 25 12:27 rhodecode-enterprise-ce | |||
|
194 | drwxr-xr-x 1 docker docker 1120 Nov 25 12:27 rhodecode-enterprise-ee | |||
|
195 | drwxr-xr-x 1 docker docker 800 Nov 25 12:27 rhodecode-vcsserver | |||
|
196 | ``` | |||
|
197 | ||||
|
198 | If you have the 3 required projects source code already, this step can be omitted, and the | |||
|
199 | sources can be copied to the `.source/` directory. note: symlinks don't work. | |||
|
200 | ||||
|
201 | - https://code.rhodecode.com/rhodecode-vcsserver | |||
|
202 | - https://code.rhodecode.com/rhodecode-enterprise-ce | |||
|
203 | - https://code.rhodecode.com/rhodecode-enterprise-ee (assuming access is granted to this) | |||
|
204 | ||||
|
205 | Run this to fetch the sources | |||
|
206 | ||||
|
207 | ```shell | |||
|
208 | ./rccontrol get-build-source --revision=default --auth-token=xxxx --server-url=https://code.rhodecode.com/sources | |||
|
209 | ``` | |||
|
210 | ||||
|
211 | ||||
|
212 | 4) Create the build | |||
|
213 | ||||
|
214 | ```shell | |||
|
215 | ./rccontrol build-source --version-name 4.28.0.REL.2022.12.12 | |||
|
216 | ``` | |||
|
217 | ||||
|
218 | # Operation | |||
|
219 | ||||
|
220 | ## Data structure | |||
|
221 | ||||
|
222 | There are 4 volumes defined: | |||
|
223 | ||||
|
224 | ||||
|
225 | - `/etc/rhodecode/conf` | |||
|
226 | ||||
|
227 | Shared volume used for configuration files for rhodecode, vcsserver and supervisord, and some cache data | |||
|
228 | ||||
|
229 | - `/var/opt/rhodecode_repo_store` | |||
175 |
|
230 | |||
|
231 | Used for main repository storage where repositories would be stored | |||
|
232 | ||||
|
233 | - `/var/opt/rhodecode_data` | |||
|
234 | ||||
|
235 | Data dir for rhodecode cache/lock files, or user sessions (for file backend) | |||
|
236 | ||||
|
237 | - `/var/log/rhodecode` | |||
|
238 | ||||
|
239 | Used to store all logs from RhodeCode | |||
176 |
|
240 | |||
177 | ## Set License for EE version |
|
241 | ## Set License for EE version | |
178 |
|
242 | |||
@@ -197,10 +261,11 b' _Disk space problems?_' | |||||
197 |
|
261 | |||
198 | ```shell |
|
262 | ```shell | |
199 | docker system df |
|
263 | docker system df | |
200 | docker builder prune |
|
264 | docker builder prune -f | |
201 | # optionally |
|
265 | # optionally | |
202 | docker image prune -a |
|
266 | docker image prune -a | |
203 | ``` |
|
267 | ``` | |
|
268 | ||||
204 | ### Creating & building images |
|
269 | ### Creating & building images | |
205 |
|
270 | |||
206 | 1) start with running the required database for the build stage in the background. |
|
271 | 1) start with running the required database for the build stage in the background. | |
@@ -244,38 +309,9 b' Logging is pushed to stdout from all services.' | |||||
244 |
|
309 | |||
245 | ### Upgrade procedure: |
|
310 | ### Upgrade procedure: | |
246 |
|
311 | |||
247 | - pull the latest rhodecode-docker repo |
|
312 | - run ./rccontrol self-update | |
248 | - check .env file for correct update version |
|
313 | - run ./rccontrol stack-upgrade to get upgrade instructions | |
249 | - re-build rhodecode |
|
|||
250 | - docker-compose build rhodecode |
|
|||
251 | - docker-compose build |
|
|||
252 | - docker-compose stop |
|
|||
253 | - docker-compose up |
|
|||
254 |
|
||||
255 | # Standalone cluster build from source |
|
|||
256 |
|
||||
257 | There's an option to build the latest release from the source code as a docker installation. |
|
|||
258 |
|
||||
259 | If you have the 3 required projects source code already, the next step can be omitted, and the |
|
|||
260 | sources can be copied to the `.source/` directory. note: symlinks don't work. |
|
|||
261 |
|
||||
262 | - https://code.rhodecode.com/rhodecode-vcsserver |
|
|||
263 | - https://code.rhodecode.com/rhodecode-enterprise-ce |
|
|||
264 | - https://code.rhodecode.com/rhodecode-enterprise-ee (assuming access is granted to this) |
|
|||
265 |
|
314 | |||
266 | Download the source using bootstrap script: |
|
|||
267 |
|
||||
268 | ```shell |
|
|||
269 | cd .boostrap/ && ./download-source.sh && cd ../ |
|
|||
270 | ``` |
|
|||
271 |
|
||||
272 | This step will create source code copies into the `.source/` path. e.g |
|
|||
273 | ``` |
|
|||
274 | -rw-r--r-- 1 docker docker 0 Nov 25 12:27 .dirkeep |
|
|||
275 | drwxr-xr-x 1 docker docker 1184 Nov 25 12:27 rhodecode-enterprise-ce |
|
|||
276 | drwxr-xr-x 1 docker docker 1120 Nov 25 12:27 rhodecode-enterprise-ee |
|
|||
277 | drwxr-xr-x 1 docker docker 800 Nov 25 12:27 rhodecode-vcsserver |
|
|||
278 | ``` |
|
|||
279 |
|
315 | |||
280 | With this done, you can now proceed with every step of normal source installation (Creating & building images), but instead of using |
|
316 | With this done, you can now proceed with every step of normal source installation (Creating & building images), but instead of using | |
281 | just `docker-compose` command it needs to be replaced with `docker-compose -f docker-compose.yaml -f docker-compose.source.yaml` |
|
317 | just `docker-compose` command it needs to be replaced with `docker-compose -f docker-compose.yaml -f docker-compose.source.yaml` | |
@@ -283,12 +319,12 b' just `docker-compose` command it needs to be replaced with `docker-compose -f do' | |||||
283 | For example to override the installer build with the source `rhodecode` based image, and also setting proper version, run: |
|
319 | For example to override the installer build with the source `rhodecode` based image, and also setting proper version, run: | |
284 |
|
320 | |||
285 | ```shell |
|
321 | ```shell | |
286 |
RC_VERSION="4.2 |
|
322 | 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 | |
287 | ``` |
|
323 | ``` | |
288 |
|
324 | |||
289 | NOTE THAT it's recommended to keep rc_version and source_Ver the same |
|
325 | NOTE THAT it's recommended to keep rc_version and source_Ver the same | |
290 |
|
326 | |||
291 | ## Simple build |
|
327 | ## Simple community build | |
292 |
|
328 | |||
293 | Build docker RhodeCode `Community` without any dependencies (redis, external db) using |
|
329 | Build docker RhodeCode `Community` without any dependencies (redis, external db) using | |
294 | simple sqlite database and file based caches. |
|
330 | simple sqlite database and file based caches. |
@@ -928,11 +928,11 b' rccontrol_backup_data_usage() {' | |||||
928 | # :command.usage |
|
928 | # :command.usage | |
929 | rccontrol__completions_usage() { |
|
929 | rccontrol__completions_usage() { | |
930 | if [[ -n $long_usage ]]; then |
|
930 | if [[ -n $long_usage ]]; then | |
931 |
printf "rccontrol _completions - Generate completions |
|
931 | printf "rccontrol _completions - Generate completions\n" | |
932 | echo |
|
932 | echo | |
933 |
|
933 | |||
934 | else |
|
934 | else | |
935 |
printf "rccontrol _completions - Generate completions |
|
935 | printf "rccontrol _completions - Generate completions\n" | |
936 | echo |
|
936 | echo | |
937 |
|
937 | |||
938 | fi |
|
938 | fi | |
@@ -1769,11 +1769,15 b' rccontrol_get_build_source_command() {' | |||||
1769 | RHODECODE_EE_HASH=$revision |
|
1769 | RHODECODE_EE_HASH=$revision | |
1770 |
|
1770 | |||
1771 | # download sources |
|
1771 | # download sources | |
1772 | echo "** download rhodecode source for build from $SERVER_URL **" |
|
1772 | echo "** download rhodecode source for build from $SERVER_URL using '$revision' hash**" | |
1773 |
|
1773 | |||
|
1774 | echo "getting $SERVER_URL/rhodecode-vcsserver/archive/$RHODECODE_VCS_HASH.tgz" | |||
1774 | curl --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-vcsserver/archive/$RHODECODE_VCS_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR |
|
1775 | curl --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-vcsserver/archive/$RHODECODE_VCS_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR | |
|
1776 | ||||
|
1777 | echo "getting $SERVER_URL/rhodecode-enterprise-ce/archive/$RHODECODE_CE_HASH.tgz" | |||
1775 | curl --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ce/archive/$RHODECODE_CE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR |
|
1778 | curl --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ce/archive/$RHODECODE_CE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR | |
1776 | #TODO: fix just CE build... |
|
1779 | ||
|
1780 | echo "getting $SERVER_URL/rhodecode-enterprise-ee/archive/$RHODECODE_EE_HASH.tgz" | |||
1777 | curl --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ee/archive/$RHODECODE_EE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR |
|
1781 | curl --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ee/archive/$RHODECODE_EE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR | |
1778 |
|
1782 | |||
1779 | rm -rf $SOURCE_DIR/rhodecode-vcsserver && \ |
|
1783 | rm -rf $SOURCE_DIR/rhodecode-vcsserver && \ | |
@@ -1788,6 +1792,8 b' rccontrol_get_build_source_command() {' | |||||
1788 | echo "downloading sources done to $SOURCE_DIR" |
|
1792 | echo "downloading sources done to $SOURCE_DIR" | |
1789 | ls -l $SOURCE_DIR |
|
1793 | ls -l $SOURCE_DIR | |
1790 |
|
1794 | |||
|
1795 | echo "to create source based build run ./rccontrol build-source --version-name 4.28.0.REL.2022.12.10" | |||
|
1796 | ||||
1791 | } |
|
1797 | } | |
1792 |
|
1798 | |||
1793 | # :command.function |
|
1799 | # :command.function | |
@@ -3776,7 +3782,7 b' rccontrol__completions_parse_requirements() {' | |||||
3776 |
|
3782 | |||
3777 | # :command.initialize |
|
3783 | # :command.initialize | |
3778 | initialize() { |
|
3784 | initialize() { | |
3779 |
version="4.28.0.rel2022.12.12. |
|
3785 | version="4.28.0.rel2022.12.12.3" | |
3780 | long_usage='' |
|
3786 | long_usage='' | |
3781 | set -e |
|
3787 | set -e | |
3782 |
|
3788 |
General Comments 0
You need to be logged in to leave comments.
Login now