.. _installation: =============== Install rcstack =============== To get started with RhodeCode get the new shell installer called rcstack .. code-block:: bash mkdir docker-rhodecode && cd docker-rhodecode curl -L -s -o rcstack https://dls.rhodecode.com/get-rcstack && chmod +x rcstack ./rcstack get-started .. 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 rcstack is open-source and you can find source for it here: https://code.rhodecode.com/rhodecode-enterprise-docker Pre requisites -------------- 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/ 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 .. _quick_installation: Quick install tutorial ---------------------- Those are step-by-step installation/run steps. 1. **initialize; create configurations / docker definitions** .. 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. Run the following command .. code-block:: bash ./rcstack init This will ensure docker is installed, copy all required files, and create default configuration. The 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. Few adjustments that could be done are for example to change the domain address, or SSH port 2. **Start router to handle all incoming traffic** Start Traefik router that would handle all incoming traffic, and load balance it to various components. .. note:: IMPORTANT: router binds to some common ports 80, 443, SSH (9022), Loki (3100) if those are not available, please adjust them inside the override docker file :file:`.custom/docker-compose-router.override.yaml` Run the router stack in the background .. code-block:: bash ./rcstack stack router up --detach 3. **Start the database** .. code-block:: bash ./rcstack stack services up database --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. :ref:`custom-database-use` 4. **Start other services required** Run all other required services .. code-block:: bash ./rcstack stack services up --detach 5. **Start RhodeCode stack** .. code-block:: bash ./rcstack stack rhodecode up --detach 6. **Check stack status** .. code-block:: bash ./rcstack status 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. For example:: 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 those need to be changed after first login:: user: admin pass: admin