Show More
@@ -1,151 +1,151 b'' | |||||
1 | .. _backup-ref: |
|
1 | .. _backup-ref: | |
2 |
|
2 | |||
3 | Backup and Restore |
|
3 | Backup and Restore | |
4 | ================== |
|
4 | ================== | |
5 |
|
5 | |||
6 | *βThe condition of any backup is unknown until a restore is attempted.β* |
|
6 | *βThe condition of any backup is unknown until a restore is attempted.β* | |
7 | `SchrΓΆdinger's Backup`_ |
|
7 | `SchrΓΆdinger's Backup`_ | |
8 |
|
8 | |||
9 | To snapshot an instance of |RCE|, and save its settings, you need to backup the |
|
9 | To snapshot an instance of |RCE|, and save its settings, you need to backup the | |
10 | following parts of the system at the same time. |
|
10 | following parts of the system at the same time. | |
11 |
|
11 | |||
12 | * The |repos| managed by the instance together with the stored Gists. |
|
12 | * The |repos| managed by the instance together with the stored Gists. | |
13 | * The |RCE| database. |
|
13 | * The |RCE| database. | |
14 | * Any configuration files or extensions that you've configured. In most |
|
14 | * Any configuration files or extensions that you've configured. In most | |
15 | cases it's only the :file:`rhodecode.ini` file. |
|
15 | cases it's only the :file:`rhodecode.ini` file. | |
16 | * Installer files such as those in `/opt/rhodecode` can be backed-up, however |
|
16 | * Installer files such as those in `/opt/rhodecode` can be backed-up, however | |
17 | it's not required since in case of a recovery installer simply |
|
17 | it's not required since in case of a recovery installer simply | |
18 | re-creates those. |
|
18 | re-creates those. | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | .. important:: |
|
21 | .. important:: | |
22 |
|
22 | |||
23 | Ideally you should script all of these functions so that it creates a |
|
23 | Ideally you should script all of these functions so that it creates a | |
24 | backup snapshot of your system at a particular timestamp and then run that |
|
24 | backup snapshot of your system at a particular timestamp and then run that | |
25 | script regularly. |
|
25 | script regularly. | |
26 |
|
26 | |||
27 | Backup Details |
|
27 | Backup Details | |
28 | -------------- |
|
28 | -------------- | |
29 |
|
29 | |||
30 | To backup the relevant parts of |RCE| required to restore your system, use |
|
30 | To backup the relevant parts of |RCE| required to restore your system, use | |
31 | the information in this section to identify what is important to you. |
|
31 | the information in this section to identify what is important to you. | |
32 |
|
32 | |||
33 | Repository Backup |
|
33 | Repository Backup | |
34 | ^^^^^^^^^^^^^^^^^ |
|
34 | ^^^^^^^^^^^^^^^^^ | |
35 |
|
35 | |||
36 | To back up your |repos|, use the API to get a list of all |repos| managed, |
|
36 | To back up your |repos|, use the API to get a list of all |repos| managed, | |
37 | and then clone them to your backup location. This is the most safe backup option. |
|
37 | and then clone them to your backup location. This is the most safe backup option. | |
38 | Backing up the storage directory could potentially result in a backup of |
|
38 | Backing up the storage directory could potentially result in a backup of | |
39 | partially committed files or commits. (Backup taking place during a big push) |
|
39 | partially committed files or commits. (Backup taking place during a big push) | |
40 | As an alternative you could use a rsync or simple `cp` commands if you can |
|
40 | As an alternative you could use a rsync or simple `cp` commands if you can | |
41 | ensure your instance is only in read-only mode or stopped at the moment. |
|
41 | ensure your instance is only in read-only mode or stopped at the moment. | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | Use the ``get_repos`` method to list all your managed |repos|, |
|
44 | Use the ``get_repos`` method to list all your managed |repos|, | |
45 | and use the ``clone_uri`` information that is returned. See the :ref:`api` |
|
45 | and use the ``clone_uri`` information that is returned. See the :ref:`api` | |
46 | for more information. Be sure to keep the structure or repositories with their |
|
46 | for more information. Be sure to keep the structure or repositories with their | |
47 | repository groups. |
|
47 | repository groups. | |
48 |
|
48 | |||
49 | .. important:: |
|
49 | .. important:: | |
50 |
|
50 | |||
51 | This will not work for |svn| |repos|. Currently the only way to back up |
|
51 | This will not work for |svn| |repos|. Currently the only way to back up | |
52 | your |svn| |repos| is to make a copy of them. |
|
52 | your |svn| |repos| is to make a copy of them. | |
53 |
|
53 | |||
54 | It is also important to note, that you can only restore the |svn| |repos| |
|
54 | It is also important to note, that you can only restore the |svn| |repos| | |
55 | using the same version as they were saved with. |
|
55 | using the same version as they were saved with. | |
56 |
|
56 | |||
57 | Database Backup |
|
57 | Database Backup | |
58 | ^^^^^^^^^^^^^^^ |
|
58 | ^^^^^^^^^^^^^^^ | |
59 |
|
59 | |||
60 | The instance database contains all the |RCE| permissions settings, |
|
60 | The instance database contains all the |RCE| permissions settings, | |
61 | and user management information. To backup your database, |
|
61 | and user management information. To backup your database, | |
62 | export it using the following appropriate example, and then move it to your |
|
62 | export it using the following appropriate example, and then move it to your | |
63 | backup location: |
|
63 | backup location: | |
64 |
|
64 | |||
65 | .. code-block:: bash |
|
65 | .. code-block:: bash | |
66 |
|
66 | |||
67 | # For MySQL DBs |
|
67 | # For MySQL DBs | |
68 | $ mysqldump -u <uname> -p <pass> rhodecode_db_name > mysql-db-backup |
|
68 | $ mysqldump -u <uname> -p <pass> rhodecode_db_name > mysql-db-backup | |
69 | # MySQL restore command |
|
69 | # MySQL restore command | |
70 | $ mysql -u <uname> -p <pass> rhodecode_db_name < mysql-db-backup |
|
70 | $ mysql -u <uname> -p <pass> rhodecode_db_name < mysql-db-backup | |
71 |
|
71 | |||
72 | # For PostgreSQL DBs |
|
72 | # For PostgreSQL DBs | |
73 | $ PGPASSWORD=<pass> pg_dump --inserts -U <uname> -h localhost rhodecode_db_name > postgresql-db-backup |
|
73 | $ PGPASSWORD=<pass> pg_dump --inserts -U <uname> -h localhost rhodecode_db_name > postgresql-db-backup | |
74 | # PosgreSQL restore |
|
74 | # PosgreSQL restore | |
75 | $ PGPASSWORD=<pass> psql -U <uname> -h localhost -d rhodecode_db_name -1 -f postgresql-db-backup |
|
75 | $ PGPASSWORD=<pass> psql -U <uname> -h localhost -d rhodecode_db_name -1 -f postgresql-db-backup | |
76 |
|
76 | |||
77 | # For SQLite |
|
77 | # For SQLite | |
78 | $ sqlite3 rhodecode.db β.dumpβ > sqlite-db-backup |
|
78 | $ sqlite3 rhodecode.db β.dumpβ > sqlite-db-backup | |
79 | # SQLite restore |
|
79 | # SQLite restore | |
80 | $ copy sqlite-db-backup rhodecode.db |
|
80 | $ copy sqlite-db-backup rhodecode.db | |
81 |
|
81 | |||
82 |
|
82 | |||
83 | The default |RCE| SQLite database location is |
|
83 | The default |RCE| SQLite database location is | |
84 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.db` |
|
84 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.db` | |
85 |
|
85 | |||
86 | If running MySQL or PostgreSQL databases, you will have configured these |
|
86 | If running MySQL or PostgreSQL databases, you will have configured these | |
87 | separately, for more information see :ref:`rhodecode-database-ref` |
|
87 | separately, for more information see :ref:`rhodecode-database-ref` | |
88 |
|
88 | |||
89 | Configuration File Backup |
|
89 | Configuration File Backup | |
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
91 |
|
91 | |||
92 | Depending on your setup, you could have a number of configuration files that |
|
92 | Depending on your setup, you could have a number of configuration files that | |
93 | should be backed up. You may have some, or all of the configuration files |
|
93 | should be backed up. You may have some, or all of the configuration files | |
94 | listed in the :ref:`config-rce-files` section. Ideally you should back these |
|
94 | listed in the :ref:`config-rce-files` section. Ideally you should back these | |
95 | up at the same time as the database and |repos|. It really depends on if you need |
|
95 | up at the same time as the database and |repos|. It really depends on if you need | |
96 | the configuration file like logs, custom modules. We always recommend backing |
|
96 | the configuration file like logs, custom modules. We always recommend backing | |
97 | those up. |
|
97 | those up. | |
98 |
|
98 | |||
99 | Gist Backup |
|
99 | Gist Backup | |
100 | ^^^^^^^^^^^ |
|
100 | ^^^^^^^^^^^ | |
101 |
|
101 | |||
102 | To backup the gists on your |RCE| instance you usually have to backup the |
|
102 | To backup the gists on your |RCE| instance you usually have to backup the | |
103 | gist storage path. If this haven't been changed it's located inside |
|
103 | gist storage path. If this haven't been changed it's located inside | |
104 | :file:`.rc_gist_store` and the metadata in :file:`.rc_gist_metadata`. |
|
104 | :file:`.rc_gist_store` and the metadata in :file:`.rc_gist_metadata`. | |
105 | You can use the ``get_users`` and ``get_gists`` API methods to fetch the |
|
105 | You can use the ``get_users`` and ``get_gists`` API methods to fetch the | |
106 | gists for each user on the instance. |
|
106 | gists for each user on the instance. | |
107 |
|
107 | |||
108 | Extension Backups |
|
108 | Extension Backups | |
109 | ^^^^^^^^^^^^^^^^^ |
|
109 | ^^^^^^^^^^^^^^^^^ | |
110 |
|
110 | |||
111 | You should also backup any extensions added in the |
|
111 | You should also backup any extensions added in the | |
112 | :file:`home/{user}/.rccontrol/{instance-id}/rcextensions` directory. |
|
112 | :file:`home/{user}/.rccontrol/{instance-id}/rcextensions` directory. | |
113 |
|
113 | |||
114 | Full-text Search Backup |
|
114 | Full-text Search Backup | |
115 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|
115 | ^^^^^^^^^^^^^^^^^^^^^^^ | |
116 |
|
116 | |||
117 | You may also have full text search set up, but the index can be rebuild from |
|
117 | You may also have full text search set up, but the index can be rebuild from | |
118 | re-imported |repos| if necessary. You will most likely want to backup your |
|
118 | re-imported |repos| if necessary. You will most likely want to backup your | |
119 | :file:`mapping.ini` file if you've configured that. For more information, see |
|
119 | :file:`search_mapping.ini` file if you've configured that. For more information, see | |
120 | the :ref:`indexing-ref` section. |
|
120 | the :ref:`indexing-ref` section. | |
121 |
|
121 | |||
122 | Restoration Steps |
|
122 | Restoration Steps | |
123 | ----------------- |
|
123 | ----------------- | |
124 |
|
124 | |||
125 | To restore an instance of |RCE| from its backed up components, to a fresh |
|
125 | To restore an instance of |RCE| from its backed up components, to a fresh | |
126 | system use the following steps. |
|
126 | system use the following steps. | |
127 |
|
127 | |||
128 | 1. Install a new instance of |RCE| using sqlite option as database. |
|
128 | 1. Install a new instance of |RCE| using sqlite option as database. | |
129 | 2. Restore your database. |
|
129 | 2. Restore your database. | |
130 | 3. Once installed, replace you backed up the :file:`rhodecode.ini` with your |
|
130 | 3. Once installed, replace you backed up the :file:`rhodecode.ini` with your | |
131 | backup version. Ensure this file points to the restored |
|
131 | backup version. Ensure this file points to the restored | |
132 | database, see the :ref:`config-database` section. |
|
132 | database, see the :ref:`config-database` section. | |
133 | 4. Restart |RCE| and remap and rescan your |repos| to verify filesystem access, |
|
133 | 4. Restart |RCE| and remap and rescan your |repos| to verify filesystem access, | |
134 | see the :ref:`remap-rescan` section. |
|
134 | see the :ref:`remap-rescan` section. | |
135 |
|
135 | |||
136 |
|
136 | |||
137 | Post Restoration Steps |
|
137 | Post Restoration Steps | |
138 | ^^^^^^^^^^^^^^^^^^^^^^ |
|
138 | ^^^^^^^^^^^^^^^^^^^^^^ | |
139 |
|
139 | |||
140 | Once you have restored your |RCE| instance to basic functionality, you can |
|
140 | Once you have restored your |RCE| instance to basic functionality, you can | |
141 | then work on restoring any specific setup changes you had made. |
|
141 | then work on restoring any specific setup changes you had made. | |
142 |
|
142 | |||
143 | * To recreate the |RCE| index, use the backed up :file:`mapping.ini` file if |
|
143 | * To recreate the |RCE| index, use the backed up :file:`search_mapping.ini` file if | |
144 | you had made changes and rerun the indexer. See the |
|
144 | you had made changes and rerun the indexer. See the | |
145 | :ref:`indexing-ref` section for details. |
|
145 | :ref:`indexing-ref` section for details. | |
146 | * To reconfigure any extensions, copy the backed up extensions into the |
|
146 | * To reconfigure any extensions, copy the backed up extensions into the | |
147 | :file:`/home/{user}/.rccontrol/{instance-id}/rcextensions` and also specify |
|
147 | :file:`/home/{user}/.rccontrol/{instance-id}/rcextensions` and also specify | |
148 | any custom hooks if necessary. See the :ref:`extensions-hooks-ref` section for |
|
148 | any custom hooks if necessary. See the :ref:`extensions-hooks-ref` section for | |
149 | details. |
|
149 | details. | |
150 |
|
150 | |||
151 | .. _SchrΓΆdinger's Backup: http://novabackup.novastor.com/blog/schrodingers-backup-good-bad-backup/ |
|
151 | .. _SchrΓΆdinger's Backup: http://novabackup.novastor.com/blog/schrodingers-backup-good-bad-backup/ |
@@ -1,74 +1,74 b'' | |||||
1 | .. _config-files: |
|
1 | .. _config-files: | |
2 |
|
2 | |||
3 | Configuration Files Overview |
|
3 | Configuration Files Overview | |
4 | ============================ |
|
4 | ============================ | |
5 |
|
5 | |||
6 | |RCE| and |RCC| have a number of different configuration files. The following |
|
6 | |RCE| and |RCC| have a number of different configuration files. The following | |
7 | is a brief explanation of each, and links to their associated configuration |
|
7 | is a brief explanation of each, and links to their associated configuration | |
8 | sections. |
|
8 | sections. | |
9 |
|
9 | |||
10 | .. rst-class:: dl-horizontal |
|
10 | .. rst-class:: dl-horizontal | |
11 |
|
11 | |||
12 | \- **rhodecode.ini** |
|
12 | \- **rhodecode.ini** | |
13 | Default location: |
|
13 | Default location: | |
14 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` |
|
14 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |
15 |
|
15 | |||
16 | This is the main |RCE| configuration file and controls much of its |
|
16 | This is the main |RCE| configuration file and controls much of its | |
17 | default behaviour. It is also used to configure certain customer |
|
17 | default behaviour. It is also used to configure certain customer | |
18 | settings. Here are some of the most common reasons to make changes to |
|
18 | settings. Here are some of the most common reasons to make changes to | |
19 | this file. |
|
19 | this file. | |
20 |
|
20 | |||
21 | * :ref:`config-database` |
|
21 | * :ref:`config-database` | |
22 | * :ref:`set-up-mail` |
|
22 | * :ref:`set-up-mail` | |
23 | * :ref:`increase-gunicorn` |
|
23 | * :ref:`increase-gunicorn` | |
24 | * :ref:`x-frame` |
|
24 | * :ref:`x-frame` | |
25 |
|
25 | |||
26 | \- **mapping.ini** |
|
26 | \- **search_mapping.ini** | |
27 | Default location: |
|
27 | Default location: | |
28 | :file:`/home/{user}/.rccontrol/{instance-id}/mapping.ini` |
|
28 | :file:`/home/{user}/.rccontrol/{instance-id}/search_mapping.ini` | |
29 |
|
29 | |||
30 | This file is used to control the |RCE| indexer. It comes configured |
|
30 | This file is used to control the |RCE| indexer. It comes configured | |
31 | to index your instance. To change the default configuration, see |
|
31 | to index your instance. To change the default configuration, see | |
32 | :ref:`advanced-indexing`. |
|
32 | :ref:`advanced-indexing`. | |
33 |
|
33 | |||
34 | \- **vcsserver.ini** |
|
34 | \- **vcsserver.ini** | |
35 | Default location: |
|
35 | Default location: | |
36 | :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` |
|
36 | :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` | |
37 |
|
37 | |||
38 | The VCS Server handles the connection between your |repos| and |RCE|. |
|
38 | The VCS Server handles the connection between your |repos| and |RCE|. | |
39 | See the :ref:`vcs-server` section for configuration options and more |
|
39 | See the :ref:`vcs-server` section for configuration options and more | |
40 | detailed information. |
|
40 | detailed information. | |
41 |
|
41 | |||
42 | \- **supervisord.ini** |
|
42 | \- **supervisord.ini** | |
43 | Default location: |
|
43 | Default location: | |
44 | :file:`/home/{user}/.rccontrol/supervisor/supervisord.ini` |
|
44 | :file:`/home/{user}/.rccontrol/supervisor/supervisord.ini` | |
45 |
|
45 | |||
46 | |RCC| uses Supervisor to monitor and manage installed instances of |
|
46 | |RCC| uses Supervisor to monitor and manage installed instances of | |
47 | |RCE| and the VCS Server. |RCC| will manage this file completely, |
|
47 | |RCE| and the VCS Server. |RCC| will manage this file completely, | |
48 | unless you install |RCE| in self-managed mode. For more information, |
|
48 | unless you install |RCE| in self-managed mode. For more information, | |
49 | see the :ref:`Supervisor Setup<control:supervisor-setup>` section. |
|
49 | see the :ref:`Supervisor Setup<control:supervisor-setup>` section. | |
50 |
|
50 | |||
51 | \- **.rccontrol.ini** |
|
51 | \- **.rccontrol.ini** | |
52 | Default location: :file:`/home/{user}/.rccontrol.ini` |
|
52 | Default location: :file:`/home/{user}/.rccontrol.ini` | |
53 |
|
53 | |||
54 | This file contains the instances that |RCC| starts at boot, which is all |
|
54 | This file contains the instances that |RCC| starts at boot, which is all | |
55 | by default, but for more information, see |
|
55 | by default, but for more information, see | |
56 | the :ref:`Manually Start At Boot <control:set-start-boot>` section. |
|
56 | the :ref:`Manually Start At Boot <control:set-start-boot>` section. | |
57 |
|
57 | |||
58 | \- **.rhoderc** |
|
58 | \- **.rhoderc** | |
59 | Default location: :file:`/home/{user}/.rhoderc` |
|
59 | Default location: :file:`/home/{user}/.rhoderc` | |
60 |
|
60 | |||
61 | This file is used by the |RCE| API when accessing an instance from a |
|
61 | This file is used by the |RCE| API when accessing an instance from a | |
62 | remote machine. The API checks this file for connection and |
|
62 | remote machine. The API checks this file for connection and | |
63 | authentication details. For more details, see the :ref:`config-rhoderc` |
|
63 | authentication details. For more details, see the :ref:`config-rhoderc` | |
64 | section. |
|
64 | section. | |
65 |
|
65 | |||
66 | \- **MANIFEST** |
|
66 | \- **MANIFEST** | |
67 | Default location: :file:`/home/{user}/.rccontrol/cache/MANIFEST` |
|
67 | Default location: :file:`/home/{user}/.rccontrol/cache/MANIFEST` | |
68 |
|
68 | |||
69 | |RCC| uses this file to source the latest available builds from the |
|
69 | |RCC| uses this file to source the latest available builds from the | |
70 | secure RhodeCode download channels. The only reason to mess with this file |
|
70 | secure RhodeCode download channels. The only reason to mess with this file | |
71 | is if you need to do an offline installation, |
|
71 | is if you need to do an offline installation, | |
72 | see the :ref:`Offline Installation<control:offline-installer-ref>` |
|
72 | see the :ref:`Offline Installation<control:offline-installer-ref>` | |
73 | instructions, otherwise |RCC| will completely manage this file. |
|
73 | instructions, otherwise |RCC| will completely manage this file. | |
74 |
|
74 |
@@ -1,276 +1,363 b'' | |||||
1 | .. _indexing-ref: |
|
1 | .. _indexing-ref: | |
2 |
|
2 | |||
3 | Full-text Search |
|
3 | Full-text Search | |
4 | ---------------- |
|
4 | ---------------- | |
5 |
|
5 | |||
6 | By default RhodeCode is configured to use `Whoosh`_ to index |repos| and |
|
6 | By default RhodeCode is configured to use `Whoosh`_ to index |repos| and | |
7 | provide full-text search. |
|
7 | provide full-text search. | |
8 |
|
8 | |||
9 |
|RCE| also provides support for `Elasticsearch`_ as a backend |
|
9 | |RCE| also provides support for `Elasticsearch 6`_ as a backend more for advanced | |
10 | search. See :ref:`enable-elasticsearch` for details. |
|
10 | and scalable search. See :ref:`enable-elasticsearch` for details. | |
11 |
|
11 | |||
12 | Indexing |
|
12 | Indexing | |
13 | ^^^^^^^^ |
|
13 | ^^^^^^^^ | |
14 |
|
14 | |||
15 |
To run the indexer you need to |
|
15 | To run the indexer you need to have an |authtoken| with admin rights to all |repos|. | |
16 | |repos|. |
|
|||
17 |
|
16 | |||
18 | To index new content added, you have the option to set the indexer up in a |
|
17 | To index new content added, you have the option to set the indexer up in a | |
19 | number of ways, for example: |
|
18 | number of ways, for example: | |
20 |
|
19 | |||
21 |
* Call the indexer via a cron job. We recommend running this |
|
20 | * Call the indexer via a cron job. We recommend running this once at night. | |
22 |
|
|
21 | In case you need everything indexed immediately it's possible to index few | |
23 | * Set the indexer to infinitely loop and reindex as soon as it has run its |
|
22 | times during the day. | |
24 | cycle. |
|
23 | * Set the indexer to infinitely loop and reindex as soon as it has run its previous cycle. | |
25 | * Hook the indexer up with your CI server to reindex after each push. |
|
24 | * Hook the indexer up with your CI server to reindex after each push. | |
26 |
|
25 | |||
27 | The indexer works by indexing new commits added since the last run. If you |
|
26 | The indexer works by indexing new commits added since the last run. If you | |
28 | wish to build a brand new index from scratch each time, |
|
27 | wish to build a brand new index from scratch each time, | |
29 | use the ``force`` option in the configuration file. |
|
28 | use the ``force`` option in the configuration file. | |
30 |
|
29 | |||
31 | .. important:: |
|
30 | .. important:: | |
32 |
|
31 | |||
33 | You need to have |RCT| installed, see :ref:`install-tools`. Since |RCE| |
|
32 | You need to have |RCT| installed, see :ref:`install-tools`. Since |RCE| | |
34 | 3.5.0 they are installed by default. |
|
33 | 3.5.0 they are installed by default and available with community/enterprise installations. | |
35 |
|
34 | |||
36 | To set up indexing, use the following steps: |
|
35 | To set up indexing, use the following steps: | |
37 |
|
36 | |||
38 | 1. :ref:`config-rhoderc`, if running tools remotely. |
|
37 | 1. :ref:`config-rhoderc`, if running tools remotely. | |
39 | 2. :ref:`run-index` |
|
38 | 2. :ref:`run-index` | |
40 | 3. :ref:`set-index` |
|
39 | 3. :ref:`set-index` | |
41 | 4. :ref:`advanced-indexing` |
|
40 | 4. :ref:`advanced-indexing` | |
42 |
|
41 | |||
43 | .. _config-rhoderc: |
|
42 | .. _config-rhoderc: | |
44 |
|
43 | |||
45 | Configure the ``.rhoderc`` File |
|
44 | Configure the ``.rhoderc`` File | |
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
47 |
|
46 | |||
|
47 | .. note:: | |||
|
48 | ||||
|
49 | Optionally it's possible to use indexer without the ``.rhoderc``. Simply instead of | |||
|
50 | executing with `--instance-name=enterprise-1` execute providing the host and token | |||
|
51 | directly: `--api-host=http://127.0.0.1:10000 --api-key=<auth token goes here> | |||
|
52 | ||||
|
53 | ||||
48 | |RCT| uses the :file:`/home/{user}/.rhoderc` file for connection details |
|
54 | |RCT| uses the :file:`/home/{user}/.rhoderc` file for connection details | |
49 | to |RCE| instances. If this file is not automatically created, |
|
55 | to |RCE| instances. If this file is not automatically created, | |
50 | you can configure it using the following example. You need to configure the |
|
56 | you can configure it using the following example. You need to configure the | |
51 | details for each instance you want to index. |
|
57 | details for each instance you want to index. | |
52 |
|
58 | |||
53 | .. code-block:: bash |
|
59 | .. code-block:: bash | |
54 |
|
60 | |||
55 | # Check the instance details |
|
61 | # Check the instance details | |
56 | # of the instance you want to index |
|
62 | # of the instance you want to index | |
57 | $ rccontrol status |
|
63 | $ rccontrol status | |
58 |
|
64 | |||
59 |
|
|
65 | - NAME: enterprise-1 | |
60 |
|
|
66 | - STATUS: RUNNING | |
61 |
|
|
67 | - TYPE: Enterprise | |
62 |
|
|
68 | - VERSION: 4.1.0 | |
63 |
|
|
69 | - URL: http://127.0.0.1:10003 | |
64 |
|
70 | |||
65 | To get your API Token, on the |RCE| interface go to |
|
71 | To get your API Token, on the |RCE| interface go to | |
66 | :menuselection:`username --> My Account --> Auth tokens` |
|
72 | :menuselection:`username --> My Account --> Auth tokens` | |
67 |
|
73 | |||
68 | .. code-block:: ini |
|
74 | .. code-block:: ini | |
69 |
|
75 | |||
70 | # Configure .rhoderc with matching details |
|
76 | # Configure .rhoderc with matching details | |
71 | # This allows the indexer to connect to the instance |
|
77 | # This allows the indexer to connect to the instance | |
72 | [instance:enterprise-1] |
|
78 | [instance:enterprise-1] | |
73 | api_host = http://127.0.0.1:10000 |
|
79 | api_host = http://127.0.0.1:10000 | |
74 | api_key = <auth token goes here> |
|
80 | api_key = <auth token goes here> | |
75 | repo_dir = /home/<username>/repos |
|
81 | ||
76 |
|
82 | |||
77 | .. _run-index: |
|
83 | .. _run-index: | |
78 |
|
84 | |||
79 | Run the Indexer |
|
85 | Run the Indexer | |
80 | ^^^^^^^^^^^^^^^ |
|
86 | ^^^^^^^^^^^^^^^ | |
81 |
|
87 | |||
82 | Run the indexer using the following command, and specify the instance you |
|
88 | Run the indexer using the following command, and specify the instance you want to index: | |
83 | want to index: |
|
|||
84 |
|
89 | |||
85 | .. code-block:: bash |
|
90 | .. code-block:: bash | |
86 |
|
91 | |||
87 | # From inside a virtualevv |
|
|||
88 | (venv)$ rhodecode-index --instance-name=enterprise-1 |
|
|||
89 |
|
||||
90 | # Using default installation |
|
92 | # Using default installation | |
91 | $ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \ |
|
93 | $ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \ | |
92 | --instance-name=enterprise-1 |
|
94 | --instance-name=enterprise-1 | |
93 |
|
95 | |||
94 | # Using a custom mapping file |
|
96 | # Using a custom mapping file | |
95 | $ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \ |
|
97 | $ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \ | |
96 | --instance-name=enterprise-1 \ |
|
98 | --instance-name=enterprise-1 \ | |
97 | --mapping=/home/user/.rccontrol/enterprise-1/mapping.ini |
|
99 | --mapping=/home/user/.rccontrol/enterprise-1/search_mapping.ini | |
|
100 | ||||
|
101 | # Using a custom mapping file and invocation without ``.rhoderc`` | |||
|
102 | $ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \ | |||
|
103 | --api-host=http://rhodecodecode.myserver.com --api-key=xxxxx \ | |||
|
104 | --mapping=/home/user/.rccontrol/enterprise-1/search_mapping.ini | |||
|
105 | ||||
|
106 | # From inside a virtualev on your local machine or CI server. | |||
|
107 | (venv)$ rhodecode-index --instance-name=enterprise-1 | |||
|
108 | ||||
98 |
|
109 | |||
99 | .. note:: |
|
110 | .. note:: | |
100 |
|
111 | |||
101 | In case of often indexing the index may become fragmented. Most often a result of that |
|
112 | In case of often indexing the index may become fragmented. Most often a result of that | |
102 | is error about `too many open files`. To fix this indexer needs to be executed with |
|
113 | is error about `too many open files`. To fix this indexer needs to be executed with | |
103 | --optimize flag. E.g `rhodecode-index --instance-name=enterprise-1 --optimize` |
|
114 | --optimize flag. E.g `rhodecode-index --instance-name=enterprise-1 --optimize` | |
104 | This should be executed regularly, once a week is recommended. |
|
115 | This should be executed regularly, once a week is recommended. | |
105 |
|
116 | |||
106 |
|
117 | |||
107 | .. _set-index: |
|
118 | .. _set-index: | |
108 |
|
119 | |||
109 | Schedule the Indexer |
|
120 | Schedule the Indexer | |
110 | ^^^^^^^^^^^^^^^^^^^^ |
|
121 | ^^^^^^^^^^^^^^^^^^^^ | |
111 |
|
122 | |||
112 | To schedule the indexer, configure the crontab file to run the indexer inside |
|
123 | To schedule the indexer, configure the crontab file to run the indexer inside | |
113 | your |RCT| virtualenv using the following steps. |
|
124 | your |RCT| virtualenv using the following steps. | |
114 |
|
125 | |||
115 | 1. Open the crontab file, using ``crontab -e``. |
|
126 | 1. Open the crontab file, using ``crontab -e``. | |
116 | 2. Add the indexer to the crontab, and schedule it to run as regularly as you |
|
127 | 2. Add the indexer to the crontab, and schedule it to run as regularly as you | |
117 | wish. |
|
128 | wish. | |
118 | 3. Save the file. |
|
129 | 3. Save the file. | |
119 |
|
130 | |||
120 | .. code-block:: bash |
|
131 | .. code-block:: bash | |
121 |
|
132 | |||
122 | $ crontab -e |
|
133 | $ crontab -e | |
123 |
|
134 | |||
124 | # The virtualenv can be called using its full path, so for example you can |
|
135 | # The virtualenv can be called using its full path, so for example you can | |
125 | # put this example into the crontab |
|
136 | # put this example into the crontab | |
126 |
|
137 | |||
127 | # Run the indexer daily at 4am using the default mapping settings |
|
138 | # Run the indexer daily at 4am using the default mapping settings | |
128 | * 4 * * * /home/ubuntu/.virtualenv/rhodecode-venv/bin/rhodecode-index \ |
|
139 | * 4 * * * /home/ubuntu/.virtualenv/rhodecode-venv/bin/rhodecode-index \ | |
129 | --instance-name=enterprise-1 |
|
140 | --instance-name=enterprise-1 | |
130 |
|
141 | |||
131 | # Run the indexer every Sunday at 3am using default mapping |
|
142 | # Run the indexer every Sunday at 3am using default mapping | |
132 | * 3 * * 0 /home/ubuntu/.virtualenv/rhodecode-venv/bin/rhodecode-index \ |
|
143 | * 3 * * 0 /home/ubuntu/.virtualenv/rhodecode-venv/bin/rhodecode-index \ | |
133 | --instance-name=enterprise-1 |
|
144 | --instance-name=enterprise-1 | |
134 |
|
145 | |||
135 | # Run the indexer every 15 minutes |
|
146 | # Run the indexer every 15 minutes | |
136 | # using a specially configured mapping file |
|
147 | # using a specially configured mapping file | |
137 | */15 * * * * ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ |
|
148 | */15 * * * * ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ | |
138 | --instance-name=enterprise-4 \ |
|
149 | --instance-name=enterprise-4 \ | |
139 | --mapping=/home/user/.rccontrol/enterprise-4/mapping.ini |
|
150 | --mapping=/home/user/.rccontrol/enterprise-4/search_mapping.ini | |
140 |
|
151 | |||
141 | .. _advanced-indexing: |
|
152 | .. _advanced-indexing: | |
142 |
|
153 | |||
143 | Advanced Indexing |
|
154 | Advanced Indexing | |
144 | ^^^^^^^^^^^^^^^^^ |
|
155 | ^^^^^^^^^^^^^^^^^ | |
145 |
|
156 | |||
146 | |RCT| indexes based on the :file:`mapping.ini` file. To configure your index, |
|
157 | ||
147 | you can specify different options in this file. The default location is: |
|
158 | Force Re-Indexing single repository | |
|
159 | +++++++++++++++++++++++++++++++++++ | |||
|
160 | ||||
|
161 | Often it's required to re-index whole repository because of some repository changes, | |||
|
162 | or to remove some indexed secrets, or files. There's a special `--repo-name=` flag | |||
|
163 | for the indexer that limits execution to a single repository. For example to force-reindex | |||
|
164 | single repository such call can be made:: | |||
|
165 | ||||
|
166 | rhodecode-index --instance-name=enterprise-1 --force --repo-name=rhodecode-vcsserver | |||
|
167 | ||||
|
168 | ||||
|
169 | Removing repositories from index | |||
|
170 | ++++++++++++++++++++++++++++++++ | |||
|
171 | ||||
|
172 | The indexer automatically removes renamed repositories and builds index for new names. | |||
|
173 | In case that you wish to remove indexed repository manually such call would allow that:: | |||
148 |
|
|
174 | ||
149 | * :file:`/home/{user}/.rccontrol/{instance-id}/mapping.ini`, using default |
|
175 | rhodecode-index --instance-name=enterprise-1 --remove-only --repo-name=rhodecode-vcsserver | |
150 | |RCT|. |
|
176 | ||
|
177 | ||||
|
178 | Using search_mapping.ini file for advanced index rules | |||
|
179 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |||
|
180 | ||||
|
181 | By default rhodecode-index runs for all repositories, all files with parsing limits | |||
|
182 | defined by the CLI default arguments. You can change those limits by calling with | |||
|
183 | different flags such as `--max-filesize 2048kb` or `--repo-limit 10` | |||
|
184 | ||||
|
185 | For more advanced execution logic it's possible to use a configuration file that | |||
|
186 | would define detailed rules which repositories and how should be indexed. | |||
|
187 | ||||
|
188 | |RCT| provides an example index configuration file called :file:`search_mapping.ini`. | |||
|
189 | This file is created by default during installation and is located at: | |||
|
190 | ||||
|
191 | * :file:`/home/{user}/.rccontrol/{instance-id}/search_mapping.ini`, using default |RCT|. | |||
151 | * :file:`~/venv/lib/python2.7/site-packages/rhodecode_tools/templates/mapping.ini`, |
|
192 | * :file:`~/venv/lib/python2.7/site-packages/rhodecode_tools/templates/mapping.ini`, | |
152 | when using ``virtualenv``. |
|
193 | when using ``virtualenv``. | |
153 |
|
194 | |||
154 | .. note:: |
|
195 | .. note:: | |
155 |
|
196 | |||
156 | If you need to create the :file:`mapping.ini` file, use the |RCT| |
|
197 | If you need to create the :file:`search_mapping.ini` file manually, use the |RCT| | |
157 |
``rhodecode-index --create-mapping path/to/ |
|
198 | ``rhodecode-index --create-mapping path/to/search_mapping.ini`` API call. | |
158 | see the :ref:`tools-cli` section. |
|
199 | For details, see the :ref:`tools-cli` section. | |
159 |
|
||||
160 | The indexer runs in a random order to prevent a failing |repo| from stopping |
|
|||
161 | a build. To configure different indexing scenarios, set the following options |
|
|||
162 | inside the :file:`mapping.ini` and specify the altered file using the |
|
|||
163 | ``--mapping`` option. |
|
|||
164 |
|
200 | |||
165 | * ``index_files`` : Index the specified file types. |
|
201 | To Run the indexer with mapping file provide it using `--mapping` flag:: | |
166 | * ``skip_files`` : Do not index the specified file types. |
|
|||
167 | * ``index_files_content`` : Index the content of the specified file types. |
|
|||
168 | * ``skip_files_content`` : Do not index the content of the specified files. |
|
|||
169 | * ``force`` : Create a fresh index on each run. |
|
|||
170 | * ``max_filesize`` : Files larger than the set size will not be indexed. |
|
|||
171 | * ``commit_parse_limit`` : Set the batch size when indexing commit messages. |
|
|||
172 | Set to a lower number to lessen memory load. |
|
|||
173 | * ``repo_limit`` : Set the maximum number or |repos| indexed per run. |
|
|||
174 | * ``[INCLUDE]`` : Set |repos| you want indexed. This takes precedent over |
|
|||
175 | ``[EXCLUDE]``. |
|
|||
176 | * ``[EXCLUDE]`` : Set |repos| you do not want indexed. Exclude can be used to |
|
|||
177 | not index branches, forks, or log |repos|. |
|
|||
178 |
|
|
202 | ||
179 | At the end of the file you can specify conditions for specific |repos| that |
|
203 | rhodecode-index --instance-name=enterprise-1 --mapping=/my/path/search_mapping.ini | |
180 | will override the default values. To configure your indexer, |
|
204 | ||
181 | use the following example :file:`mapping.ini` file. |
|
205 | ||
|
206 | Here's a detailed example of using :file:`search_mapping.ini` file. | |||
182 |
|
207 | |||
183 | .. code-block:: ini |
|
208 | .. code-block:: ini | |
184 |
|
209 | |||
185 | [__DEFAULT__] |
|
210 | [__DEFAULT__] | |
186 | # default patterns for indexing files and content of files. |
|
211 | ; Create index on commits data, and files data in this order. Available options | |
187 | # Binary files are skipped by default. |
|
212 | ; are `commits`, `files` | |
|
213 | index_types = commits,files | |||
|
214 | ||||
|
215 | ; Commit fetch limit. In what amount of chunks commits should be fetched | |||
|
216 | ; via api and parsed. This allows server to transfer smaller chunks and be less loaded | |||
|
217 | commit_fetch_limit = 1000 | |||
188 |
|
218 | |||
189 | # Index python and markdown files |
|
219 | ; Commit process limit. Limit the number of commits indexer should fetch, and | |
190 | index_files = *.py, *.md |
|
220 | ; store inside the full text search index. eg. if repo has 2000 commits, and | |
|
221 | ; limit is 1000, on the first run it will process commits 0-1000 and on the | |||
|
222 | ; second 1000-2000 commits. Help reduce memory usage, default is 50000 | |||
|
223 | ; (set -1 for unlimited) | |||
|
224 | commit_process_limit = 50000 | |||
191 |
|
225 | |||
192 | # Do not index these file types |
|
226 | ; Limit of how many repositories each run can process, default is -1 (unlimited) | |
193 | skip_files = *.svg, *.log, *.dump, *.txt |
|
227 | ; in case of 1000s of repositories it's better to execute in chunks to not overload | |
|
228 | ; the server. | |||
|
229 | repo_limit = -1 | |||
194 |
|
230 | |||
195 | # Index both file types and their content |
|
231 | ; Default patterns for indexing files and content of files. Binary files | |
196 | index_files_content = *.cpp, *.ini, *.py |
|
232 | ; are skipped by default. | |
|
233 | ||||
|
234 | ; Add to index those comma separated files; globs syntax | |||
|
235 | ; e.g index_files = *.py, *.c, *.h, *.js | |||
|
236 | index_files = *, | |||
197 |
|
237 | |||
198 | # Index file names, but not file content |
|
238 | ; Do not add to index those comma separated files, this excludes | |
199 | skip_files_content = *.svg, |
|
239 | ; both search by name and content; globs syntax | |
|
240 | ; e.g index_files = *.key, *.sql, *.xml | |||
|
241 | skip_files = , | |||
200 |
|
242 | |||
201 | # Force rebuilding an index from scratch. Each repository will be rebuild |
|
243 | ; Add to index content of those comma separated files; globs syntax | |
202 | # from scratch with a global flag. Use local flag to rebuild single repos |
|
244 | ; e.g index_files = *.h, *.obj | |
|
245 | index_files_content = *, | |||
|
246 | ||||
|
247 | ; Do not add to index content of those comma separated files; globs syntax | |||
|
248 | ; e.g index_files = *.exe, *.bin, *.log, *.dump | |||
|
249 | skip_files_content = , | |||
|
250 | ||||
|
251 | ; Force rebuilding an index from scratch. Each repository will be rebuild from | |||
|
252 | ; scratch with a global flag. Use --repo-name=NAME --force to rebuild single repo | |||
203 | force = false |
|
253 | force = false | |
204 |
|
254 | |||
205 | # Do not index files larger than 385KB |
|
255 | ; maximum file size that indexer will use, files above that limit are not going | |
206 | max_filesize = 385KB |
|
256 | ; to have they content indexed. | |
|
257 | ; Possible options are KB (kilobytes), MB (megabytes), eg 1MB or 1024KB | |||
|
258 | max_filesize = 2MB | |||
207 |
|
259 | |||
208 | # Limit commit indexing to 500 per batch |
|
|||
209 | commit_parse_limit = 500 |
|
|||
210 |
|
||||
211 | # Limit each index run to 25 repos |
|
|||
212 | repo_limit = 25 |
|
|||
213 |
|
260 | |||
214 | # __INCLUDE__ is more important that __EXCLUDE__. |
|
261 | [__INDEX_RULES__] | |
215 |
|
262 | ; Ordered match rules for repositories. A list of all repositories will be fetched | ||
216 | [__INCLUDE__] |
|
263 | ; using API and this list will be filtered using those rules. | |
217 | # Include all repos with these names |
|
264 | ; Syntax for entry: `glob_pattern_OR_full_repo_name = 0 OR 1` where 0=exclude, 1=include | |
|
265 | ; When this ordered list is traversed first match will return the include/exclude marker | |||
|
266 | ; For example: | |||
|
267 | ; upstream/binary_repo = 0 | |||
|
268 | ; upstream/subrepo/xml_files = 0 | |||
|
269 | ; upstream/* = 1 | |||
|
270 | ; special-repo = 1 | |||
|
271 | ; * = 0 | |||
|
272 | ; This will index all repositories under upstream/*, but skip upstream/binary_repo | |||
|
273 | ; and upstream/sub_repo/xml_files, last * = 0 means skip all other matches | |||
218 |
|
274 | |||
219 | docs/* = 1 |
|
275 | ; Another example: | |
220 | lib/* = 1 |
|
276 | ; *-fork = 0 | |
221 |
|
277 | ; * = 1 | ||
222 | [__EXCLUDE__] |
|
278 | ; This will index all repositories, except those that have -fork as suffix. | |
223 | # Do not include the following repo in index |
|
|||
224 |
|
279 | |||
225 | dev-docs/* = 1 |
|
280 | rhodecode-vcsserver = 1 | |
226 | legacy-repos/* = 1 |
|
281 | rhodecode-enterprise-ce = 1 | |
227 | *-dev/* = 1 |
|
282 | upstream/mozilla/firefox-repo = 0 | |
|
283 | upstream/git-binaries = 0 | |||
|
284 | upstream/* = 1 | |||
|
285 | * = 0 | |||
228 |
|
286 | |||
229 | # Each repo that needs special indexing is a separate section below. |
|
287 | ; == EXPLICIT REPOSITORY INDEXING == | |
230 | # In each section set the options to override the global configuration |
|
288 | ; If defined this will skip using __INDEX_RULES__, and will not use API to fetch | |
231 | # parameters above. |
|
289 | ; list of repositories, it will explicitly take names defined with [NAME] format and | |
232 | # If special settings are not configured, the global configuration values |
|
290 | ; try to build the index, to build index just for repo_name_1 and special-repo use: | |
233 | # above are inherited. If no special repositories are |
|
291 | ; [repo_name_1] | |
234 | # defined here RhodeCode will use the API to ask for all repositories |
|
292 | ; [special-repo] | |
235 |
|
293 | |||
236 | # For this repo use different settings |
|
294 | ; == PER REPOSITORY CONFIGURATION == | |
237 | [special-repo] |
|
295 | ; This allows overriding the global configuration per repository. | |
238 | commit_parse_limit = 20, |
|
296 | ; example to set specific file limit, and skip certain files for repository special-repo | |
239 | skip_files = *.idea, *.xml, |
|
297 | ; [conf:special-repo] | |
|
298 | ; max_filesize = 5mb | |||
|
299 | ; skip_files = *.xml, *.sql | |||
|
300 | ; index_types = files, | |||
240 |
|
301 | |||
241 | # For another repo use different settings |
|
302 | [conf:rhodecode-vcsserver] | |
242 | [another-special-repo] |
|
303 | index_types = files, | |
243 |
|
|
304 | max_filesize = 5mb | |
244 | max_filesize = 800MB |
|
305 | skip_files = *.xml, *.sql | |
245 | commit_parse_limit = 20000 |
|
306 | index_files = *.py, *.c, *.h, *.js | |
|
307 | ||||
|
308 | ||||
|
309 | In case of 1000s of repositories it can be tricky to write the include/exclude rules at first. | |||
|
310 | There's a special flag to test the mapping file rules and list repositories that would | |||
|
311 | be indexed. Run the indexer with `--show-matched-repos` to list only the match rules:: | |||
|
312 | ||||
|
313 | rhodecode-index --instance-name=enterprise-1 --show-matched-repos --mapping=/my/path/search_mapping.ini | |||
|
314 | ||||
246 |
|
315 | |||
247 | .. _enable-elasticsearch: |
|
316 | .. _enable-elasticsearch: | |
248 |
|
317 | |||
249 | Enabling Elasticsearch |
|
318 | Enabling Elasticsearch | |
250 | ^^^^^^^^^^^^^^^^^^^^^^ |
|
319 | ^^^^^^^^^^^^^^^^^^^^^^ | |
251 |
|
320 | |||
|
321 | Elasticsearch is available in EE edition only. It provides much scalable and more advanced | |||
|
322 | search capabilities. While Whoosh is fine for upto 1-2GB of data beyond that amount of | |||
|
323 | data it starts slowing down, and can cause other problems. Elasticsearch 6 also provides | |||
|
324 | much more advanced query language allowing advanced filtering by file paths, extensions | |||
|
325 | OR statements, ranges etc. Please check query language examples in the search field for | |||
|
326 | some advanced query language usage. | |||
|
327 | ||||
|
328 | ||||
252 | 1. Open the :file:`rhodecode.ini` file for the instance you wish to edit. The |
|
329 | 1. Open the :file:`rhodecode.ini` file for the instance you wish to edit. The | |
253 | default location is |
|
330 | default location is | |
254 | :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` |
|
331 | :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |
255 | 2. Find the search configuration section: |
|
332 | 2. Find the search configuration section: | |
256 |
|
333 | |||
257 | .. code-block:: ini |
|
334 | .. code-block:: ini | |
258 |
|
335 | |||
259 | ################################### |
|
336 | ################################### | |
260 | ## SEARCH INDEXING CONFIGURATION ## |
|
337 | ## SEARCH INDEXING CONFIGURATION ## | |
261 | ################################### |
|
338 | ################################### | |
262 |
|
339 | |||
263 | search.module = rhodecode.lib.index.whoosh |
|
340 | search.module = rhodecode.lib.index.whoosh | |
264 | search.location = %(here)s/data/index |
|
341 | search.location = %(here)s/data/index | |
265 |
|
342 | |||
266 | and change it to: |
|
343 | and change it to: | |
267 |
|
344 | |||
268 | .. code-block:: ini |
|
345 | .. code-block:: ini | |
269 |
|
346 | |||
270 | search.module = rc_elasticsearch |
|
347 | search.module = rc_elasticsearch | |
271 |
search.location = http://localhost:9200 |
|
348 | search.location = http://localhost:9200 | |
|
349 | ## specify Elastic Search version, 6 for latest or 2 for legacy | |||
|
350 | search.es_version = 6 | |||
|
351 | ||||
|
352 | where ``search.location`` points to the elasticsearch server | |||
|
353 | by default running on port 9200. | |||
272 |
|
354 | |||
273 | where ``search.location`` points to the elasticsearch server. |
|
355 | Index invocation also needs change. Please provide --es-version= and | |
|
356 | --engine-location= parameters to define elasticsearch server location and it's version. | |||
|
357 | For example:: | |||
|
358 | ||||
|
359 | rhodecode-index --instace-name=enterprise-1 --es-version=6 --engine-location=http://localhost:9200 | |||
|
360 | ||||
274 |
|
|
361 | ||
275 | .. _Whoosh: https://pypi.python.org/pypi/Whoosh/ |
|
362 | .. _Whoosh: https://pypi.python.org/pypi/Whoosh/ | |
276 | .. _Elasticsearch: https://www.elastic.co/ No newline at end of file |
|
363 | .. _Elasticsearch 6: https://www.elastic.co/ No newline at end of file |
@@ -1,171 +1,171 b'' | |||||
1 | .. _system-overview-ref: |
|
1 | .. _system-overview-ref: | |
2 |
|
2 | |||
3 | System Overview |
|
3 | System Overview | |
4 | =============== |
|
4 | =============== | |
5 |
|
5 | |||
6 | Latest Version |
|
6 | Latest Version | |
7 | -------------- |
|
7 | -------------- | |
8 |
|
8 | |||
9 | * |release| on Unix and Windows systems. |
|
9 | * |release| on Unix and Windows systems. | |
10 |
|
10 | |||
11 | System Architecture |
|
11 | System Architecture | |
12 | ------------------- |
|
12 | ------------------- | |
13 |
|
13 | |||
14 | The following diagram shows a typical production architecture. |
|
14 | The following diagram shows a typical production architecture. | |
15 |
|
15 | |||
16 | .. image:: ../images/architecture-diagram.png |
|
16 | .. image:: ../images/architecture-diagram.png | |
17 | :align: center |
|
17 | :align: center | |
18 |
|
18 | |||
19 | Supported Operating Systems |
|
19 | Supported Operating Systems | |
20 | --------------------------- |
|
20 | --------------------------- | |
21 |
|
21 | |||
22 | Linux |
|
22 | Linux | |
23 | ^^^^^ |
|
23 | ^^^^^ | |
24 |
|
24 | |||
25 | * Ubuntu 14.04 |
|
25 | * Ubuntu 14.04 | |
26 | * CentOS 6.2 and 7 |
|
26 | * CentOS 6.2 and 7 | |
27 | * Debian 7.8 |
|
27 | * Debian 7.8 | |
28 | * RedHat Fedora |
|
28 | * RedHat Fedora | |
29 | * Arch Linux |
|
29 | * Arch Linux | |
30 | * SUSE Linux |
|
30 | * SUSE Linux | |
31 |
|
31 | |||
32 | Windows |
|
32 | Windows | |
33 | ^^^^^^^ |
|
33 | ^^^^^^^ | |
34 |
|
34 | |||
35 | * Windows Vista Ultimate 64bit |
|
35 | * Windows Vista Ultimate 64bit | |
36 | * Windows 7 Ultimate 64bit |
|
36 | * Windows 7 Ultimate 64bit | |
37 | * Windows 8 Professional 64bit |
|
37 | * Windows 8 Professional 64bit | |
38 | * Windows 8.1 Enterprise 64bit |
|
38 | * Windows 8.1 Enterprise 64bit | |
39 | * Windows Server 2008 64bit |
|
39 | * Windows Server 2008 64bit | |
40 | * Windows Server 2008-R2 64bit |
|
40 | * Windows Server 2008-R2 64bit | |
41 | * Windows Server 2012 64bit |
|
41 | * Windows Server 2012 64bit | |
42 |
|
42 | |||
43 | Supported Databases |
|
43 | Supported Databases | |
44 | ------------------- |
|
44 | ------------------- | |
45 |
|
45 | |||
46 | * SQLite |
|
46 | * SQLite | |
47 | * MySQL |
|
47 | * MySQL | |
48 | * MariaDB |
|
48 | * MariaDB | |
49 | * PostgreSQL |
|
49 | * PostgreSQL | |
50 |
|
50 | |||
51 | Supported Browsers |
|
51 | Supported Browsers | |
52 | ------------------ |
|
52 | ------------------ | |
53 |
|
53 | |||
54 | * Chrome |
|
54 | * Chrome | |
55 | * Safari |
|
55 | * Safari | |
56 | * Firefox |
|
56 | * Firefox | |
57 | * Internet Explorer 10 & 11 |
|
57 | * Internet Explorer 10 & 11 | |
58 |
|
58 | |||
59 | System Requirements |
|
59 | System Requirements | |
60 | ------------------- |
|
60 | ------------------- | |
61 |
|
61 | |||
62 | |RCE| performs best on machines with ultra-fast hard disks. Generally disk |
|
62 | |RCE| performs best on machines with ultra-fast hard disks. Generally disk | |
63 | performance is more important than CPU performance. In a corporate production |
|
63 | performance is more important than CPU performance. In a corporate production | |
64 | environment handling 1000s of users and |repos| you should deploy on a 12+ |
|
64 | environment handling 1000s of users and |repos| you should deploy on a 12+ | |
65 | core 64GB RAM server. In short, the more RAM the better. |
|
65 | core 64GB RAM server. In short, the more RAM the better. | |
66 |
|
66 | |||
67 |
|
67 | |||
68 | For example: |
|
68 | For example: | |
69 |
|
69 | |||
70 | - for team of 1 - 5 active users you can run on 1GB RAM machine with 1CPU |
|
70 | - for team of 1 - 5 active users you can run on 1GB RAM machine with 1CPU | |
71 | - above 250 active users, |RCE| needs at least 8GB of memory. |
|
71 | - above 250 active users, |RCE| needs at least 8GB of memory. | |
72 | Number of CPUs is less important, but recommended to have at least 2-3 CPUs |
|
72 | Number of CPUs is less important, but recommended to have at least 2-3 CPUs | |
73 |
|
73 | |||
74 |
|
74 | |||
75 | .. _config-rce-files: |
|
75 | .. _config-rce-files: | |
76 |
|
76 | |||
77 | Configuration Files |
|
77 | Configuration Files | |
78 | ------------------- |
|
78 | ------------------- | |
79 |
|
79 | |||
80 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` |
|
80 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |
81 | * :file:`/home/{user}/.rccontrol/{instance-id}/mapping.ini` |
|
81 | * :file:`/home/{user}/.rccontrol/{instance-id}/search_mapping.ini` | |
82 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` |
|
82 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` | |
83 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.ini` |
|
83 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.ini` | |
84 | * :file:`/home/{user}/.rccontrol.ini` |
|
84 | * :file:`/home/{user}/.rccontrol.ini` | |
85 | * :file:`/home/{user}/.rhoderc` |
|
85 | * :file:`/home/{user}/.rhoderc` | |
86 | * :file:`/home/{user}/.rccontrol/cache/MANIFEST` |
|
86 | * :file:`/home/{user}/.rccontrol/cache/MANIFEST` | |
87 |
|
87 | |||
88 | For more information, see the :ref:`config-files` section. |
|
88 | For more information, see the :ref:`config-files` section. | |
89 |
|
89 | |||
90 | Log Files |
|
90 | Log Files | |
91 | --------- |
|
91 | --------- | |
92 |
|
92 | |||
93 | * :file:`/home/{user}/.rccontrol/{instance-id}/enterprise.log` |
|
93 | * :file:`/home/{user}/.rccontrol/{instance-id}/enterprise.log` | |
94 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.log` |
|
94 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.log` | |
95 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.log` |
|
95 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.log` | |
96 | * :file:`/tmp/rccontrol.log` |
|
96 | * :file:`/tmp/rccontrol.log` | |
97 | * :file:`/tmp/rhodecode_tools.log` |
|
97 | * :file:`/tmp/rhodecode_tools.log` | |
98 |
|
98 | |||
99 | Storage Files |
|
99 | Storage Files | |
100 | ------------- |
|
100 | ------------- | |
101 |
|
101 | |||
102 | * :file:`/home/{user}/.rccontrol/{instance-id}/data/index/{index-file.toc}` |
|
102 | * :file:`/home/{user}/.rccontrol/{instance-id}/data/index/{index-file.toc}` | |
103 | * :file:`/home/{user}/repos/.rc_gist_store` |
|
103 | * :file:`/home/{user}/repos/.rc_gist_store` | |
104 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.db` |
|
104 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.db` | |
105 | * :file:`/opt/rhodecode/store/{unique-hash}` |
|
105 | * :file:`/opt/rhodecode/store/{unique-hash}` | |
106 |
|
106 | |||
107 | Default Repositories Location |
|
107 | Default Repositories Location | |
108 | ----------------------------- |
|
108 | ----------------------------- | |
109 |
|
109 | |||
110 | * :file:`/home/{user}/repos` |
|
110 | * :file:`/home/{user}/repos` | |
111 |
|
111 | |||
112 | Connection Methods |
|
112 | Connection Methods | |
113 | ------------------ |
|
113 | ------------------ | |
114 |
|
114 | |||
115 | * HTTPS |
|
115 | * HTTPS | |
116 | * SSH |
|
116 | * SSH | |
117 | * |RCE| API |
|
117 | * |RCE| API | |
118 |
|
118 | |||
119 | Internationalization Support |
|
119 | Internationalization Support | |
120 | ---------------------------- |
|
120 | ---------------------------- | |
121 |
|
121 | |||
122 | Currently available in the following languages, see `Transifex`_ for the |
|
122 | Currently available in the following languages, see `Transifex`_ for the | |
123 | latest details. If you want a new language added, please contact us. To |
|
123 | latest details. If you want a new language added, please contact us. To | |
124 | configure your language settings, see the :ref:`set-lang` section. |
|
124 | configure your language settings, see the :ref:`set-lang` section. | |
125 |
|
125 | |||
126 | .. hlist:: |
|
126 | .. hlist:: | |
127 |
|
127 | |||
128 | * Belorussian |
|
128 | * Belorussian | |
129 | * Chinese |
|
129 | * Chinese | |
130 | * French |
|
130 | * French | |
131 | * German |
|
131 | * German | |
132 | * Italian |
|
132 | * Italian | |
133 | * Japanese |
|
133 | * Japanese | |
134 | * Portuguese |
|
134 | * Portuguese | |
135 | * Polish |
|
135 | * Polish | |
136 | * Russian |
|
136 | * Russian | |
137 | * Spanish |
|
137 | * Spanish | |
138 |
|
138 | |||
139 | Licencing Information |
|
139 | Licencing Information | |
140 | --------------------- |
|
140 | --------------------- | |
141 |
|
141 | |||
142 | * See licencing information `here`_ |
|
142 | * See licencing information `here`_ | |
143 |
|
143 | |||
144 | Peer-to-peer Failover Support |
|
144 | Peer-to-peer Failover Support | |
145 | ----------------------------- |
|
145 | ----------------------------- | |
146 |
|
146 | |||
147 | * Yes |
|
147 | * Yes | |
148 |
|
148 | |||
149 | Additional Binaries |
|
149 | Additional Binaries | |
150 | ------------------- |
|
150 | ------------------- | |
151 |
|
151 | |||
152 | * Yes, see :ref:`rhodecode-nix-ref` for full details. |
|
152 | * Yes, see :ref:`rhodecode-nix-ref` for full details. | |
153 |
|
153 | |||
154 | Remote Connectivity |
|
154 | Remote Connectivity | |
155 | ------------------- |
|
155 | ------------------- | |
156 |
|
156 | |||
157 | * Available |
|
157 | * Available | |
158 |
|
158 | |||
159 | Executable Files |
|
159 | Executable Files | |
160 | ---------------- |
|
160 | ---------------- | |
161 |
|
161 | |||
162 | Windows: :file:`RhodeCode-installer-{version}.exe` |
|
162 | Windows: :file:`RhodeCode-installer-{version}.exe` | |
163 |
|
163 | |||
164 | Deprecated Support |
|
164 | Deprecated Support | |
165 | ------------------ |
|
165 | ------------------ | |
166 |
|
166 | |||
167 | - Internet Explorer 8 support deprecated since version 3.7.0. |
|
167 | - Internet Explorer 8 support deprecated since version 3.7.0. | |
168 | - Internet Explorer 9 support deprecated since version 3.8.0. |
|
168 | - Internet Explorer 9 support deprecated since version 3.8.0. | |
169 |
|
169 | |||
170 | .. _here: https://rhodecode.com/licenses/ |
|
170 | .. _here: https://rhodecode.com/licenses/ | |
171 | .. _Transifex: https://www.transifex.com/projects/p/RhodeCode/ |
|
171 | .. _Transifex: https://www.transifex.com/projects/p/RhodeCode/ |
@@ -1,578 +1,578 b'' | |||||
1 | .. _tools-cli: |
|
1 | .. _tools-cli: | |
2 |
|
2 | |||
3 | |RCT| CLI |
|
3 | |RCT| CLI | |
4 | --------- |
|
4 | --------- | |
5 |
|
5 | |||
6 | The commands available with |RCT| can be split into three categories: |
|
6 | The commands available with |RCT| can be split into three categories: | |
7 |
|
7 | |||
8 | - Remotely executable commands that can be run from your local machine once you |
|
8 | - Remotely executable commands that can be run from your local machine once you | |
9 | have your connection details to |RCE| configured. |
|
9 | have your connection details to |RCE| configured. | |
10 | - Locally executable commands the can be run on the server to carry out |
|
10 | - Locally executable commands the can be run on the server to carry out | |
11 | general maintenance. |
|
11 | general maintenance. | |
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 | rhodecode-tools |
|
15 | rhodecode-tools | |
16 | --------------- |
|
16 | --------------- | |
17 |
|
17 | |||
18 | Use |RCT| to setup automation, run the indexer, and install extensions for |
|
18 | Use |RCT| to setup automation, run the indexer, and install extensions for | |
19 | your |RCE| instances. Options: |
|
19 | your |RCE| instances. Options: | |
20 |
|
20 | |||
21 | .. rst-class:: dl-horizontal |
|
21 | .. rst-class:: dl-horizontal | |
22 |
|
22 | |||
23 | \ - -apihost <api_host> |
|
23 | \ - -apihost <api_host> | |
24 | Set the API host value. |
|
24 | Set the API host value. | |
25 |
|
25 | |||
26 | \ - -apikey <apikey_value> |
|
26 | \ - -apikey <apikey_value> | |
27 | Set the API key value. |
|
27 | Set the API key value. | |
28 |
|
28 | |||
29 | \-c, - -config <config_file> |
|
29 | \-c, - -config <config_file> | |
30 | Create a configuration file. The default file is created |
|
30 | Create a configuration file. The default file is created | |
31 | in ``~/.rhoderc`` |
|
31 | in ``~/.rhoderc`` | |
32 |
|
32 | |||
33 | \ - -save-config |
|
33 | \ - -save-config | |
34 | Save the configuration file. |
|
34 | Save the configuration file. | |
35 |
|
35 | |||
36 | \ - -show-config |
|
36 | \ - -show-config | |
37 | Show the current configuration values. |
|
37 | Show the current configuration values. | |
38 |
|
38 | |||
39 | \ - -format {json,pretty} |
|
39 | \ - -format {json,pretty} | |
40 | Set the formatted representation. |
|
40 | Set the formatted representation. | |
41 |
|
41 | |||
42 | Example usage: |
|
42 | Example usage: | |
43 |
|
43 | |||
44 | .. code-block:: bash |
|
44 | .. code-block:: bash | |
45 |
|
45 | |||
46 | $ rhodecode-tools --apikey=key --apihost=http://rhodecode.server \ |
|
46 | $ rhodecode-tools --apikey=key --apihost=http://rhodecode.server \ | |
47 | --save-config |
|
47 | --save-config | |
48 |
|
48 | |||
49 | rhodecode-api |
|
49 | rhodecode-api | |
50 | ------------- |
|
50 | ------------- | |
51 |
|
51 | |||
52 | The RhodeCode API lets you connect to |RCE| and carry out management tasks from a |
|
52 | The RhodeCode API lets you connect to |RCE| and carry out management tasks from a | |
53 | remote machine, for more information about the API, see the :ref:`api`. To |
|
53 | remote machine, for more information about the API, see the :ref:`api`. To | |
54 | pass arguments on the command-line use the ``method:option`` syntax. |
|
54 | pass arguments on the command-line use the ``method:option`` syntax. | |
55 |
|
55 | |||
56 | Example usage: |
|
56 | Example usage: | |
57 |
|
57 | |||
58 | .. code-block:: bash |
|
58 | .. code-block:: bash | |
59 |
|
59 | |||
60 | # Run the get_repos API call and sample output |
|
60 | # Run the get_repos API call and sample output | |
61 | $ rhodecode-api --instance-name=enterprise-1 create_repo \ |
|
61 | $ rhodecode-api --instance-name=enterprise-1 create_repo \ | |
62 | repo_name:brand-new repo_type:hg description:repo-desc |
|
62 | repo_name:brand-new repo_type:hg description:repo-desc | |
63 |
|
63 | |||
64 | { |
|
64 | { | |
65 | "error": null, |
|
65 | "error": null, | |
66 | "id": 1110, |
|
66 | "id": 1110, | |
67 | "result": { |
|
67 | "result": { | |
68 | "msg": "Created new repository `brand-new`", |
|
68 | "msg": "Created new repository `brand-new`", | |
69 | "success": true, |
|
69 | "success": true, | |
70 | "task": null |
|
70 | "task": null | |
71 | } |
|
71 | } | |
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | Options: |
|
74 | Options: | |
75 |
|
75 | |||
76 | .. rst-class:: dl-horizontal |
|
76 | .. rst-class:: dl-horizontal | |
77 |
|
77 | |||
78 | \ - -api-cache-only |
|
78 | \ - -api-cache-only | |
79 | Requires a cache to be present when running this call |
|
79 | Requires a cache to be present when running this call | |
80 |
|
80 | |||
81 | \ - -api-cache-rebuild |
|
81 | \ - -api-cache-rebuild | |
82 | Replaces existing cached values with new ones from server |
|
82 | Replaces existing cached values with new ones from server | |
83 |
|
83 | |||
84 | \ - -api-cache <PATH> |
|
84 | \ - -api-cache <PATH> | |
85 | Use a special cache dir to read responses from instead of the server |
|
85 | Use a special cache dir to read responses from instead of the server | |
86 |
|
86 | |||
87 | \ - -api-cert-verify |
|
87 | \ - -api-cert-verify | |
88 | Verify the endpoint ssl certificate |
|
88 | Verify the endpoint ssl certificate | |
89 |
|
89 | |||
90 | \ - -api-cert <PATH> |
|
90 | \ - -api-cert <PATH> | |
91 | Path to alternate CA bundle. |
|
91 | Path to alternate CA bundle. | |
92 |
|
92 | |||
93 | \ - -apihost <api_host> |
|
93 | \ - -apihost <api_host> | |
94 | Set the API host value. |
|
94 | Set the API host value. | |
95 |
|
95 | |||
96 | \ - -apikey <apikey_value> |
|
96 | \ - -apikey <apikey_value> | |
97 | Set the API key value. |
|
97 | Set the API key value. | |
98 |
|
98 | |||
99 | \ - -instance-name <instance-id> |
|
99 | \ - -instance-name <instance-id> | |
100 | Set the instance name |
|
100 | Set the instance name | |
101 |
|
101 | |||
102 | \-I, - -install-dir <DIR> |
|
102 | \-I, - -install-dir <DIR> | |
103 | Location of application instances |
|
103 | Location of application instances | |
104 |
|
104 | |||
105 | \-c, - -config <.rhoderc-file> |
|
105 | \-c, - -config <.rhoderc-file> | |
106 | Location of the :file:`.rhoderc` |
|
106 | Location of the :file:`.rhoderc` | |
107 |
|
107 | |||
108 | \-F, - -format {json,pretty} |
|
108 | \-F, - -format {json,pretty} | |
109 | Set the formatted representation. |
|
109 | Set the formatted representation. | |
110 |
|
110 | |||
111 | \-h, - -help |
|
111 | \-h, - -help | |
112 | Show help messages. |
|
112 | Show help messages. | |
113 |
|
113 | |||
114 | \-v, - -verbose |
|
114 | \-v, - -verbose | |
115 | Enable verbose messaging |
|
115 | Enable verbose messaging | |
116 |
|
116 | |||
117 | rhodecode-cleanup-gists |
|
117 | rhodecode-cleanup-gists | |
118 | ----------------------- |
|
118 | ----------------------- | |
119 |
|
119 | |||
120 | Use this to delete gists within |RCE|. Options: |
|
120 | Use this to delete gists within |RCE|. Options: | |
121 |
|
121 | |||
122 | .. rst-class:: dl-horizontal |
|
122 | .. rst-class:: dl-horizontal | |
123 |
|
123 | |||
124 | \-c, - -config <config_file> |
|
124 | \-c, - -config <config_file> | |
125 | Set the file path to the configuration file. The default file is |
|
125 | Set the file path to the configuration file. The default file is | |
126 | :file:`/home/{user}/.rhoderc` |
|
126 | :file:`/home/{user}/.rhoderc` | |
127 |
|
127 | |||
128 | \ - -corrupted |
|
128 | \ - -corrupted | |
129 | Remove gists with corrupted metadata. |
|
129 | Remove gists with corrupted metadata. | |
130 |
|
130 | |||
131 | \ - -dont-ask |
|
131 | \ - -dont-ask | |
132 | Remove gists without asking for confirmation. |
|
132 | Remove gists without asking for confirmation. | |
133 |
|
133 | |||
134 | \-h, - -help |
|
134 | \-h, - -help | |
135 | Show help messages. current configuration values. |
|
135 | Show help messages. current configuration values. | |
136 |
|
136 | |||
137 | \ - -instance-name <instance-id> |
|
137 | \ - -instance-name <instance-id> | |
138 | Set the instance name. |
|
138 | Set the instance name. | |
139 |
|
139 | |||
140 | \-R, - -repo-dir |
|
140 | \-R, - -repo-dir | |
141 | Set the repository file path. |
|
141 | Set the repository file path. | |
142 |
|
142 | |||
143 | \ - -version |
|
143 | \ - -version | |
144 | Display your |RCT| version. |
|
144 | Display your |RCT| version. | |
145 |
|
145 | |||
146 | Example usage: |
|
146 | Example usage: | |
147 |
|
147 | |||
148 | .. code-block:: bash |
|
148 | .. code-block:: bash | |
149 |
|
149 | |||
150 | # Clean up gists related to an instance |
|
150 | # Clean up gists related to an instance | |
151 | $ rhodecode-cleanup-gists --instance-name=enterprise-1 |
|
151 | $ rhodecode-cleanup-gists --instance-name=enterprise-1 | |
152 | Scanning for gists in /home/brian/repos/.rc_gist_store... |
|
152 | Scanning for gists in /home/brian/repos/.rc_gist_store... | |
153 | preparing to remove [3] found gists |
|
153 | preparing to remove [3] found gists | |
154 |
|
154 | |||
155 | # Clean up corrupted gists in an instance |
|
155 | # Clean up corrupted gists in an instance | |
156 | $ rhodecode-cleanup-gists --instance-name=enterprise-1 --corrupted |
|
156 | $ rhodecode-cleanup-gists --instance-name=enterprise-1 --corrupted | |
157 | Scanning for gists in /home/brian/repos/.rc_gist_store... |
|
157 | Scanning for gists in /home/brian/repos/.rc_gist_store... | |
158 | preparing to remove [2] found gists |
|
158 | preparing to remove [2] found gists | |
159 | the following gists will be archived: |
|
159 | the following gists will be archived: | |
160 | * EXPIRED: BAD METADATA | /home/brian/repos/.rc_gist_store/5 |
|
160 | * EXPIRED: BAD METADATA | /home/brian/repos/.rc_gist_store/5 | |
161 | * EXPIRED: BAD METADATA | /home/brian/repos/.rc_gist_store/8FtC |
|
161 | * EXPIRED: BAD METADATA | /home/brian/repos/.rc_gist_store/8FtC | |
162 | are you sure you want to archive them? [y/N]: y |
|
162 | are you sure you want to archive them? [y/N]: y | |
163 | removing gist /home/brian/repos/.rc_gist_store/5 |
|
163 | removing gist /home/brian/repos/.rc_gist_store/5 | |
164 | removing gist /home/brian/repos/.rc_gist_store/8FtCKdcbRKmEvRzTVsEt |
|
164 | removing gist /home/brian/repos/.rc_gist_store/8FtCKdcbRKmEvRzTVsEt | |
165 |
|
165 | |||
166 | rhodecode-cleanup-repos |
|
166 | rhodecode-cleanup-repos | |
167 | ----------------------- |
|
167 | ----------------------- | |
168 |
|
168 | |||
169 | Use this to manage |repos| and |repo| groups within |RCE|. Options: |
|
169 | Use this to manage |repos| and |repo| groups within |RCE|. Options: | |
170 |
|
170 | |||
171 | .. rst-class:: dl-horizontal |
|
171 | .. rst-class:: dl-horizontal | |
172 |
|
172 | |||
173 | \-c, - -config <config_file> |
|
173 | \-c, - -config <config_file> | |
174 | Set the file path to the configuration file. The default file is |
|
174 | Set the file path to the configuration file. The default file is | |
175 | :file:`/home/{user}/.rhoderc`. |
|
175 | :file:`/home/{user}/.rhoderc`. | |
176 |
|
176 | |||
177 | \-h, - -help |
|
177 | \-h, - -help | |
178 | Show help messages. current configuration values. |
|
178 | Show help messages. current configuration values. | |
179 |
|
179 | |||
180 | \ - -interactive |
|
180 | \ - -interactive | |
181 | Enable an interactive prompt for each repository when deleting. |
|
181 | Enable an interactive prompt for each repository when deleting. | |
182 |
|
182 | |||
183 | \ - -include-groups |
|
183 | \ - -include-groups | |
184 | Remove repository groups. |
|
184 | Remove repository groups. | |
185 |
|
185 | |||
186 | \ - -instance-name <instance-id> |
|
186 | \ - -instance-name <instance-id> | |
187 | Set the instance name. |
|
187 | Set the instance name. | |
188 |
|
188 | |||
189 | \ - -list-only |
|
189 | \ - -list-only | |
190 | Display repositories selected for deletion. |
|
190 | Display repositories selected for deletion. | |
191 |
|
191 | |||
192 | \ - -older-than <str> |
|
192 | \ - -older-than <str> | |
193 | Delete repositories older that a specified time. |
|
193 | Delete repositories older that a specified time. | |
194 | You can use the following suffixes; d for days, h for hours, |
|
194 | You can use the following suffixes; d for days, h for hours, | |
195 | m for minutes, s for seconds. |
|
195 | m for minutes, s for seconds. | |
196 |
|
196 | |||
197 | \-R, - -repo-dir |
|
197 | \-R, - -repo-dir | |
198 | Set the repository file path |
|
198 | Set the repository file path | |
199 |
|
199 | |||
200 | Example usage: |
|
200 | Example usage: | |
201 |
|
201 | |||
202 | .. code-block:: bash |
|
202 | .. code-block:: bash | |
203 |
|
203 | |||
204 | # Cleaning up repos using tools installed with RCE 350 and above |
|
204 | # Cleaning up repos using tools installed with RCE 350 and above | |
205 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-cleanup-repos \ |
|
205 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-cleanup-repos \ | |
206 | --instance-name=enterprise-4 --older-than=1d |
|
206 | --instance-name=enterprise-4 --older-than=1d | |
207 | Scanning for repositories in /home/brian/repos... |
|
207 | Scanning for repositories in /home/brian/repos... | |
208 | preparing to remove [2] found repositories older than 1 day, 0:00:00 (1d) |
|
208 | preparing to remove [2] found repositories older than 1 day, 0:00:00 (1d) | |
209 |
|
209 | |||
210 | the following repositories will be deleted completely: |
|
210 | the following repositories will be deleted completely: | |
211 | * REMOVED: 2015-08-05 00:23:18 | /home/brian/repos/rm__20150805_002318_831 |
|
211 | * REMOVED: 2015-08-05 00:23:18 | /home/brian/repos/rm__20150805_002318_831 | |
212 | * REMOVED: 2015-08-04 01:22:10 | /home/brian/repos/rm__20150804_012210_336 |
|
212 | * REMOVED: 2015-08-04 01:22:10 | /home/brian/repos/rm__20150804_012210_336 | |
213 | are you sure you want to remove them? [y/N]: |
|
213 | are you sure you want to remove them? [y/N]: | |
214 |
|
214 | |||
215 | # Clean up repos older than 1 year |
|
215 | # Clean up repos older than 1 year | |
216 | # If using virtualenv and pre RCE 350 tools installation |
|
216 | # If using virtualenv and pre RCE 350 tools installation | |
217 | (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \ |
|
217 | (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \ | |
218 | --older-than=365d |
|
218 | --older-than=365d | |
219 |
|
219 | |||
220 | Scanning for repositories in /home/brian/repos... |
|
220 | Scanning for repositories in /home/brian/repos... | |
221 | preparing to remove [343] found repositories older than 365 days |
|
221 | preparing to remove [343] found repositories older than 365 days | |
222 |
|
222 | |||
223 | # clean up repos older than 3 days |
|
223 | # clean up repos older than 3 days | |
224 | # If using virtualenv and pre RCE 350 tools installation |
|
224 | # If using virtualenv and pre RCE 350 tools installation | |
225 | (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \ |
|
225 | (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \ | |
226 | --older-than=3d |
|
226 | --older-than=3d | |
227 | Scanning for repositories in /home/brian/repos... |
|
227 | Scanning for repositories in /home/brian/repos... | |
228 | preparing to remove [3] found repositories older than 3 days |
|
228 | preparing to remove [3] found repositories older than 3 days | |
229 |
|
229 | |||
230 | .. _tools-config: |
|
230 | .. _tools-config: | |
231 |
|
231 | |||
232 | rhodecode-config |
|
232 | rhodecode-config | |
233 | ---------------- |
|
233 | ---------------- | |
234 |
|
234 | |||
235 | Use this to create or update a |RCE| configuration file on the local machine. |
|
235 | Use this to create or update a |RCE| configuration file on the local machine. | |
236 |
|
236 | |||
237 | .. rst-class:: dl-horizontal |
|
237 | .. rst-class:: dl-horizontal | |
238 |
|
238 | |||
239 | \- -filename </path/to/config_file> |
|
239 | \- -filename </path/to/config_file> | |
240 | Set the file path to the |RCE| configuration file. |
|
240 | Set the file path to the |RCE| configuration file. | |
241 |
|
241 | |||
242 | \- -show-defaults |
|
242 | \- -show-defaults | |
243 | Display the defaults set in the |RCE| configuration file. |
|
243 | Display the defaults set in the |RCE| configuration file. | |
244 |
|
244 | |||
245 | \- -update |
|
245 | \- -update | |
246 | Update the configuration with the new settings passed on the command |
|
246 | Update the configuration with the new settings passed on the command | |
247 | line. |
|
247 | line. | |
248 |
|
248 | |||
249 | .. code-block:: bash |
|
249 | .. code-block:: bash | |
250 |
|
250 | |||
251 | # Create a new config file |
|
251 | # Create a new config file | |
252 | $ rhodecode-config --filename=dev.ini |
|
252 | $ rhodecode-config --filename=dev.ini | |
253 | Wrote new config file in /Users/user/dev.ini |
|
253 | Wrote new config file in /Users/user/dev.ini | |
254 |
|
254 | |||
255 | # Update config value for given section: |
|
255 | # Update config value for given section: | |
256 | $ rhodecode-config --update --filename=prod.ini [handler_console]level=INFO |
|
256 | $ rhodecode-config --update --filename=prod.ini [handler_console]level=INFO | |
257 |
|
257 | |||
258 | $ rhodecode-config --filename=dev.ini --show-defaults |
|
258 | $ rhodecode-config --filename=dev.ini --show-defaults | |
259 | lang=en |
|
259 | lang=en | |
260 | cpu_number=4 |
|
260 | cpu_number=4 | |
261 | uuid=<function <lambda> at 0x10d86ac08> |
|
261 | uuid=<function <lambda> at 0x10d86ac08> | |
262 | license_token=ff1e-aa9c-bb66-11e5 |
|
262 | license_token=ff1e-aa9c-bb66-11e5 | |
263 | host=127.0.0.1 |
|
263 | host=127.0.0.1 | |
264 | here=/Users/brian |
|
264 | here=/Users/brian | |
265 | error_aggregation_service=None |
|
265 | error_aggregation_service=None | |
266 | database_url=sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
266 | database_url=sqlite:///%(here)s/rhodecode.db?timeout=30 | |
267 | git_path=git |
|
267 | git_path=git | |
268 | http_server=waitress |
|
268 | http_server=waitress | |
269 | port=5000 |
|
269 | port=5000 | |
270 |
|
270 | |||
271 | .. _tools-rhodecode-extensions: |
|
271 | .. _tools-rhodecode-extensions: | |
272 |
|
272 | |||
273 | rhodecode-extensions |
|
273 | rhodecode-extensions | |
274 | -------------------- |
|
274 | -------------------- | |
275 |
|
275 | |||
276 | The `rcextensions` since version 4.14 are now shipped together with |RCE| please check |
|
276 | The `rcextensions` since version 4.14 are now shipped together with |RCE| please check | |
277 | the using :ref:`integrations-rcextensions` section. |
|
277 | the using :ref:`integrations-rcextensions` section. | |
278 |
|
278 | |||
279 |
|
279 | |||
280 | rhodecode-gist |
|
280 | rhodecode-gist | |
281 | -------------- |
|
281 | -------------- | |
282 |
|
282 | |||
283 | Use this to create, list, show, or delete gists within |RCE|. Options: |
|
283 | Use this to create, list, show, or delete gists within |RCE|. Options: | |
284 |
|
284 | |||
285 | .. rst-class:: dl-horizontal |
|
285 | .. rst-class:: dl-horizontal | |
286 |
|
286 | |||
287 | \ - -api-cache-only |
|
287 | \ - -api-cache-only | |
288 | Requires a cache to be present when running this call |
|
288 | Requires a cache to be present when running this call | |
289 |
|
289 | |||
290 | \ - -api-cache-rebuild |
|
290 | \ - -api-cache-rebuild | |
291 | Replaces existing cached values with new ones from server |
|
291 | Replaces existing cached values with new ones from server | |
292 |
|
292 | |||
293 | \ - -api-cache PATH |
|
293 | \ - -api-cache PATH | |
294 | Use a special cache dir to read responses from instead of the server |
|
294 | Use a special cache dir to read responses from instead of the server | |
295 |
|
295 | |||
296 | \ - -api-cert-verify |
|
296 | \ - -api-cert-verify | |
297 | Verify the endpoint ssl certificate |
|
297 | Verify the endpoint ssl certificate | |
298 |
|
298 | |||
299 | \ - -api-cert PATH |
|
299 | \ - -api-cert PATH | |
300 | Path to alternate CA bundle. |
|
300 | Path to alternate CA bundle. | |
301 |
|
301 | |||
302 | \ - -apihost <api_host> |
|
302 | \ - -apihost <api_host> | |
303 | Set the API host value. |
|
303 | Set the API host value. | |
304 |
|
304 | |||
305 | \ - -apikey <apikey_value> |
|
305 | \ - -apikey <apikey_value> | |
306 | Set the API key value. |
|
306 | Set the API key value. | |
307 |
|
307 | |||
308 | \-c, - -config <config_file> |
|
308 | \-c, - -config <config_file> | |
309 | Create a configuration file. |
|
309 | Create a configuration file. | |
310 | The default file is created in :file:`~/.rhoderc` |
|
310 | The default file is created in :file:`~/.rhoderc` | |
311 |
|
311 | |||
312 | \ - -create <gistname> |
|
312 | \ - -create <gistname> | |
313 | create the gist |
|
313 | create the gist | |
314 |
|
314 | |||
315 | \-d, - -description <str> |
|
315 | \-d, - -description <str> | |
316 | Set gist description |
|
316 | Set gist description | |
317 |
|
317 | |||
318 | \ - -delete <gistid> |
|
318 | \ - -delete <gistid> | |
319 | Delete the gist |
|
319 | Delete the gist | |
320 |
|
320 | |||
321 | \-f, - -file |
|
321 | \-f, - -file | |
322 | Specify the filename The file extension will enable syntax highlighting. |
|
322 | Specify the filename The file extension will enable syntax highlighting. | |
323 |
|
323 | |||
324 | \-F, - -format {json,pretty} |
|
324 | \-F, - -format {json,pretty} | |
325 | Set the formatted representation. |
|
325 | Set the formatted representation. | |
326 |
|
326 | |||
327 | \ - -help |
|
327 | \ - -help | |
328 | Show help messages. |
|
328 | Show help messages. | |
329 |
|
329 | |||
330 | \-I, - -install-dir <DIR> |
|
330 | \-I, - -install-dir <DIR> | |
331 | Location of application instances |
|
331 | Location of application instances | |
332 |
|
332 | |||
333 | \ - -instance-name <instance-id> |
|
333 | \ - -instance-name <instance-id> | |
334 | Set the instance name. |
|
334 | Set the instance name. | |
335 |
|
335 | |||
336 | \ - -list |
|
336 | \ - -list | |
337 | Display instance gists. |
|
337 | Display instance gists. | |
338 |
|
338 | |||
339 | \-l, --lifetime <minutes> |
|
339 | \-l, --lifetime <minutes> | |
340 | Set the gist lifetime. The default value is (-1) forever |
|
340 | Set the gist lifetime. The default value is (-1) forever | |
341 |
|
341 | |||
342 | \ - -show <gistname> |
|
342 | \ - -show <gistname> | |
343 | Show the content of the gist |
|
343 | Show the content of the gist | |
344 |
|
344 | |||
345 | \-o, - -open |
|
345 | \-o, - -open | |
346 | After creating Gist open it in browser |
|
346 | After creating Gist open it in browser | |
347 |
|
347 | |||
348 | \-p, - -private |
|
348 | \-p, - -private | |
349 | Create a private gist |
|
349 | Create a private gist | |
350 |
|
350 | |||
351 | \ - -version |
|
351 | \ - -version | |
352 | Display your |RCT| version. |
|
352 | Display your |RCT| version. | |
353 |
|
353 | |||
354 | Example usage: |
|
354 | Example usage: | |
355 |
|
355 | |||
356 | .. code-block:: bash |
|
356 | .. code-block:: bash | |
357 |
|
357 | |||
358 | # List the gists in an instance |
|
358 | # List the gists in an instance | |
359 | (venv)brian@ubuntu:~$ rhodecode-gist --instance-name=enterprise-1 list |
|
359 | (venv)brian@ubuntu:~$ rhodecode-gist --instance-name=enterprise-1 list | |
360 | { |
|
360 | { | |
361 | "error": null, |
|
361 | "error": null, | |
362 | "id": 7102, |
|
362 | "id": 7102, | |
363 | "result": [ |
|
363 | "result": [ | |
364 | { |
|
364 | { | |
365 | "access_id": "2", |
|
365 | "access_id": "2", | |
366 | "content": null, |
|
366 | "content": null, | |
367 | "created_on": "2015-01-19T12:52:26.494", |
|
367 | "created_on": "2015-01-19T12:52:26.494", | |
368 | "description": "A public gust", |
|
368 | "description": "A public gust", | |
369 | "expires": -1.0, |
|
369 | "expires": -1.0, | |
370 | "gist_id": 2, |
|
370 | "gist_id": 2, | |
371 | "type": "public", |
|
371 | "type": "public", | |
372 | "url": "http://127.0.0.1:10003/_admin/gists/2" |
|
372 | "url": "http://127.0.0.1:10003/_admin/gists/2" | |
373 | }, |
|
373 | }, | |
374 | { |
|
374 | { | |
375 | "access_id": "7gs6BsSEC4pKUEPLz5AB", |
|
375 | "access_id": "7gs6BsSEC4pKUEPLz5AB", | |
376 | "content": null, |
|
376 | "content": null, | |
377 | "created_on": "2015-01-19T11:27:40.812", |
|
377 | "created_on": "2015-01-19T11:27:40.812", | |
378 | "description": "Gist testing API", |
|
378 | "description": "Gist testing API", | |
379 | "expires": -1.0, |
|
379 | "expires": -1.0, | |
380 | "gist_id": 1, |
|
380 | "gist_id": 1, | |
381 | "type": "private", |
|
381 | "type": "private", | |
382 | "url": "http://127.0.0.1:10003/_admin/gists/7gs6BsSEC4pKUEPLz5AB" |
|
382 | "url": "http://127.0.0.1:10003/_admin/gists/7gs6BsSEC4pKUEPLz5AB" | |
383 | } |
|
383 | } | |
384 | ] |
|
384 | ] | |
385 | } |
|
385 | } | |
386 |
|
386 | |||
387 | # delete a particular gist |
|
387 | # delete a particular gist | |
388 | # You use the access_id to specify the gist to delete |
|
388 | # You use the access_id to specify the gist to delete | |
389 | (venv)brian@ubuntu:~$ rhodecode-gist delete 2 --instance-name=enterprise-1 |
|
389 | (venv)brian@ubuntu:~$ rhodecode-gist delete 2 --instance-name=enterprise-1 | |
390 | { |
|
390 | { | |
391 | "error": null, |
|
391 | "error": null, | |
392 | "id": 6284, |
|
392 | "id": 6284, | |
393 | "result": { |
|
393 | "result": { | |
394 | "gist": null, |
|
394 | "gist": null, | |
395 | "msg": "deleted gist ID:2" |
|
395 | "msg": "deleted gist ID:2" | |
396 | } |
|
396 | } | |
397 | } |
|
397 | } | |
398 |
|
398 | |||
399 | # cat a file and pipe to new gist |
|
399 | # cat a file and pipe to new gist | |
400 | # This is if you are using virtualenv |
|
400 | # This is if you are using virtualenv | |
401 | (venv)$ cat ~/.rhoderc | rhodecode-gist --instance-name=enterprise-1 \ |
|
401 | (venv)$ cat ~/.rhoderc | rhodecode-gist --instance-name=enterprise-1 \ | |
402 | -d '.rhoderc copy' create |
|
402 | -d '.rhoderc copy' create | |
403 |
|
403 | |||
404 | { |
|
404 | { | |
405 | "error": null, |
|
405 | "error": null, | |
406 | "id": 5374, |
|
406 | "id": 5374, | |
407 | "result": { |
|
407 | "result": { | |
408 | "gist": { |
|
408 | "gist": { | |
409 | "access_id": "7", |
|
409 | "access_id": "7", | |
410 | "content": null, |
|
410 | "content": null, | |
411 | "created_on": "2015-01-26T11:31:58.774", |
|
411 | "created_on": "2015-01-26T11:31:58.774", | |
412 | "description": ".rhoderc copy", |
|
412 | "description": ".rhoderc copy", | |
413 | "expires": -1.0, |
|
413 | "expires": -1.0, | |
414 | "gist_id": 7, |
|
414 | "gist_id": 7, | |
415 | "type": "public", |
|
415 | "type": "public", | |
416 | "url": "http://127.0.0.1:10003/_admin/gists/7" |
|
416 | "url": "http://127.0.0.1:10003/_admin/gists/7" | |
417 | }, |
|
417 | }, | |
418 | "msg": "created new gist" |
|
418 | "msg": "created new gist" | |
419 | } |
|
419 | } | |
420 | } |
|
420 | } | |
421 |
|
421 | |||
422 | # Cat a file and pipe to gist |
|
422 | # Cat a file and pipe to gist | |
423 | # in RCE 3.5.0 tools and above |
|
423 | # in RCE 3.5.0 tools and above | |
424 | $ cat ~/.rhoderc | ~/.rccontrol/{instance-id}/profile/bin/rhodecode-gist \ |
|
424 | $ cat ~/.rhoderc | ~/.rccontrol/{instance-id}/profile/bin/rhodecode-gist \ | |
425 | --instance-name=enterprise-4 -d '.rhoderc copy' create |
|
425 | --instance-name=enterprise-4 -d '.rhoderc copy' create | |
426 | { |
|
426 | { | |
427 | "error": null, |
|
427 | "error": null, | |
428 | "id": 9253, |
|
428 | "id": 9253, | |
429 | "result": { |
|
429 | "result": { | |
430 | "gist": { |
|
430 | "gist": { | |
431 | "access_id": "4", |
|
431 | "access_id": "4", | |
432 | "acl_level": "acl_public", |
|
432 | "acl_level": "acl_public", | |
433 | "content": null, |
|
433 | "content": null, | |
434 | "created_on": "2015-08-20T05:54:11.250", |
|
434 | "created_on": "2015-08-20T05:54:11.250", | |
435 | "description": ".rhoderc copy", |
|
435 | "description": ".rhoderc copy", | |
436 | "expires": -1.0, |
|
436 | "expires": -1.0, | |
437 | "gist_id": 4, |
|
437 | "gist_id": 4, | |
438 | "modified_at": "2015-08-20T05:54:11.250", |
|
438 | "modified_at": "2015-08-20T05:54:11.250", | |
439 | "type": "public", |
|
439 | "type": "public", | |
440 | "url": "http://127.0.0.1:10000/_admin/gists/4" |
|
440 | "url": "http://127.0.0.1:10000/_admin/gists/4" | |
441 | }, |
|
441 | }, | |
442 | "msg": "created new gist" |
|
442 | "msg": "created new gist" | |
443 | } |
|
443 | } | |
444 | } |
|
444 | } | |
445 |
|
445 | |||
446 |
|
446 | |||
447 | rhodecode-index |
|
447 | rhodecode-index | |
448 | --------------- |
|
448 | --------------- | |
449 |
|
449 | |||
450 | More detailed information regarding setting up the indexer is available in |
|
450 | More detailed information regarding setting up the indexer is available in | |
451 | the :ref:`indexing-ref` section. Options: |
|
451 | the :ref:`indexing-ref` section. Options: | |
452 |
|
452 | |||
453 | .. rst-class:: dl-horizontal |
|
453 | .. rst-class:: dl-horizontal | |
454 |
|
454 | |||
455 | \ - -api-cache-only |
|
455 | \ - -api-cache-only | |
456 | Requires a cache to be present when running this call |
|
456 | Requires a cache to be present when running this call | |
457 |
|
457 | |||
458 | \ - -api-cache-rebuild |
|
458 | \ - -api-cache-rebuild | |
459 | Replaces existing cached values with new ones from server |
|
459 | Replaces existing cached values with new ones from server | |
460 |
|
460 | |||
461 | \ - -api-cache PATH |
|
461 | \ - -api-cache PATH | |
462 | Use a special cache dir to read responses from instead of the server |
|
462 | Use a special cache dir to read responses from instead of the server | |
463 |
|
463 | |||
464 | \ - -api-cert-verify |
|
464 | \ - -api-cert-verify | |
465 | Verify the endpoint ssl certificate |
|
465 | Verify the endpoint ssl certificate | |
466 |
|
466 | |||
467 | \ - -api-cert PATH |
|
467 | \ - -api-cert PATH | |
468 | Path to alternate CA bundle. |
|
468 | Path to alternate CA bundle. | |
469 |
|
469 | |||
470 | \ - -apihost <api_host> |
|
470 | \ - -apihost <api_host> | |
471 | Set the API host value. |
|
471 | Set the API host value. | |
472 |
|
472 | |||
473 | \ - -apikey <apikey_value> |
|
473 | \ - -apikey <apikey_value> | |
474 | Set the API key value. |
|
474 | Set the API key value. | |
475 |
|
475 | |||
476 | \-c, --config <config_file> |
|
476 | \-c, --config <config_file> | |
477 | Create a configuration file. |
|
477 | Create a configuration file. | |
478 | The default file is created in :file:`~/.rhoderc` |
|
478 | The default file is created in :file:`~/.rhoderc` | |
479 |
|
479 | |||
480 | \ - -create-mapping <PATH> |
|
480 | \ - -create-mapping <PATH> | |
481 | Creates an example mapping configuration for indexer. |
|
481 | Creates an example mapping configuration for indexer. | |
482 |
|
482 | |||
483 | \-F, - -format {json,pretty} |
|
483 | \-F, - -format {json,pretty} | |
484 | Set the formatted representation. |
|
484 | Set the formatted representation. | |
485 |
|
485 | |||
486 | \-h, - -help |
|
486 | \-h, - -help | |
487 | Show help messages. |
|
487 | Show help messages. | |
488 |
|
488 | |||
489 | \ - -instance-name <instance-id> |
|
489 | \ - -instance-name <instance-id> | |
490 | Set the instance name |
|
490 | Set the instance name | |
491 |
|
491 | |||
492 | \-I, - -install-dir <DIR> |
|
492 | \-I, - -install-dir <DIR> | |
493 | Location of application instances |
|
493 | Location of application instances | |
494 |
|
494 | |||
495 | \-m, - -mapping <file_name> |
|
495 | \-m, - -mapping <file_name> | |
496 | Parse the output to the .ini mapping file. |
|
496 | Parse the output to the .ini mapping file. | |
497 |
|
497 | |||
498 | \ - -optimize |
|
498 | \ - -optimize | |
499 | Optimize index for performance by amalgamating multiple index files |
|
499 | Optimize index for performance by amalgamating multiple index files | |
500 | into one. Greatly increases incremental indexing speed. |
|
500 | into one. Greatly increases incremental indexing speed. | |
501 |
|
501 | |||
502 | \-R, - -repo-dir <DIRECTORY> |
|
502 | \-R, - -repo-dir <DIRECTORY> | |
503 | Location of repositories |
|
503 | Location of repositories | |
504 |
|
504 | |||
505 | \ - -source <PATH> |
|
505 | \ - -source <PATH> | |
506 | Use a special source JSON file to feed the indexer |
|
506 | Use a special source JSON file to feed the indexer | |
507 |
|
507 | |||
508 | \ - -version |
|
508 | \ - -version | |
509 | Display your |RCT| version. |
|
509 | Display your |RCT| version. | |
510 |
|
510 | |||
511 | Example usage: |
|
511 | Example usage: | |
512 |
|
512 | |||
513 | .. code-block:: bash |
|
513 | .. code-block:: bash | |
514 |
|
514 | |||
515 | # Run the indexer |
|
515 | # Run the indexer | |
516 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ |
|
516 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ | |
517 | --instance-name=enterprise-4 |
|
517 | --instance-name=enterprise-4 | |
518 |
|
518 | |||
519 | # Run indexer based on mapping.ini file |
|
519 | # Run indexer based on search_mapping.ini file | |
520 | # This is using pre-350 virtualenv |
|
520 | # This is using pre-350 virtualenv | |
521 | (venv)$ rhodecode-index --instance-name=enterprise-1 |
|
521 | (venv)$ rhodecode-index --instance-name=enterprise-1 | |
522 |
|
522 | |||
523 | # Index from the command line without creating |
|
523 | # Index from the command line without creating | |
524 | # the .rhoderc file |
|
524 | # the .rhoderc file | |
525 | $ rhodecode-index --apikey=key --apihost=http://rhodecode.server \ |
|
525 | $ rhodecode-index --apikey=key --apihost=http://rhodecode.server \ | |
526 | --instance-name=enterprise-2 --save-config |
|
526 | --instance-name=enterprise-2 --save-config | |
527 |
|
527 | |||
528 | # Create the indexing mapping file |
|
528 | # Create the indexing mapping file | |
529 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ |
|
529 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ | |
530 | --create-mapping mapping.ini --instance-name=enterprise-4 |
|
530 | --create-mapping search_mapping.ini --instance-name=enterprise-4 | |
531 |
|
531 | |||
532 | .. _tools-rhodecode-list-instance: |
|
532 | .. _tools-rhodecode-list-instance: | |
533 |
|
533 | |||
534 | rhodecode-list-instances |
|
534 | rhodecode-list-instances | |
535 | ------------------------ |
|
535 | ------------------------ | |
536 |
|
536 | |||
537 | Use this command to list the instance details configured in the |
|
537 | Use this command to list the instance details configured in the | |
538 | :file:`~/.rhoderc` file. |
|
538 | :file:`~/.rhoderc` file. | |
539 |
|
539 | |||
540 | .. code-block:: bash |
|
540 | .. code-block:: bash | |
541 |
|
541 | |||
542 | $ .rccontrol/enterprise-1/profile/bin/rhodecode-list-instances |
|
542 | $ .rccontrol/enterprise-1/profile/bin/rhodecode-list-instances | |
543 | [instance:production] - Config only |
|
543 | [instance:production] - Config only | |
544 | API-HOST: https://some.url.com |
|
544 | API-HOST: https://some.url.com | |
545 | API-KEY: some.auth.token |
|
545 | API-KEY: some.auth.token | |
546 |
|
546 | |||
547 | [instance:development] - Config only |
|
547 | [instance:development] - Config only | |
548 | API-HOST: http://some.ip.address |
|
548 | API-HOST: http://some.ip.address | |
549 | API-KEY: some.auth.token |
|
549 | API-KEY: some.auth.token | |
550 |
|
550 | |||
551 |
|
551 | |||
552 | .. _tools-setup-config: |
|
552 | .. _tools-setup-config: | |
553 |
|
553 | |||
554 | rhodecode-setup-config |
|
554 | rhodecode-setup-config | |
555 | ---------------------- |
|
555 | ---------------------- | |
556 |
|
556 | |||
557 | Use this command to create the ``~.rhoderc`` file required by |RCT| to access |
|
557 | Use this command to create the ``~.rhoderc`` file required by |RCT| to access | |
558 | remote instances. |
|
558 | remote instances. | |
559 |
|
559 | |||
560 | .. rst-class:: dl-horizontal |
|
560 | .. rst-class:: dl-horizontal | |
561 |
|
561 | |||
562 | \- -instance-name <name> |
|
562 | \- -instance-name <name> | |
563 | Specify the instance name in the :file:`~/.rhoderc` |
|
563 | Specify the instance name in the :file:`~/.rhoderc` | |
564 |
|
564 | |||
565 | \api_host <hostname> |
|
565 | \api_host <hostname> | |
566 | Create a configuration file. The default file is created |
|
566 | Create a configuration file. The default file is created | |
567 | in ``~/.rhoderc`` |
|
567 | in ``~/.rhoderc`` | |
568 |
|
568 | |||
569 | \api_key <auth-token> |
|
569 | \api_key <auth-token> | |
570 | Create a configuration file. The default file is created |
|
570 | Create a configuration file. The default file is created | |
571 | in ``~/.rhoderc`` |
|
571 | in ``~/.rhoderc`` | |
572 |
|
572 | |||
573 |
|
573 | |||
574 | .. code-block:: bash |
|
574 | .. code-block:: bash | |
575 |
|
575 | |||
576 | (venv)$ rhodecode-setup-config --instance-name=tea api_host=URL api_key=xyz |
|
576 | (venv)$ rhodecode-setup-config --instance-name=tea api_host=URL api_key=xyz | |
577 | Config not found under /Users/username/.rhoderc, creating a new one |
|
577 | Config not found under /Users/username/.rhoderc, creating a new one | |
578 | Wrote new configuration into /Users/username/.rhoderc |
|
578 | Wrote new configuration into /Users/username/.rhoderc |
General Comments 0
You need to be logged in to leave comments.
Login now