installation.rst
175 lines
| 5.9 KiB
| text/x-rst
|
RstLexer
r276 | .. _installation: | |||
=============== | ||||
Install rcstack | ||||
=============== | ||||
To get started with RhodeCode get the new shell installer called rcstack | ||||
.. code-block:: bash | ||||
mkdir docker-rhodecode && cd docker-rhodecode | ||||
r307 | curl -L -s -o rcstack https://dls.rhodecode.com/get-rcstack && chmod +x rcstack | |||
r276 | ./rcstack get-started | |||
r465 | .. note:: | |||
If you want to use certain installation channel. e.g latest vs stable you can use the special /get/ url | ||||
.. code-block:: bash | ||||
curl -L -s -o rcstack https://dls.rhodecode.com/get/master && chmod +x rcstack | ||||
Where 'master' is the git revision to be used. It can be 'stable', 'master', 'v5.8.0' or raw commit ID. | ||||
This ideally works with init + docker-revision flag | ||||
.. code-block:: bash | ||||
./rcstack init --docker-revision=master | ||||
r278 | rcstack is open-source and you can find source for it here: | |||
https://code.rhodecode.com/rhodecode-enterprise-docker | ||||
r276 | Pre requisites | |||
r278 | -------------- | |||
r276 | ||||
To Run this stack Docker engine and Docker Compose needs to be installed on the host machine. | ||||
Please run `./rcstack init` to install docker using the installer, or | ||||
visit docker site and install docker (min version 20.10) and docker compose: | ||||
- https://docs.docker.com/engine/install/ | ||||
- https://docs.docker.com/compose/install/ | ||||
r278 | If there's docker already installed, rcstack will detect that and skip docker installation. | |||
rcstack is using the below command to install docker, if you prefer to install it manually run it before and installer will skip docker installation | ||||
.. code-block:: bash | ||||
curl https://get.docker.com/ | sh | ||||
r276 | ||||
r407 | .. _quick_installation: | |||
r276 | ||||
Quick install tutorial | ||||
r278 | ---------------------- | |||
r276 | ||||
Those are step-by-step installation/run steps. | ||||
r278 | 1. **initialize; create configurations / docker definitions** | |||
r276 | ||||
r407 | .. note:: | |||
IMPORTANT: A valid domain needs to be set during bootstrap. This is stored inside :file:`.custom/.runtime.env` file. | ||||
To access the RhodeCode stack running the domain needs to be entered in the browser. | ||||
This can be a local domain entry or real domain, e.g rhodecode.local or rhodecode.yourcompany.com (pointing to the machine IP) | ||||
In case your browser can't resolve the given domain, a 404 page will be shown, and rcstack won't router traffic into instances. | ||||
r276 | Run the following command | |||
.. code-block:: bash | ||||
./rcstack init | ||||
This will ensure docker is installed, copy all required files, and create default configuration. The | ||||
r278 | prompt will ask few question on initial account setup, SSL usage and license-token (only relevant for EE). | |||
At this point a custom file under :file:`.custom/.runtime.env` was created. Adjust it if required. | ||||
r276 | Few adjustments that could be done are for example to change the domain address, or SSH port | |||
r278 | 2. **Start router to handle all incoming traffic** | |||
r276 | ||||
r407 | Start Traefik router that would handle all incoming traffic, and load balance it to various components. | |||
r276 | ||||
.. note:: | ||||
IMPORTANT: router binds to some common ports 80, 443, SSH (9022), Loki (3100) if those are | ||||
r278 | not available, please adjust them inside the override docker file :file:`.custom/docker-compose-router.override.yaml` | |||
r276 | ||||
Run the router stack in the background | ||||
.. code-block:: bash | ||||
./rcstack stack router up --detach | ||||
r278 | 3. **Start the database** | |||
r276 | ||||
.. code-block:: bash | ||||
r435 | ./rcstack stack services up database --detach | |||
r276 | ||||
.. note:: | ||||
By default RhodeCode stack is configured to run PostgreSQL database inside docker. If you need to run mysql, or external | ||||
r407 | database, please disable the database inside services stack. :ref:`custom-database-use` | |||
r276 | ||||
r278 | 4. **Start other services required** | |||
r276 | ||||
Run all other required services | ||||
.. code-block:: bash | ||||
./rcstack stack services up --detach | ||||
r278 | 5. **Start RhodeCode stack** | |||
r276 | ||||
.. code-block:: bash | ||||
./rcstack stack rhodecode up --detach | ||||
r278 | 6. **Check stack status** | |||
r276 | ||||
.. code-block:: bash | ||||
./rcstack status | ||||
r278 | ||||
r276 | Output should look similar to this: | |||
.. code-block:: bash | ||||
--- | ||||
CONTAINER ID IMAGE STATUS NAMES PORTS | ||||
ef54fc528e3a traefik:v2.9.5 Up 2 hours rc_cluster_router-traefik-1 0.0.0.0:80->80/tcp, :::80->80/tcp | ||||
f3ea0539e8b0 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-rhodecode-1 0.0.0.0:10020->10020/tcp, :::10020->10020/tcp | ||||
2be52ba58ffe rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-vcsserver-1 | ||||
7cd730ad3263 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-1 | ||||
dfa231342c87 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-beat-1 | ||||
d3d76ce2de96 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-sshd-1 | ||||
daaac329414b rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-svn-1 | ||||
7b8504fb9acb nginx:1.23.2 Up 2 hours (healthy) rc_cluster_services-nginx-1 80/tcp | ||||
7279c25feb6b elasticsearch:6.8.23 Up 2 hours (healthy) rc_cluster_services-elasticsearch-1 9200/tcp, 9300/tcp | ||||
19fb93587493 redis:7.0.5 Up 2 hours (healthy) rc_cluster_services-redis-1 6379/tcp | ||||
fb77fb6496c6 channelstream/channelstream:0.7.1 Up 2 hours (healthy) rc_cluster_services-channelstream-1 8000/tcp | ||||
cb6c5c022f5b postgres:14.6 Up 2 hours (healthy) rc_cluster_services-database-1 5432/tcp | ||||
At this point you should be able to access: | ||||
- RhodeCode instance at your domain entered, e.g http://rhodecode.local, the default access | ||||
credentials are generated and stored inside .runtime.env. | ||||
r278 | For example:: | |||
r276 | ||||
RHODECODE_USER_NAME=admin | ||||
RHODECODE_USER_PASS=super-secret-password | ||||
- Grafana monitoring dashboard at `/_grafana` subpath. E.g http://rhodecode.local/_grafana, grafana generates default access credentials | ||||
r278 | those need to be changed after first login:: | |||
r276 | ||||
user: admin | ||||
pass: admin | ||||