Show More
@@ -1,141 +1,143 b'' | |||
|
1 | 1 | |
|
2 | 2 | =================== |
|
3 | 3 | Development setup |
|
4 | 4 | =================== |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | RhodeCode Enterprise runs inside a Nix managed environment. This ensures build |
|
8 | 8 | environment dependencies are correctly declared and installed during setup. |
|
9 | 9 | It also enables atomic upgrades, rollbacks, and multiple instances of RhodeCode |
|
10 | Enterprise for efficient cluster management. | |
|
10 | Enterprise running with isolation. | |
|
11 | 11 | |
|
12 | 12 | To set up RhodeCode Enterprise inside the Nix environment, use the following steps: |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 | Setup Nix Package Manager |
|
17 | 17 | ------------------------- |
|
18 | 18 | |
|
19 | 19 | To install the Nix Package Manager, please run:: |
|
20 | 20 | |
|
21 | 21 | $ curl https://nixos.org/nix/install | sh |
|
22 | 22 | |
|
23 | 23 | or go to https://nixos.org/nix/ and follow the installation instructions. |
|
24 | 24 | Once this is correctly set up on your system, you should be able to use the |
|
25 | 25 | following commands: |
|
26 | 26 | |
|
27 | 27 | * `nix-env` |
|
28 | 28 | |
|
29 | 29 | * `nix-shell` |
|
30 | 30 | |
|
31 | 31 | |
|
32 | 32 | .. tip:: |
|
33 | 33 | |
|
34 | 34 | Update your channels frequently by running ``nix-channel --upgrade``. |
|
35 | 35 | |
|
36 | 36 | |
|
37 | 37 | Switch nix to the latest STABLE channel |
|
38 | 38 | --------------------------------------- |
|
39 | 39 | |
|
40 | 40 | run:: |
|
41 | 41 | |
|
42 | 42 | nix-channel --add https://nixos.org/channels/nixos-16.03 nixpkgs |
|
43 | 43 | |
|
44 | 44 | Followed by:: |
|
45 | 45 | |
|
46 | 46 | nix-channel --update |
|
47 | 47 | |
|
48 | 48 | |
|
49 | 49 | Clone the required repositories |
|
50 | 50 | ------------------------------- |
|
51 | 51 | |
|
52 | 52 | After Nix is set up, clone the RhodeCode Enterprise Community Edition and |
|
53 | 53 | RhodeCode VCSServer repositories into the same directory. |
|
54 | 54 | To do this, use the following example:: |
|
55 | 55 | |
|
56 | 56 | mkdir rhodecode-develop && cd rhodecode-develop |
|
57 | 57 | hg clone https://code.rhodecode.com/rhodecode-enterprise-ce |
|
58 | 58 | hg clone https://code.rhodecode.com/rhodecode-vcsserver |
|
59 | 59 | |
|
60 | 60 | .. note:: |
|
61 | 61 | |
|
62 |
If you cannot clone the repository, please request read permissions |
|
|
62 | If you cannot clone the repository, please request read permissions | |
|
63 | via support@rhodecode.com | |
|
63 | 64 | |
|
64 | 65 | |
|
65 | 66 | |
|
66 | 67 | Enter the Development Shell |
|
67 | 68 | --------------------------- |
|
68 | 69 | |
|
69 | 70 | The final step is to start the development shell. To do this, run the |
|
70 | 71 | following command from inside the cloned repository:: |
|
71 | 72 | |
|
72 | 73 | cd ~/rhodecode-enterprise-ce |
|
73 | 74 | nix-shell |
|
74 | 75 | |
|
75 | 76 | .. note:: |
|
76 | 77 | |
|
77 | 78 | On the first run, this will take a while to download and optionally compile |
|
78 | a few things. The following runs will be faster. | |
|
79 | a few things. The following runs will be faster. The development shell works | |
|
80 | fine on MacOS and Linux platforms. | |
|
79 | 81 | |
|
80 | 82 | |
|
81 | 83 | |
|
82 | 84 | Creating a Development Configuration |
|
83 | 85 | ------------------------------------ |
|
84 | 86 | |
|
85 | 87 | To create a development environment for RhodeCode Enterprise, |
|
86 | 88 | use the following steps: |
|
87 | 89 | |
|
88 | 90 | 1. Create a copy of `~/rhodecode-enterprise-ce/configs/development.ini` |
|
89 | 91 | 2. Adjust the configuration settings to your needs |
|
90 | 92 | |
|
91 | 93 | .. note:: |
|
92 | 94 | |
|
93 | 95 | It is recommended to use the name `dev.ini`. |
|
94 | 96 | |
|
95 | 97 | |
|
96 | 98 | Setup the Development Database |
|
97 | 99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
98 | 100 | |
|
99 | 101 | To create a development database, use the following example. This is a one |
|
100 | 102 | time operation:: |
|
101 | 103 | |
|
102 | 104 | paster setup-rhodecode dev.ini \ |
|
103 | 105 | --user=admin --password=secret \ |
|
104 | 106 | --email=admin@example.com \ |
|
105 | 107 | --repos=~/my_dev_repos |
|
106 | 108 | |
|
107 | 109 | |
|
108 | 110 | Start the Development Server |
|
109 | 111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
110 | 112 | |
|
111 | 113 | When starting the development server, you should start the vcsserver as a |
|
112 | 114 | separate process. To do this, use one of the following examples: |
|
113 | 115 | |
|
114 | 116 | 1. Set the `start.vcs_server` flag in the ``dev.ini`` file to true. For example: |
|
115 | 117 | |
|
116 | 118 | .. code-block:: python |
|
117 | 119 | |
|
118 | 120 | ### VCS CONFIG ### |
|
119 | 121 | ################## |
|
120 | 122 | vcs.start_server = true |
|
121 | 123 | vcs.server = localhost:9900 |
|
122 | 124 | vcs.server.log_level = debug |
|
123 | 125 | |
|
124 | 126 | Then start the server using the following command: ``rcserver dev.ini`` |
|
125 | 127 | |
|
126 | 128 | 2. Start the development server using the following example:: |
|
127 | 129 | |
|
128 | 130 | rcserver --with-vcsserver dev.ini |
|
129 | 131 | |
|
130 | 132 | 3. Start the development server in a different terminal using the following |
|
131 | 133 | example:: |
|
132 | 134 | |
|
133 | 135 | vcsserver |
|
134 | 136 | |
|
135 | 137 | |
|
136 | 138 | Run the Environment Tests |
|
137 | 139 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
138 | 140 | |
|
139 | 141 | Please make sure that the tests are passing to verify that your environment is |
|
140 | set up correctly. More details about the tests are described in: | |
|
141 | :file:`/docs/dev/testing`. | |
|
142 | set up correctly. RhodeCode uses py.test to run tests. | |
|
143 | Please simply run ``make test`` to run the basic test suite. |
General Comments 0
You need to be logged in to leave comments.
Login now