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