##// END OF EJS Templates
fix(docs): fixed cli usage docs
super-admin -
r5644:09e63857 default
parent child Browse files
Show More
@@ -12,6 +12,26 The commands available with |RCT| can be
12 - Local configuration commands used to help set up your |RCT| configuration.
12 - Local configuration commands used to help set up your |RCT| configuration.
13
13
14
14
15 .. _tools-rhodecode-list-instance:
16
17 rhodecode-list-instances
18 ------------------------
19
20 Use this command to list the instance details configured in the
21 :file:`/etc/rhodecode/conf/.rhoderc` file.
22
23 .. code-block:: bash
24
25 $ ./rcstack cli cmd rhodecode-list-instances --config=/etc/rhodecode/conf/.rhoderc
26 [instance:production] - Config only
27 API-HOST: https://some.url.com
28 API-KEY: some.auth.token
29
30 [instance:development] - Config only
31 API-HOST: http://some.ip.address
32 API-KEY: some.auth.token
33
34
15 rhodecode-tools
35 rhodecode-tools
16 ---------------
36 ---------------
17
37
@@ -163,6 +183,7 Example usage:
163 removing gist /home/brian/repos/.rc_gist_store/5
183 removing gist /home/brian/repos/.rc_gist_store/5
164 removing gist /home/brian/repos/.rc_gist_store/8FtCKdcbRKmEvRzTVsEt
184 removing gist /home/brian/repos/.rc_gist_store/8FtCKdcbRKmEvRzTVsEt
165
185
186
166 rhodecode-cleanup-repos
187 rhodecode-cleanup-repos
167 -----------------------
188 -----------------------
168
189
@@ -201,30 +222,37 Example usage:
201
222
202 .. code-block:: bash
223 .. code-block:: bash
203
224
204 # Cleaning up repos using tools installed with RCE 350 and above
225
205 $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-cleanup-repos \
226 # create a .rhoderc file in your host config directory (in :file:`config/_shared/.rhoderc`):
206 --instance-name=enterprise-4 --older-than=1d
227
207 Scanning for repositories in /home/brian/repos...
228 [instance:rcstack-instance]
208 preparing to remove [2] found repositories older than 1 day, 0:00:00 (1d)
229 api_host = http://rhodecode:10020
230 api_key = <API_KEY>
231 repo_dir = /var/opt/rhodecode_repo_store
232
233 # Run rcstack cli
234 ./rcstack cli cmd rhodecode-cleanup-repos --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc
235
236 checking if config files needs bootstrapping
237 Scanning for repositories in /var/opt/rhodecode_repo_store...
209
238
210 the following repositories will be deleted completely:
239 the following repositories will be deleted completely:
211 * REMOVED: 2015-08-05 00:23:18 | /home/brian/repos/rm__20150805_002318_831
240 * REMOVED: 2015-08-05 00:23:18 | /var/opt/rhodecode_repo_store/rm__20150805_002318_831
212 * REMOVED: 2015-08-04 01:22:10 | /home/brian/repos/rm__20150804_012210_336
241 * REMOVED: 2015-08-04 01:22:10 | /var/opt/rhodecode_repo_store/rm__20150804_012210_336
213 are you sure you want to remove them? [y/N]:
242 are you sure you want to remove them? [y/N]:
214
243
215 # Clean up repos older than 1 year
244 # Clean up repos older than 1 year
216 # If using virtualenv and pre RCE 350 tools installation
245 ./rcstack cli cmd rhodecode-cleanup-repos --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc --older-than=365d
217 (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \
218 --older-than=365d
219
246
220 Scanning for repositories in /home/brian/repos...
247 checking if config files needs bootstrapping
248 Scanning for repositories in /var/opt/rhodecode_repo_store...
221 preparing to remove [343] found repositories older than 365 days
249 preparing to remove [343] found repositories older than 365 days
222
250
223 # clean up repos older than 3 days
251 # clean up repos older than 3 days
224 # If using virtualenv and pre RCE 350 tools installation
252 ./rcstack cli cmd rhodecode-cleanup-repos --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc --older-than=3d
225 (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \
253
226 --older-than=3d
254 checking if config files needs bootstrapping
227 Scanning for repositories in /home/brian/repos...
255 Scanning for repositories in /var/opt/rhodecode_repo_store...
228 preparing to remove [3] found repositories older than 3 days
256 preparing to remove [3] found repositories older than 3 days
229
257
230 .. _tools-config:
258 .. _tools-config:
@@ -420,9 +448,8 Example usage:
420 }
448 }
421
449
422 # Cat a file and pipe to gist
450 # Cat a file and pipe to gist
423 # in RCE 3.5.0 tools and above
451
424 $ cat ~/.rhoderc | ~/.rccontrol/{instance-id}/profile/bin/rhodecode-gist \
452 $ cat ~/.rhoderc | ./rcstack cli cmd rhodecode-gist --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc -d '.rhoderc copy' create
425 --instance-name=enterprise-4 -d '.rhoderc copy' create
426 {
453 {
427 "error": null,
454 "error": null,
428 "id": 9253,
455 "id": 9253,
@@ -512,41 +539,18 Example usage:
512
539
513 .. code-block:: bash
540 .. code-block:: bash
514
541
515 # Run the indexer
542 # Create the indexing mapping file
516 $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \
543 $ ./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc --create-mapping search_mapping.ini
517 --instance-name=enterprise-4
518
544
519 # Run indexer based on search_mapping.ini file
545 # Run the indexer
520 # This is using pre-350 virtualenv
546 $ ./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc
521 (venv)$ rhodecode-index --instance-name=enterprise-1
547
548 # Run indexer based on search_mapping.ini file using rhodecode-tools virtualenv
549 (venv)$ rhodecode-index --instance-name=rcstack-instance
522
550
523 # Index from the command line without creating
551 # Index from the command line without creating
524 # the .rhoderc file
552 # the .rhoderc file
525 $ rhodecode-index --apikey=key --apihost=http://rhodecode.server \
553 $ rhodecode-index --apikey=key --apihost=http://rhodecode.server --instance-name=rcstack-instance --save-config
526 --instance-name=enterprise-2 --save-config
527
528 # Create the indexing mapping file
529 $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \
530 --create-mapping search_mapping.ini --instance-name=enterprise-4
531
532 .. _tools-rhodecode-list-instance:
533
534 rhodecode-list-instances
535 ------------------------
536
537 Use this command to list the instance details configured in the
538 :file:`~/.rhoderc` file.
539
540 .. code-block:: bash
541
542 $ .rccontrol/enterprise-1/profile/bin/rhodecode-list-instances
543 [instance:production] - Config only
544 API-HOST: https://some.url.com
545 API-KEY: some.auth.token
546
547 [instance:development] - Config only
548 API-HOST: http://some.ip.address
549 API-KEY: some.auth.token
550
554
551
555
552 .. _tools-setup-config:
556 .. _tools-setup-config:
General Comments 0
You need to be logged in to leave comments. Login now