##// END OF EJS Templates
docs(dev-build): added step-by-step instructions for dev env setup and setup_dev.sh for easier installation
ilin.s -
Show More
@@ -0,0 +1,113 b''
1 .. _step-by-step-example:
2
3 RhodeCode Development Infrastructure Setup Example
4 ==================================================
5
6 1. **Configure PATH:** Set the environment variable for the workspace path.
7
8 .. code-block:: bash
9
10 export $WORKSPACE_HOME=/path/to/store
11
12 2. **Run Setup Script:** Execute the `setup_dev.sh` script to install dependencies. Ensure it's executable.
13
14 .. code-block:: bash
15
16 # Fetch script
17 curl -L -s -o setup_dev.sh https://code.rhodecode.com/rhodecode-enterprise-docker/raw/master/scripts/dev-tools/setup_dev.sh && chmod +x setup_dev.sh
18 # Run script
19 ./setup_dev.sh
20
21 3. **RhodeCode Enterprise-CE Setup:**
22
23 - Run the interactive console:
24
25 .. code-block:: bash
26
27 ./dev-tools ce
28
29 - Initialize the database:
30
31 .. code-block:: bash
32
33 /usr/local/bin/rhodecode_bin/bin/rc-setup-app \
34 /home/rhodecode/rhodecode-enterprise-ce/.dev/dev.ini \
35 --force-yes \
36 --skip-existing-db \
37 --user=admin \
38 --password=secret \
39 --email=admin@example.com \
40 --repos=/var/opt/rhodecode_repo_store
41
42 - Manually upgrade the database:
43
44 .. code-block:: bash
45
46 /usr/local/bin/rhodecode_bin/bin/rc-upgrade-db \
47 /home/rhodecode/rhodecode-enterprise-ce/.dev/dev.ini \
48 --force-yes
49
50 - Exit the console:
51
52 .. code-block:: bash
53
54 exit
55
56 4. **Configure Waitress Server:**
57
58 Add the following configuration below GUNICORN APPLICATION SERVER in `vscserver.ini` and `rhodecode.ini` in `docker-rhodecode/config/_shared`:
59
60 .. code-block:: ini
61
62 use = egg:waitress#main
63 ## Number of worker threads
64 threads = 3
65 ## MAX BODY SIZE 100GB
66 max_request_body_size = 107374182400
67 asyncore_use_poll = true
68
69 5. **Apply Changes:**
70
71 .. code-block:: bash
72
73 cd $WORKSPACE_HOME/rhodecode-vcsserver && cp ../docker-rhodecode/config/_shared/vcsserver.ini .dev/dev.ini
74 cd $WORKSPACE_HOME/rhodecode-enterprise-ce && cp ../docker-rhodecode/config/_shared/rhodecode.ini .dev/dev.ini
75
76 6. **Remove Database Vars:**
77
78 In `docker-rhodecode/.custom`, remove the following variables from `.dev.env`: `RC_DB_URL` and `RC_SQLALCHEMY_DB1_URL`.
79
80 7. **Update Makefile:**
81
82 Add the following line after `dev-env:` (line 125) in `rhodecode-enterprise-ce/Makefile`:
83
84 .. code-block:: bash
85
86 sudo -u root chown rhodecode:rhodecode /home/rhodecode/.cache/pip/
87
88 8. **Adjust Permissions:**
89
90 .. code-block:: bash
91
92 chown -R 999:999 $WORKSPACE_HOME/
93
94 9. **Run RhodeCode Services:**
95
96 Open two terminal windows, navigate to `$WORKSPACE_HOME/docker-rhodecode` in both terminals.
97
98 - In the first terminal, run:
99
100 .. code-block:: bash
101
102 ./dev-tools ce
103
104 - In the second terminal, run:
105
106 .. code-block:: bash
107
108 ./dev-tools vcs
109
110 **COMMANDS:**
111
112 - Run server: `make dev-srv`
113 - Run tests: `pytest -v`
@@ -0,0 +1,52 b''
1 #!/bin/bash
2
3 # Navigate into directory that you already defined
4 cd $WORKSPACE_HOME
5
6 mkdir docker-rhodecode && cd docker-rhodecode
7
8 # To quickly get and install rcstack run this command
9 curl -L -s -o rcstack https://dls.rhodecode.com/get-rcstack && chmod +x rcstack
10 ./rcstack init
11
12 # Init command will setup docker, and dev-tools. Please check available options using
13 curl -L -s -o dev-tools https://code.rhodecode.com/rhodecode-enterprise-docker/raw/master/scripts/dev-tools/dev-tools && chmod +x dev-tools
14 ./dev-tools --help
15
16 # Navigate back to the parent directory
17 cd ..
18
19 # Clone repositories
20 hg clone https://code.rhodecode.com/internal/rhodecode-vcsserver
21 hg clone https://code.rhodecode.com/internal/rhodecode-enterprise-ce
22 hg clone https://code.rhodecode.com/internal/rhodecode-enterprise-ee
23
24 cd $WORKSPACE_HOME/docker-rhodecode
25
26 # First start with setting up a dev builds for dev images
27 ./rcstack cli set-runtime-image beta
28
29 cd $WORKSPACE_HOME/docker-rhodecode
30
31 # To start developing we need few services to run, we can run this using `dev-env`
32 ./dev-tools dev-env
33
34 cd $WORKSPACE_HOME/docker-rhodecode
35
36 # You can check the status of services by running
37 ./rcstack status
38
39 # Copy the runtime.env as our dev.env:
40 cp .custom/.runtime.env .custom/.dev.env
41
42 cd $WORKSPACE_HOME/rhodecode-vcsserver
43 mkdir -p .dev/
44 echo "make sh" > .dev/dev-env.sh && chmod +x .dev/dev-env.sh
45
46 cd $WORKSPACE_HOME/rhodecode-enterprise-ce
47 mkdir -p .dev/
48 echo "make sh" > .dev/dev-env.sh && chmod +x .dev/dev-env.sh
49
50 cd $WORKSPACE_HOME/rhodecode-vcsserver && cp ../docker-rhodecode/config/_shared/vcsserver.ini .dev/dev.ini
51
52 cd $WORKSPACE_HOME/rhodecode-enterprise-ce && cp ../docker-rhodecode/config/_shared/rhodecode.ini .dev/dev.ini
@@ -1,183 +1,184 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
151
152 .. toctree::
152 .. toctree::
153 :maxdepth: 1
153 :maxdepth: 1
154 :hidden:
154 :hidden:
155 :caption: Usage
155 :caption: Usage
156
156
157 usage/monitoring-unhealthy-containers.rst
157 usage/monitoring-unhealthy-containers.rst
158
158
159
159
160 .. toctree::
160 .. toctree::
161 :maxdepth: 1
161 :maxdepth: 1
162 :hidden:
162 :hidden:
163 :caption: Migration
163 :caption: Migration
164
164
165 migration/migration-to-docker.rst
165 migration/migration-to-docker.rst
166
166
167
167
168 .. toctree::
168 .. toctree::
169 :maxdepth: 1
169 :maxdepth: 1
170 :hidden:
170 :hidden:
171 :caption: Builds & Images
171 :caption: Builds & Images
172
172
173 builds/build-new-image.rst
173 builds/build-new-image.rst
174 builds/building-images.rst
174 builds/building-images.rst
175 dev/dev-setup.rst
175 dev/dev-setup.rst
176 dev/step-by-step-example.rst
176
177
177
178
178 .. toctree::
179 .. toctree::
179 :maxdepth: 1
180 :maxdepth: 1
180 :hidden:
181 :hidden:
181 :caption: Changelog
182 :caption: Changelog
182
183
183 changes.rst No newline at end of file
184 changes.rst
General Comments 0
You need to be logged in to leave comments. Login now