Merge pull request !2770 from rhodecode-enterprise-ce feature/docs-fixes
Changes from branch: Feature/docs fixes
This commit is contained in:
commit
b60eba1a40
29 changed files with 196 additions and 479 deletions
12
docs/.howto
12
docs/.howto
|
|
@ -1,6 +1,10 @@
|
|||
## BUILD
|
||||
# cd docs
|
||||
# docker build --tag sphinx-doc-build-rc .
|
||||
## BUILD Image for building docs and push to rhodecode registry
|
||||
|
||||
cd docs
|
||||
docker buildx build --platform linux/amd64 --tag rhodecode/sphinx-doc-build .
|
||||
|
||||
# Build Docs
|
||||
# cd .. && docker run --rm -v $(pwd):/project --workdir=/project/docs sphinx-doc-build-rc make clean html
|
||||
# run from the project root dir; not docs dir
|
||||
|
||||
docker run --rm -v $PWD:/project --workdir=/project/docs rhodecode/sphinx-doc-build make clean html SPHINXOPTS="-W"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use the following instructions:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol restart enterprise-1
|
||||
$ ./rcstack stack rhodecode restart
|
||||
|
||||
4. You will see the labs setting on the
|
||||
:menuselection:`Admin --> Settings --> labs` page.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Here is how to force delete a repository and remove all dependent objects
|
|||
:dedent: 1
|
||||
|
||||
# starts the ishell interactive prompt
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
:dedent: 1
|
||||
|
|
@ -57,9 +57,7 @@ Each lines should represent a single name e.g `repo_name_1` or `repo_group/repo_
|
|||
Run this line from CLI to execute the code from the `repo_delete_task.py` file and
|
||||
exit the ishell after the execution::
|
||||
|
||||
echo "%run repo_delete_task.py" | rccontrol ishell enterprise-1
|
||||
|
||||
|
||||
echo "%run repo_delete_task.py" | ./rcstack cli ishell --no-tty
|
||||
|
||||
|
||||
Bulk edit permissions for all repositories or groups
|
||||
|
|
@ -74,7 +72,7 @@ the permissions onto *all* repositories and/or repository groups.
|
|||
:dedent: 1
|
||||
|
||||
# starts the ishell interactive prompt
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
|
||||
2a) Add user called 'admin' into all repositories with write permission.
|
||||
|
|
|
|||
|
|
@ -30,3 +30,4 @@ The following are the most common system administration tasks.
|
|||
system_admin/enable-debug
|
||||
system_admin/admin-tricks
|
||||
system_admin/cleanup-cmds
|
||||
system_admin/apply-license-ishell
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Configuration Files
|
|||
|
||||
* :file:`config/_shared/rhodecode.ini`
|
||||
* :file:`/home/{user}/.rccontrol/{instance-id}/search_mapping.ini`
|
||||
* :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`
|
||||
* :file:`config/_shared/vcsserver.ini`
|
||||
* :file:`/home/{user}/.rccontrol/supervisor/supervisord.ini`
|
||||
* :file:`/home/{user}/.rccontrol.ini`
|
||||
* :file:`/home/{user}/.rhoderc`
|
||||
|
|
|
|||
|
|
@ -203,9 +203,7 @@ do this, use the following steps.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol restart enterprise-2
|
||||
Instance "enterprise-2" successfully stopped.
|
||||
Instance "enterprise-2" successfully started.
|
||||
$ ./rcstack stack rhodecode restart
|
||||
|
||||
.. image:: ../../images/language.png
|
||||
|
||||
|
|
@ -254,7 +252,7 @@ ishell interface should be used.
|
|||
.. code-block:: bash
|
||||
|
||||
# Open iShell from the terminal
|
||||
$ rccontrol ishell enterprise-1/community-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -277,7 +275,7 @@ do run this script the interactive ishell interface should be used.
|
|||
.. code-block:: bash
|
||||
|
||||
# Open iShell from the terminal
|
||||
$ rccontrol ishell enterprise-1/community-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
|
||||
.. code-block:: python
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ Below config if for an Apache Reverse Proxy configuration.
|
|||
# Increase headers size for large Mercurial headers sent with many branches
|
||||
LimitRequestLine 16380
|
||||
|
||||
# Url to running RhodeCode instance. This is shown as `- URL:` when
|
||||
# running rccontrol status.
|
||||
# Url to running RhodeCode instance. This is shown as `running hostname:` when
|
||||
# running ./rcstack status
|
||||
|
||||
ProxyPass / http://127.0.0.1:10002/ connectiontimeout=7200 timeout=7200 Keepalive=On
|
||||
ProxyPassReverse / http://127.0.0.1:10002/
|
||||
|
|
|
|||
39
docs/admin/system_admin/apply-license-ishell.rst
Normal file
39
docs/admin/system_admin/apply-license-ishell.rst
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
.. _apply-license-ishell:
|
||||
|
||||
Apply license from ishell
|
||||
=========================
|
||||
|
||||
From the server RhodeCode Enterprise is running run ishell on the instance which we want to apply the license to:
|
||||
|
||||
.. code-block:: bash
|
||||
:dedent: 1
|
||||
|
||||
# starts the ishell interactive prompt
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
|
||||
This will open an ishell interactive console. Inside the console execute the following:
|
||||
|
||||
.. code-block:: python
|
||||
:dedent: 1
|
||||
|
||||
In [1]: from rc_license.models import apply_license
|
||||
In [2]: license = """
|
||||
...: PASTE LICENSE HERE
|
||||
...: """
|
||||
In [3]: apply_license(license)
|
||||
Out[3]: True
|
||||
In [4]: Session().commit()
|
||||
exit
|
||||
|
||||
The paste license should look similar to the below
|
||||
|
||||
.. code-block:: python
|
||||
:dedent: 1
|
||||
|
||||
In [2]: license = """
|
||||
...: eyJ2YWxpZF90aWxsIjogMTUwNTQ5NTUwMS40MzE4MzMsICJsYXN0X25hbWUiOiAic2QiLCAidmVyIjog
|
||||
...: MiwgInVzZXJzIjogMjUsICJjb21wYW55IjogImQiLCAic2lnbmF0dXJlIjogIkZQYTdhcWlBeUFDejFW
|
||||
...: YkthNlMyVUkzc09zN0k5eFpyb1BTTTRUdVUvZHlQK2lUTUdaeEgybTJvbFJ0MU1CbWVEQlVKR1ZhUUVW
|
||||
...: RHNNR1hvWDR3RExQUGszS0ZDckoxQU1NWWhGa0ZwUEFmTDViUTMrQ2Z2d1VkMzR4ZDM3OERZbzdaRHJs
|
||||
...: """
|
||||
|
|
@ -33,28 +33,12 @@ sections.
|
|||
|
||||
\- **vcsserver.ini**
|
||||
Default location:
|
||||
:file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`
|
||||
:file:`config/_shared/vcsserver.ini`
|
||||
|
||||
The VCS Server handles the connection between your |repos| and |RCE|.
|
||||
See the :ref:`vcs-server` section for configuration options and more
|
||||
detailed information.
|
||||
|
||||
\- **supervisord.ini**
|
||||
Default location:
|
||||
:file:`/home/{user}/.rccontrol/supervisor/supervisord.ini`
|
||||
|
||||
|RCC| uses Supervisor to monitor and manage installed instances of
|
||||
|RCE| and the VCS Server. |RCC| will manage this file completely,
|
||||
unless you install |RCE| in self-managed mode. For more information,
|
||||
see the :ref:`Supervisor Setup<control:supervisor-setup>` section.
|
||||
|
||||
\- **.rccontrol.ini**
|
||||
Default location: :file:`/home/{user}/.rccontrol.ini`
|
||||
|
||||
This file contains the instances that |RCC| starts at boot, which is all
|
||||
by default, but for more information, see
|
||||
the :ref:`Manually Start At Boot <control:set-start-boot>` section.
|
||||
|
||||
\- **.rhoderc**
|
||||
Default location: :file:`/home/{user}/.rhoderc`
|
||||
|
||||
|
|
@ -62,13 +46,3 @@ sections.
|
|||
remote machine. The API checks this file for connection and
|
||||
authentication details. For more details, see the :ref:`config-rhoderc`
|
||||
section.
|
||||
|
||||
\- **MANIFEST**
|
||||
Default location: :file:`/home/{user}/.rccontrol/cache/MANIFEST`
|
||||
|
||||
|RCC| uses this file to source the latest available builds from the
|
||||
secure RhodeCode download channels. The only reason to mess with this file
|
||||
is if you need to do an offline installation,
|
||||
see the :ref:`Offline Installation<control:offline-installer-ref>`
|
||||
instructions, otherwise |RCC| will completely manage this file.
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ in the :file:`config/_shared/rhodecode.ini` file. To
|
|||
do this, use the following steps
|
||||
|
||||
1. Open the file and set the ``debug`` line to ``true``
|
||||
2. Restart you instance using the ``rccontrol restart`` command,
|
||||
2. Restart you instance using the ``./rcstack stack rhodecode restart`` command,
|
||||
see the following example:
|
||||
|
||||
.. code-block:: ini
|
||||
|
|
@ -29,9 +29,7 @@ do this, use the following steps
|
|||
.. code-block:: bash
|
||||
|
||||
# Restart your instance
|
||||
$ rccontrol restart enterprise-1
|
||||
Instance "enterprise-1" successfully stopped.
|
||||
Instance "enterprise-1" successfully started.
|
||||
$ ./rcstack stack rhodecode restart
|
||||
|
||||
|
||||
Debug and Logging Configuration
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ without a need to use HTTP server like Nginx or Apache. To Configure
|
|||
SSL support directly with :term:`Gunicorn` you need to simply add the key
|
||||
and certificate paths to your configuration file.
|
||||
|
||||
1. Open the :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
1. Open the:file:`config/_shared/rhodecode.ini` file.
|
||||
2. In the ``[server:main]`` section, add two new variables
|
||||
called `certfile` and `keyfile`.
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ and certificate paths to your configuration file.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol restart enterprise-1
|
||||
$ ./rcstack stack rhodecode restart
|
||||
|
||||
After this is enabled you can *only* access your instances via https://
|
||||
protocol. Check out more docs here `Gunicorn SSL Docs`_
|
||||
|
|
|
|||
|
|
@ -3,14 +3,9 @@
|
|||
Full-text Search
|
||||
----------------
|
||||
|
||||
.. important::
|
||||
|
||||
Some parts of this page refers to legacy components like rccontrol
|
||||
We are in process of updating documentantion with up-to-date information
|
||||
|
||||
|
||||
RhodeCode provides a full text search capabilities to search inside file content,
|
||||
commit message, and file paths (This featureis only available in Enterprise edition).
|
||||
commit message, and file paths (This feature is only available in Enterprise edition).
|
||||
Indexing is not enabled by default and to use full text search building an index is a pre-requisite.
|
||||
|
||||
|RCE| provides support for `ElasticSearch 8`_ as a backend to index |repos|.
|
||||
|
|
@ -20,7 +15,7 @@ See :ref:`enable-elasticsearch` for details.
|
|||
Indexing
|
||||
^^^^^^^^
|
||||
|
||||
To run the indexer you need to have an |authtoken| with admin rights to all |repos|.
|
||||
To run the indexer you need to have an generated |authtoken| with admin rights to all |repos|.
|
||||
|
||||
To index repositories stored in RhodeCode, you have the option to set the indexer up in a
|
||||
number of ways, for example:
|
||||
|
|
@ -57,7 +52,7 @@ Configure the ``.rhoderc`` File
|
|||
.. note::
|
||||
|
||||
Optionally it's possible to use indexer without the ``.rhoderc``. Simply instead of
|
||||
executing with `--instance-name=enterprise-1` execute providing the host and token
|
||||
executing with `--instance-name=rcstack-instance` execute providing the host and token
|
||||
directly: `--api-host=http://127.0.0.1:10000 --api-key=<auth-token-goes-here>`
|
||||
|
||||
|
||||
|
|
@ -68,26 +63,53 @@ details for each instance you want to index.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
# Check the instance details
|
||||
# of the instance you want to index
|
||||
$ rccontrol status
|
||||
|
||||
- NAME: enterprise-1
|
||||
- STATUS: RUNNING
|
||||
- TYPE: Enterprise
|
||||
- VERSION: 4.1.0
|
||||
- URL: http://127.0.0.1:10003
|
||||
# Get the status of each instance you wish to use with Tools
|
||||
$ ./rcstack status
|
||||
|
||||
RCSTACK: v5.27.3, running hostname: http://code.rhodecode.com
|
||||
|
||||
|
||||
To get your API Token, on the |RCE| interface go to
|
||||
:menuselection:`username --> My Account --> Auth tokens`
|
||||
|
||||
|
||||
Given we're running rcstack, lets create the configuration file using docker mounts
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./rcstack cli cmd rhodecode-tools setup-config \
|
||||
--filename=/vol/confvolume/.rhoderc \
|
||||
--instance-name=rcstack-instance \
|
||||
api_host=https://code.rhodecode.com,api_key=secret-api-key
|
||||
|
||||
|
||||
Let's verify created config using list-instances command
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./rcstack cli cmd rhodecode-tools list-instances --config=/vol/confvolume/.rhoderc
|
||||
*Volumes*:
|
||||
attaching /mnt/mac/Users/marcin/workspace/rhodecode-enterprise-docker/config/_shared under: /vol/confvolume
|
||||
|
||||
ENTRYPOINT: Running rhodecode_vcsserver with cmd 'rhodecode-tools'
|
||||
checking if config files needs bootstrapping
|
||||
|
||||
[instance:rcstack-instance] - Config only
|
||||
API-HOST: https://code.rhodecode.com
|
||||
API-KEY: secret-api-key
|
||||
|
||||
|
||||
This is how the file should look like
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
# Configure .rhoderc with matching details
|
||||
# This allows the indexer to connect to the instance
|
||||
[instance:enterprise-1]
|
||||
api_host = http://127.0.0.1:10000
|
||||
api_key = <auth token goes here>
|
||||
[instance:rcstack-instance]
|
||||
api_host = http://code.rhodecode.com
|
||||
api_key = secret-api-key
|
||||
|
||||
|
||||
|
||||
.. _run-index:
|
||||
|
|
@ -95,35 +117,28 @@ To get your API Token, on the |RCE| interface go to
|
|||
Run the Indexer
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Run the indexer using the following command, and specify the instance you want to index:
|
||||
Run the indexer using the following command, and specify the instance you want to index against:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Using default simples indexing of all repositories
|
||||
$ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \
|
||||
--instance-name=enterprise-1
|
||||
# Using default simples indexing of all repositories
|
||||
./rcstack cli cmd rhodecode-index \
|
||||
--config=/vol/confvolume/.rhoderc \
|
||||
--instance-name=rcstack-instance \
|
||||
--engine-location=http://elasticsearch-host:9200
|
||||
|
||||
# Using a custom mapping file with indexing rules, and using elasticsearch 6 backend
|
||||
$ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \
|
||||
--instance-name=enterprise-1 \
|
||||
--mapping=/home/user/.rccontrol/enterprise-1/search_mapping.ini \
|
||||
--es-version=6 --engine-location=http://elasticsearch-host:9200
|
||||
# Create a custom mapping (search_mapping.ini) rules file for detailed indexing invocation
|
||||
./rcstack cli cmd rhodecode-index \
|
||||
--config=/vol/confvolume/.rhoderc \
|
||||
--instance-name=rcstack-instance \
|
||||
--create-mapping=/vol/confvolume/search_mapping.ini
|
||||
|
||||
# Using a custom mapping file and invocation without ``.rhoderc``
|
||||
$ /home/user/.rccontrol/enterprise-1/profile/bin/rhodecode-index \
|
||||
--api-host=http://rhodecodecode.myserver.com --api-key=xxxxx \
|
||||
--mapping=/home/user/.rccontrol/enterprise-1/search_mapping.ini
|
||||
|
||||
# From inside a virtualev on your local machine or CI server.
|
||||
(venv)$ rhodecode-index --instance-name=enterprise-1
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
In case of often indexing the index may become fragmented. Most often a result of that
|
||||
is error about `too many open files`. To fix this indexer needs to be executed with
|
||||
--optimize flag. E.g `rhodecode-index --instance-name=enterprise-1 --optimize`
|
||||
This should be executed regularly, once a week is recommended.
|
||||
# Using a custom mapping file with indexing rules
|
||||
./rcstack cli cmd rhodecode-index \
|
||||
--config=/vol/confvolume/.rhoderc \
|
||||
--instance-name=rcstack-instance \
|
||||
--engine-location=http://elasticsearch-host:9200 \
|
||||
--mapping=/vol/confvolume/search_mapping.ini
|
||||
|
||||
|
||||
.. _set-index:
|
||||
|
|
@ -147,18 +162,14 @@ your |RCT| virtualenv using the following steps.
|
|||
# put this example into the crontab
|
||||
|
||||
# Run the indexer daily at 4am using the default mapping settings
|
||||
* 4 * * * /home/ubuntu/.virtualenv/rhodecode-venv/bin/rhodecode-index \
|
||||
--instance-name=enterprise-1
|
||||
* 4 * * * <CMD FOR INDEXING GOES HERE>
|
||||
|
||||
# Run the indexer every Sunday at 3am using default mapping
|
||||
* 3 * * 0 /home/ubuntu/.virtualenv/rhodecode-venv/bin/rhodecode-index \
|
||||
--instance-name=enterprise-1
|
||||
* 3 * * 0 <CMD FOR INDEXING GOES HERE>
|
||||
|
||||
# Run the indexer every 15 minutes
|
||||
# using a specially configured mapping file
|
||||
*/15 * * * * ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \
|
||||
--instance-name=enterprise-4 \
|
||||
--mapping=/home/user/.rccontrol/enterprise-4/search_mapping.ini
|
||||
*/15 * * * * <CMD FOR INDEXING GOES HERE>
|
||||
|
||||
.. _advanced-indexing:
|
||||
|
||||
|
|
@ -174,7 +185,7 @@ or to remove some indexed secrets, or files. There's a special `--repo-name=` fl
|
|||
for the indexer that limits execution to a single repository. For example to force-reindex
|
||||
single repository such call can be made::
|
||||
|
||||
rhodecode-index --instance-name=enterprise-1 --force --repo-name=rhodecode-vcsserver
|
||||
./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --force --repo-name=rhodecode-vcsserver
|
||||
|
||||
|
||||
Removing repositories from index
|
||||
|
|
@ -185,7 +196,7 @@ In the same way if a listed repository in mapping.ini is not reported existing b
|
|||
server it's removed from the index.
|
||||
In case that you wish to remove indexed repository manually such call would allow that::
|
||||
|
||||
rhodecode-index --instance-name=enterprise-1 --remove-only --repo-name=rhodecode-vcsserver
|
||||
./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --remove-only --repo-name=rhodecode-vcsserver
|
||||
|
||||
|
||||
Using search_mapping.ini file for advanced index rules
|
||||
|
|
@ -198,22 +209,16 @@ different flags such as `--max-filesize=2048kb` or `--repo-limit=10`
|
|||
For more advanced execution logic it's possible to use a configuration file that
|
||||
would define detailed rules which repositories and how should be indexed.
|
||||
|
||||
|RCT| provides an example index configuration file called :file:`search_mapping.ini`.
|
||||
This file is created by default during installation and is located at:
|
||||
|
||||
* :file:`/home/{user}/.rccontrol/{instance-id}/search_mapping.ini`, using default |RCT|.
|
||||
* :file:`~/venv/lib/python2.7/site-packages/rhodecode_tools/templates/mapping.ini`,
|
||||
when using ``virtualenv``.
|
||||
|
||||
.. note::
|
||||
|
||||
If you need to create the :file:`search_mapping.ini` file manually, use the |RCT|
|
||||
``rhodecode-index --create-mapping path/to/search_mapping.ini`` API call.
|
||||
``./rcstack cli cmd rhodecode-index --create-mapping=path/to/search_mapping.ini`` call.
|
||||
For details, see the :ref:`tools-cli` section.
|
||||
|
||||
To Run the indexer with mapping file provide it using `--mapping` flag::
|
||||
|
||||
rhodecode-index --instance-name=enterprise-1 --mapping=/my/path/search_mapping.ini
|
||||
./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --mapping=/my/path/search_mapping.ini
|
||||
|
||||
|
||||
Here's a detailed example of using :file:`search_mapping.ini` file.
|
||||
|
|
@ -309,41 +314,8 @@ There's a special flag to test the mapping file rules and list repositories that
|
|||
be indexed. Run the indexer with `--show-matched-repos` to list only the
|
||||
match repositories defined in .ini file rules::
|
||||
|
||||
rhodecode-index --instance-name=enterprise-1 --show-matched-repos --mapping=/my/path/search_mapping.ini
|
||||
./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --show-matched-repos --mapping=/my/path/search_mapping.ini
|
||||
|
||||
|
||||
.. _enable-elasticsearch:
|
||||
|
||||
Enabling ElasticSearch
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
ElasticSearch is available in EE edition only. It provides much scalable and more advanced
|
||||
search capabilities. New ElasticSearch also provides much more advanced query language.
|
||||
It allows advanced filtering by file paths, extensions, use OR statements, ranges etc.
|
||||
Please check query language examples in the search field for some advanced query language usage.
|
||||
|
||||
|
||||
1. Open the :file:`rhodecode.ini` file for the instance you wish to edit. The
|
||||
default location is
|
||||
:file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
|
||||
|
||||
2. Find the search configuration section and change it to:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
search.module = rc_elasticsearch
|
||||
search.location = http://elasticsearch:9200
|
||||
## specify Elastic Search version, 8 for latest
|
||||
search.es_version = 8
|
||||
|
||||
where ``search.location`` points to the ElasticSearch server
|
||||
by default running on port 9200.
|
||||
|
||||
Index invocation also needs change. Please provide --es-version= and
|
||||
--engine-location= parameters to define ElasticSearch server location and it's version.
|
||||
For example::
|
||||
|
||||
rhodecode-index --instance-name=enterprise-1 --es-version=8 --engine-location=http://elasticsearch:9200
|
||||
|
||||
|
||||
.. _ElasticSearch 8: https://www.elastic.co/
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ account permissions.
|
|||
.. code-block:: bash
|
||||
|
||||
# Open iShell from the terminal
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ following example to make changes to this table.
|
|||
.. code-block:: bash
|
||||
|
||||
# Open iShell from the terminal
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ Use the following code example to carry out these steps.
|
|||
.. code-block:: bash
|
||||
|
||||
# starts the ishell interactive prompt
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ Use the following code example to carry out these steps.
|
|||
.. code-block:: bash
|
||||
|
||||
# starts the ishell interactive prompt
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ Use the text which is shown after '#' sign, eg.
|
|||
.. code-block:: bash
|
||||
|
||||
# starts the ishell interactive prompt
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Configuring RhodeCode
|
|||
1. To configure path based permissions first we need to use a customized
|
||||
mod_dav_svn.conf.
|
||||
|
||||
Open :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
Open:file:`config/_shared/rhodecode.ini` file.
|
||||
And find `svn.proxy.config_template` setting. Now set a new path to read
|
||||
the template from. For example:
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ However sometimes it's better to manually set the number of workers.
|
|||
|
||||
To do this, use the following steps:
|
||||
|
||||
1. Open the :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
1. Open the:file:`config/_shared/rhodecode.ini` file.
|
||||
2. In the ``[server:main]`` section, change the number of Gunicorn
|
||||
``workers`` using the following default formula `(2 * Cores) + 1`.
|
||||
We however not recommend using more than 8-12 workers per server. It's better
|
||||
|
|
@ -78,7 +78,7 @@ To do this, use the following steps:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol restart '*'
|
||||
$ ./rcstack stack rhodecode down && ./rcstack stack rhodecode up -d
|
||||
|
||||
|
||||
Gunicorn Gevent Backend
|
||||
|
|
@ -94,7 +94,7 @@ handle using `Gevent`.
|
|||
To enable `Gevent` on |RCE| do the following:
|
||||
|
||||
|
||||
1. Open the :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
1. Open the:file:`config/_shared/rhodecode.ini` file.
|
||||
2. In the ``[server:main]`` section, change `worker_class` for Gunicorn.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ configure the Redis backend for VCSServer caches.
|
|||
Once configured, restart the VCS Server.
|
||||
|
||||
Make sure Redis is installed and running.
|
||||
Open :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`
|
||||
Open :file:`config/_shared/vcsserver.ini`
|
||||
file and ensure the below settings for `repo_object` type cache are set:
|
||||
|
||||
.. code-block:: ini
|
||||
|
|
@ -154,24 +154,11 @@ To clear the cache completely, you can restart the VCS Server.
|
|||
you only perform this when there is very little traffic on the instance.
|
||||
|
||||
Use the following example to restart your VCS Server,
|
||||
for full details see the :ref:`RhodeCode Control CLI <control:rcc-cli>`.
|
||||
|
||||
for full details see the :ref:`RhodeCode rcstack CLI <rcstack:cli-usage>`.
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol status
|
||||
$ ./rcstack stack rhodecode restart vcsserver
|
||||
|
||||
.. code-block:: vim
|
||||
|
||||
- NAME: vcsserver-1
|
||||
- STATUS: RUNNING
|
||||
logs:/home/ubuntu/.rccontrol/vcsserver-1/vcsserver.log
|
||||
- VERSION: 4.7.2 VCSServer
|
||||
- URL: http://127.0.0.1:10008
|
||||
- CONFIG: /home/ubuntu/.rccontrol/vcsserver-1/vcsserver.ini
|
||||
|
||||
$ rccontrol restart vcsserver-1
|
||||
Instance "vcsserver-1" successfully stopped.
|
||||
Instance "vcsserver-1" successfully started.
|
||||
|
||||
.. _vcs-server-config-file:
|
||||
|
||||
|
|
@ -181,7 +168,7 @@ VCS Server Configuration
|
|||
You can configure settings for multiple VCS Servers on your
|
||||
system using their individual configuration files. Use the following
|
||||
properties inside the configuration file to set up your system. The default
|
||||
location is :file:`home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`.
|
||||
location is :file:`config/_shared/vcsserver.ini`.
|
||||
For a more detailed explanation of the logger levers, see :ref:`debug-mode`.
|
||||
|
||||
.. rst-class:: dl-horizontal
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Here is how to set a repository group as personal for a user using ishell.
|
|||
.. code-block:: bash
|
||||
|
||||
# starts the ishell interactive prompt
|
||||
$ rccontrol ishell enterprise-1
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ This method simply enables SAML authentication for many users at once.
|
|||
From the server RhodeCode Enterprise is running run ishell on the instance which we
|
||||
want to apply the SAML migration::
|
||||
|
||||
./rcstack cli ishell
|
||||
$ ./rcstack cli ishell
|
||||
|
||||
Follow these steps to enable SAML authentication for multiple users.
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ following instructions.
|
|||
If you wish to have integrations working correctly via SSH please configure
|
||||
The Application base_url.
|
||||
|
||||
Use the ``rccontrol status`` command to view instance details.
|
||||
Use the ``./rcstack status`` command to view instance details.
|
||||
Hostname is required for the integration to properly set the instance URL.
|
||||
|
||||
When your hostname is known (e.g https://code.rhodecode.com) please set it
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ extensions = [
|
|||
]
|
||||
|
||||
intersphinx_mapping = {
|
||||
"enterprise": ("https://docs.rhodecode.com/RhodeCode-Enterprise/", None),
|
||||
"rcstack": ("https://docs.rhodecode.com/rcstack/", None),
|
||||
"enterprise": ("https://docs.rhodecode.com/5.x/rce/", None),
|
||||
"rcstack": ("https://docs.rhodecode.com/5.x/rcstack/", None),
|
||||
"control": ("https://docs.rhodecode.com/RhodeCode-Control/", None),
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ html_favicon = "images/favicon.ico"
|
|||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
html_static_path = ["_static"]
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
|
|
|
|||
29
docs/install/config-database.rst
Normal file
29
docs/install/config-database.rst
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
.. _config-database:
|
||||
|
||||
Change database connection details
|
||||
----------------------------------
|
||||
|
||||
If you need to change database connection details for a |RCEE| instance,
|
||||
use the following steps:
|
||||
|
||||
1. Open the :file:`rhodecode.ini` file for the instance you wish to edit. The
|
||||
default location is :file:`config/_shared/rhodecode.ini`
|
||||
|
||||
2. When you open the file, find the database configuration section, and use the below
|
||||
example to change the connection details:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
#########################################################
|
||||
### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
|
||||
#########################################################
|
||||
|
||||
# Default SQLite config
|
||||
sqlalchemy.db1.url = sqlite:////home/brian/.rccontrol/enterprise-1/rhodecode.db
|
||||
|
||||
# Use this example for a PostgreSQL
|
||||
sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
|
||||
|
||||
# see sqlalchemy docs for other advanced settings
|
||||
sqlalchemy.db1.echo = false
|
||||
sqlalchemy.db1.pool_recycle = 3600
|
||||
|
|
@ -44,8 +44,7 @@ In order to install and configure Celery, follow these steps:
|
|||
reconfiguration could cause scheduler issues.
|
||||
|
||||
|
||||
3. Configure Celery in the
|
||||
:file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
3. Configure Celery in the :file:`config/_shared/rhodecode.ini` file.
|
||||
Set the broker_url as minimal settings required to enable operation.
|
||||
If used our example data from pt 1a, here is how the broker url should look like::
|
||||
|
||||
|
|
|
|||
|
|
@ -11,3 +11,4 @@ the information in these sections to configure your instance of |RCE|.
|
|||
setup-email
|
||||
configure-celery
|
||||
migrate-repos
|
||||
config-database
|
||||
|
|
|
|||
|
|
@ -28,11 +28,9 @@ into the path where the rhodecode.ini file is located::
|
|||
rcextensions are loaded when |RCE| starts. So a restart is required after activation or
|
||||
change of code in rcextensions.
|
||||
|
||||
Simply restart only the enterprise/community instance::
|
||||
Simply restart only the rhodecode stack instances::
|
||||
|
||||
rccontrol restart enterprise-1
|
||||
or
|
||||
rccontrol restart community-1
|
||||
$ ./rcstack stack rhodecode restart
|
||||
|
||||
|
||||
Example usage
|
||||
|
|
|
|||
|
|
@ -18,19 +18,9 @@ and once configured see the :ref:`tools-cli` for more details.
|
|||
.. code-block:: bash
|
||||
|
||||
# Get the status of each instance you wish to use with Tools
|
||||
(venv)brian@ubuntu:~$ rccontrol status
|
||||
(venv)brian@ubuntu:~$ ./rcstack status
|
||||
|
||||
- NAME: momentum-1
|
||||
- STATUS: RUNNING
|
||||
- TYPE: Momentum
|
||||
- VERSION: 3.0.0-nightly-momentum
|
||||
- URL: http://127.0.0.1:10003
|
||||
|
||||
- NAME: momentum-3
|
||||
- STATUS: RUNNING
|
||||
- TYPE: Momentum
|
||||
- VERSION: 3.0.0-nightly-momentum
|
||||
- URL: http://127.0.0.1:10007
|
||||
RCSTACK: v5.27.3, running hostname: http://code.rhodecode.com
|
||||
|
||||
Example :file:`/home/{user}/.rhoderc` file.
|
||||
|
||||
|
|
@ -38,23 +28,22 @@ Example :file:`/home/{user}/.rhoderc` file.
|
|||
|
||||
# Configure the .rhoderc file for each instance
|
||||
# API keys found in your instance
|
||||
[instance:enterprise-1]
|
||||
api_host = http://127.0.0.1:10003/
|
||||
[instance:enterprise-main]
|
||||
api_host = http://code.rhodecode.com
|
||||
api_key = 91fdbdc257289c46633ef5aab274412911de1ba9
|
||||
repo_dir = /home/brian/repos
|
||||
|
||||
[instance:enterprise-3]
|
||||
api_host = http://127.0.0.1:10007/
|
||||
[instance:enterprise-ci]
|
||||
api_host = http://ci.rhodecode.com
|
||||
api_key = 5a925f65438d29f8d6ced8ab8e8c3d305998d1d9
|
||||
repo_dir = /home/brian/testing-repos/
|
||||
|
||||
|
||||
Example usage of |RCT| after |RCE| 3.5.0. From this version onwards |RCT| is
|
||||
packaged with |RCE| by default.
|
||||
Example usage of |RCT| after |RCE| 5.0.0.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ .rccontrol/enterprise-4/profile/bin/rhodecode-api --instance-name=enterprise-4 get_ip [11:56:57 on 05/10/2018]
|
||||
$ ./rcstack cli cmd rhodecode-api --instance-name=enterprise-main get_ip [11:56:57 on 05/10/2018]
|
||||
|
||||
{
|
||||
"error": null,
|
||||
|
|
|
|||
|
|
@ -1,103 +0,0 @@
|
|||
How To Use |AE| to Monitor |RCE|
|
||||
================================
|
||||
|
||||
* For cloud based monitoring using |AE|, `sign up for an account`_ first and
|
||||
get your user details.
|
||||
* For self hosted monitoring, you'll need to download and setup |AE| first.
|
||||
Contact support@rhodecode.com for more details.
|
||||
|
||||
|AE| Side Of The Setup
|
||||
----------------------
|
||||
|
||||
- From the interface, create an application for |AE| to monitor:
|
||||
:menuselection:`Settings --> Create Application`
|
||||
- Add in your |RCE| instance details.
|
||||
- Take note of the Public and Private API keys on the application page. You
|
||||
will need to add the private key to your |RCE| configuration file.
|
||||
|
||||
For more information, see the the |AE| documentation `here`_.
|
||||
|
||||
|RCE| Side Of The Setup
|
||||
-----------------------
|
||||
|
||||
Once you have your |AE| account details, configure the |RCE|
|
||||
:file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file with the
|
||||
following details to set up the connection between the two systems.
|
||||
|
||||
.. tip::
|
||||
|
||||
The section below should already be present in your configuration file if
|
||||
running a recent version of |RCE|.
|
||||
|
||||
* Enable the |AE| connection by setting ``appenlight = true``.
|
||||
* Set your |AE| URL using the ``appenlight.server_url = URL`` option.
|
||||
* Set your |AE| |authtoken| using the ``appenlight.api_key = TOKEN`` option.
|
||||
|
||||
.. code-block:: ini
|
||||
:emphasize-lines: 10,12,13
|
||||
|
||||
###################################
|
||||
## ERROR AND LOG HANDLING SYSTEM ##
|
||||
###################################
|
||||
|
||||
## Appenlight is tailored to work with RhodeCode, see
|
||||
## http://appenlight.com for details how to obtain an account
|
||||
## you must install python package `appenlight_client` to make it work
|
||||
|
||||
## appenlight enabled
|
||||
appenlight = false
|
||||
|
||||
appenlight.server_url = https://api.appenlight.com
|
||||
appenlight.api_key = YOUR_PRIVATE_API_KEY
|
||||
|
||||
## TWEAK AMOUNT OF INFO SENT HERE
|
||||
|
||||
## enables 404 error logging (default False)
|
||||
appenlight.report_404 = false
|
||||
|
||||
## time in seconds after request is considered being slow (default 1)
|
||||
appenlight.slow_request_time = 1
|
||||
|
||||
## record slow requests in application
|
||||
## (needs to be enabled for slow datastore recording and time tracking)
|
||||
appenlight.slow_requests = true
|
||||
|
||||
## enable hooking to application loggers
|
||||
appenlight.logging = true
|
||||
|
||||
## minimum log level for log capture
|
||||
appenlight.logging.level = WARNING
|
||||
|
||||
## send logs only from erroneous/slow requests
|
||||
## (saves API quota for intensive logging)
|
||||
appenlight.logging_on_error = false
|
||||
|
||||
## list of additonal keywords that should be grabbed from environ object
|
||||
## can be string with comma separated list of words in lowercase
|
||||
## (by default client will always send following info:
|
||||
## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
|
||||
## start with HTTP* this list be extended with additional keywords here
|
||||
appenlight.environ_keys_whitelist = ""
|
||||
|
||||
## list of keywords that should be blanked from request object
|
||||
## can be string with comma separated list of words in lowercase
|
||||
## (by default client will always blank keys that contain following words
|
||||
## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
|
||||
## this list be extended with additional keywords set here
|
||||
appenlight.request_keys_blacklist = ""
|
||||
|
||||
## list of namespaces that should be ignores when gathering log entries
|
||||
## can be string with comma separated list of namespaces
|
||||
## (by default the client ignores own entries: appenlight_client.client)
|
||||
appenlight.log_namespace_blacklist = ""
|
||||
|
||||
Verifying The Setup
|
||||
-------------------
|
||||
|
||||
Once |RCE| and |AE| are working together you will see the monitoring begin on
|
||||
your |AE| dashboard when you start carrying out actions in |RCE|.
|
||||
|
||||
.. image:: ../images/ae-verify.png
|
||||
|
||||
.. _sign up for an account: https://appenlight.rhodecode.com/
|
||||
.. _here: https://appenlight.rhodecode.com/page/api/main
|
||||
|
|
@ -7,7 +7,7 @@ If you wish to deploy your own |RCE| instance from something like a
|
|||
`Digital Ocean`_ droplet, or a `hetzner`_ server use the following
|
||||
instructions to get it setup.
|
||||
|
||||
I'm using an Ubuntu 14.04 image for the purposes of this
|
||||
I'm using an Ubuntu 22.04 image for the purposes of this
|
||||
tutorial, but all other Unix environments will be pretty similar. You can
|
||||
check out the full lists of supported platforms and versions in the
|
||||
:ref:`system-overview-ref` section.
|
||||
|
|
@ -17,7 +17,7 @@ Create a Digital Ocean Droplet
|
|||
------------------------------
|
||||
|
||||
1. Sign into Digital Ocean.
|
||||
2. Create a Droplet choosing Ubuntu 14.04 as your |os|.
|
||||
2. Create a Droplet choosing Ubuntu 22.04 as your |os|.
|
||||
3. (Optional) Add SSH keys if you have them set up.
|
||||
|
||||
Configure Your Server
|
||||
|
|
@ -34,181 +34,15 @@ host |RCE|.
|
|||
|
||||
$ ssh root@203.0.113.113
|
||||
|
||||
2. It is not advised to install |RCE| as the ``root`` user. So create a user
|
||||
with sudo permissions and then carry out the rest of the steps from that user
|
||||
account.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Create a user with sudo permissions
|
||||
root@rhodecode:~# sudo useradd -m -s /bin/bash -d /home/brian -U brian
|
||||
root@rhodecode:~# sudo usermod -a -G sudo brian
|
||||
|
||||
# Set the password for that user
|
||||
root@rhodecode:~# passwd brian
|
||||
Enter new UNIX password:
|
||||
Retype new UNIX password:
|
||||
passwd: password updated successfully
|
||||
|
||||
# Switch to that user for the rest of the steps
|
||||
root@rhodecode:~# su brian
|
||||
|
||||
# You should see your home dir change to what was set during installation
|
||||
brian@rhodecode:~$ cd ~
|
||||
brian@rhodecode:~$ pwd
|
||||
/home/brian
|
||||
|
||||
Once you have this set up, you are ready to install |RCC|.
|
||||
|
||||
Install |RCC|
|
||||
Install |RCS|
|
||||
-------------
|
||||
|
||||
|RCC| will install and manage the package dependencies for your |RCE| instance.
|
||||
|RCS| will install and manage the package dependencies for your |RCE| instance.
|
||||
|
||||
1. Download the |RCC| installer from https://rhodecode.com/download/
|
||||
2. Once downloaded to your computer, transfer the package to your server
|
||||
Please refer to this documentation for quick installation
|
||||
:ref:`Quick install tutorial <rcstack:quick_installation>`
|
||||
|
||||
.. note::
|
||||
|
||||
These steps happen on your computer, not on the server.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change to where the file is downloaded
|
||||
$ cd Downloads/
|
||||
|
||||
# SFTP to your server
|
||||
$ sftp brian@203.0.113.113
|
||||
|
||||
# Use mput to transfer the file
|
||||
sftp> mput RhodeCode-installer-linux-391_b1a804c4d69b_d6c087d520e3
|
||||
Uploading RhodeCode-installer-linux-391_b1a804c4d69b_d6c087d520e3 to /home/brian/RhodeCode-installer-linux-391_b1a804c4d69b_d6c087d520e3
|
||||
RhodeCode-installer-linux-391_b1a804c4d69b_d6c087d 100% 289MB 4.1MB/s 01:11
|
||||
sftp> exit
|
||||
|
||||
The |RCC| installer is now on your server, and you can read the full
|
||||
instructions here
|
||||
:ref:`Install RhodeCode Control <control:rcc-linux-ref>` ,
|
||||
but below is the example shortcut.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Check that the script is uploaded to your home directory
|
||||
$ ls -1
|
||||
RhodeCode-installer-linux-buildYYYYXXXX_ZZZZ
|
||||
|
||||
# Change the script permissions
|
||||
$ chmod +x RhodeCode-installer-linux*
|
||||
|
||||
# Run the installer and accept the prompts
|
||||
$ ./RhodeCode-installer-linux-*
|
||||
|
||||
.. important::
|
||||
|
||||
Once finished, exit the terminal and sign in again. This is to refresh you
|
||||
session to pick up the new commands.
|
||||
|
||||
Install |RCE|
|
||||
-------------
|
||||
|
||||
Now that |RCC| is installed, you can install |RCE|. For the full
|
||||
instructions, see
|
||||
:ref:`Install RhodeCode Enterprise <control:rce-cli-install-ref>`,
|
||||
but the below is an example shortcut.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Install a VCS Server and follow the prompts
|
||||
$ rccontrol install VCSServer --start-at-boot
|
||||
|
||||
Extracting VCSServer ...
|
||||
Configuring RhodeCode VCS Server ...
|
||||
Supervisord state is: RUNNING
|
||||
Added process group vcsserver-1
|
||||
|
||||
# Install a RhodeCode Enterprise instance and follow the prompts
|
||||
$ rccontrol install Enterprise --start-at-boot
|
||||
|
||||
Configuration of RhodeCode Enterprise passed.
|
||||
Supervisord state is: RUNNING
|
||||
Added process group enterprise-1
|
||||
|
||||
|RCE| is now installed on your server, and is running on the port displayed
|
||||
by the ``rccontrol status`` command.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
brian@rhodecode:~$ rccontrol status
|
||||
|
||||
- NAME: enterprise-1
|
||||
- STATUS: RUNNING
|
||||
- TYPE: Enterprise
|
||||
- VERSION: 3.1.1
|
||||
- URL: http://127.0.0.1:10002
|
||||
|
||||
- NAME: vcsserver-1
|
||||
- STATUS: RUNNING
|
||||
- TYPE: VCSServer
|
||||
- VERSION: 1.1.1
|
||||
- URL: http://127.0.0.1:10001
|
||||
|
||||
Serve |RCE| using Nginx
|
||||
-----------------------
|
||||
|
||||
Now that |RCE| is running, you need to use Nginx or Apache to serve it to
|
||||
users. For detailed instructions about setting up your webserver, see the
|
||||
:ref:`rhodecode-admin-ref` section. But the below shortcut should help serve
|
||||
it.
|
||||
|
||||
1. Install Nginx on your server.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Install nginx
|
||||
$ sudo apt-get install nginx
|
||||
|
||||
2. Create a virtual hosts file for RhodeCode Enterprise. Create
|
||||
the file in this location :file:`/etc/nginx/sites-available`. In this demo
|
||||
I have called it ``vcs.conf``
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Create the file
|
||||
$ sudo vi /etc/nginx/sites-available/vcs.conf
|
||||
|
||||
Use the following example to create yours.
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
# Change to your IP, or a domain name if you've set that up
|
||||
server_name 203.0.113.113 ;
|
||||
|
||||
location / {
|
||||
# Set this line to match the RhodeCode Enterprise Instance URL
|
||||
proxy_pass http://127.0.0.1:10002/;
|
||||
proxy_set_header Host $Host;
|
||||
proxy_buffering off;
|
||||
# Setting this to a high number allows large repo pushes
|
||||
client_max_body_size 4G;
|
||||
}
|
||||
}
|
||||
|
||||
3. Symlink the virtual hosts file to the ``sites-enabled`` folder,
|
||||
and then restart Nginx.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Symlink the virtual hosts file
|
||||
$ ln -s /etc/nginx/sites-available/vcs.conf /etc/nginx/sites-enabled/vcs.conf
|
||||
|
||||
# You can also delete the Nginx default symlink
|
||||
$ rm /etc/nginx/sites-enabled/default
|
||||
|
||||
# Restart Nginx
|
||||
$ sudo /etc/init.d/nginx restart
|
||||
* Restarting nginx nginx [ OK ]
|
||||
|
||||
Once restarted, you should see a clean |RCE| instance running on the IP
|
||||
address, or the domain you have set up.
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ from the same database using the following steps:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol restart enterprise-2
|
||||
$ ./rcstack stack rhodecode restart
|
||||
|
||||
If you wish to add additional performance to your setup, see the
|
||||
:ref:`rhodecode-tuning-ref` section.
|
||||
|
|
|
|||
|
|
@ -24,4 +24,3 @@ then please send a request to support@rhodecode.com
|
|||
branching-vs-bookmarking
|
||||
windows-to-linux
|
||||
dvcs-best-practices
|
||||
appenlight-setup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue