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