installation.rst
156 lines
| 5.3 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 | |||
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 | ||||
Quick install tutorial | ||||
r278 | ---------------------- | |||
r276 | ||||
Those are step-by-step installation/run steps. | ||||
r278 | 1. **initialize; create configurations / docker definitions** | |||
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 | ||||
Start Traefik router that would handle all incoming traffic, load balance. | ||||
.. note:: | ||||
IMPORTANT: A valid domain needs to be set during bootstrap. This is stored inside .custom/.runtime.env file. | ||||
To access the RhodeCode stack running the domain needs to be entered in the browser. | ||||
This can be a local entry or real domain, e.g rhodecode.local or rhodecode.yourcompany.com (pointing to the machine IP) | ||||
In case machine can't resolve the domain, a 404 page will be shown | ||||
.. 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 | ||||
./rcontrol stack database up --detach | ||||
.. note:: | ||||
By default RhodeCode stack is configured to run PostgreSQL database inside docker. If you need to run mysql, or external | ||||
database, please disable the database inside services stack. :see: configuration of database | ||||
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 | ||||