Installing rcstack without internet access

rcstack provides an easy way to run the stack without access to the internet, using the rcstack –offline flag.

There are 3 main pre-requisites for the operating system to run the stack:

  • Have docker & docker compose installed.

  • Have loki-docker-driver plugin installed.

  • Have all required docker images present in the system.

Let’s start with getting all the rcstack components into the offline instance.

Make sure to download rcstack installer first, and save it to your machine

curl -L -s -o rcstack https://dls.rhodecode.com/get-rcstack && chmod +x rcstack
./rcstack --version

Then download the latest stable version of rcstack archive and save it to the .cache directory next to the rcstack script

mkdir -p .cache
curl -L https://dls.rhodecode.com/get_archive/stable.tgz -o .cache/stable.tgz

root@test-install:/rhodecode-docker# ls -la .
total 232
drwxr-xr-x 1 root root    128 Oct 21 07:23 .
drwxr-xr-x 1 root root   4096 Oct 21 07:23 ..
drwxr-xr-x 1 root root    128 Oct 21 07:23 .cache
-rwxr-xr-x 1 root root 222363 Oct 21 07:24 rcstack

At this point all required resources from the rcstack itself are present and they won’t be downloaded from the internet. Now we need to install docker and loki, and obtain the docker images required to run the rcstack

Note

rcstack requires some basic tools to be present in the offline instance. Those are:

  • curl

  • tar

  • gzip

  • find

  1. The first step is to install docker if it’s not yet present in the system

curl -fsSL https://get.docker.com -o install-docker.sh
sh install-docker.sh
rm install-docker.sh

Note

This is just required for the first time, we recommend using an OS that already has docker installed.

  1. Then install the loki plugin for managing logs of rcstack

docker plugin install grafana/loki-docker-driver --alias loki --grant-all-permissions

Note

We recommend using a private registry to host the loki plugin.

  1. Fetch all the required images used to run the stack

./rcstack cli image-list
# Shortcut to also download all images
./rcstack cli image-list --pull

This will print all required images for running the stack. Please make sure they are present so rcstack wouldn’t try to access the internet to fetch those images.

Note

We recommend using a private registry to host the docker images, or whitelisting the docker hub

  1. All required components should be present, it’s possible to use –offline mode to install rcstack

./rcstack --offline init

Now the stack should be ready to be used, and it should be running without internet access.