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 |
@@ -173,6 +173,7 b' There are two requirements for OS to be able to run whole rcstack.' | |||||
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:: |
General Comments 0
You need to be logged in to leave comments.
Login now