These are instructions for using docker-compose to deploy a DataCore Swarm environment in containers. The commands below set up a complete environment on a single server or laptop for demonstration purposes or for functional integration testing.

For more information see:
https://www.brighttalk.com/webcast/13173/413805/cloud-seeding-with-object-storage-containers-tech-tuesday-webinar

Prepare the Docker Host

Install Docker on a Linux server (e.g. using the convenience script https://docs.docker.com/engine/install/centos/#install-using-the-convenience-script ) or install Docker for Desktop on Windows or macOS (https://docs.docker.com/engine/install/#desktop ).

a. Verify the docker server has at least 8GB RAM available to containers (check Resources in Docker for Desktop) and 40GB disk space available.

b. Verify the sysctl value vm.max_map_count = 262144 – it is required for the elasticsearch containers to start.

Verify the docker server has good sysctl settings.

docker run --privileged centos sysctl -a | grep -E 'file-max|max_user_instances|max_user_watches|max_map_count'

fs.file-max = 131072
fs.inotify.max_user_instances = 128
vm.max_map_count = 262144

docker run --rm --privileged centos:7.9.2009 free -h

total used free shared buff/cache available
Mem: 7.7G 263M 6.7G 163M 778M 7.0G
Swap: 1.0G 187M 836M

docker run --rm --privileged centos:7.9.2009 df -h .

Filesystem Size Used Avail Use% Mounted on
overlay 59G 7.3G 49G 14% /

The default vm.max_map_count on macOS is fine but Windows and Linux users have to adjust. Temporarily make the change with this but unfortunately this must be performed every time a Windows machine is rebooted:

docker run --rm -ti --privileged centos:7.9.2009 sysctl vm.max_map_count=262144

Linux can make this change permanent by creating this file as root and rebooting and installing docker-ce:

echo 'vm.max_map_count = 262144' > /etc/sysctl.d/98-elasticsearch.conf
curl -fsS https://get.docker.com | sh  # Or see https://docs.docker.com

c. This is no longer necessary with Swarm 15, but if you run an older version like Swarm 11.3.0 (use image caringo:v11 instead of caringo:demo) be sure docker info shows Cgroup Version: 1 . Recent Docker for Desktop and recent Linux (e.g. ubuntu 22) default to Cgroup Version 2 which causes WMM05 unexpected memory stats errors in castor.log prior to Swarm 15.
Just restart Docker for Desktop after changing "deprecatedCgroupv1": true, in ~/Library/Group Containers/group.com.docker/settings.json or restart Linux after setting GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0" in /etc/default/grub.

Download and Initialize the DataCore Swarm Containers

The below bash commands contain the access and secret keys needed to access DataCore’s public image repo, now at quay.io/perifery/. Further instructions and files for an offline install are located at:
https://jam.cloud.caringo.com/public/offline-demo/README.md

Note: DOCKER_INTERFACE is the IP or hostname of the docker server, so localhost if running Docker for Mac.

For Linux, macOS, or WSL2 (running with elevated privileges, or as root):

export REGISTRY_URL="quay.io/perifery/" REGISTRY_USER="perifery+demo" REGISTRY_PASSWORD="25VM6XA9JBRRT2ENFZ4KCWXK6Z65PCSHMM7QHD50QK7VYCJA07T4HYFUE5HMV4AW"
docker login --username "${REGISTRY_USER}" --password "${REGISTRY_PASSWORD}" quay.io

Login Succeeded (ignore the WARNING about using --password)

docker pull ${REGISTRY_URL}caringo:demo

demo: Pulling from perifery/caringo
Digest: sha256:222449b510c6a9d680fa95bdead0a50ee2a0291416016e4aa8e1d5b6a4713be6
Status: Downloaded newer image for quay.io/perifery/caringo:demo
quay.io/perifery/caringo:demo

docker run -ti --rm -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_INTERFACE=localhost -e REGISTRY_URL -e REGISTRY_USER -e REGISTRY_PASSWORD -e GATEWAY_ADMIN_PASSWORD=datacore ${REGISTRY_URL}caringo:demo init.sh

The init.sh script outputs any errors. This can be checked in the container logs (e.g. docker logs caringo42_elasticsearch_1). When successful it outputs the URLs for accessing the Swarm storage console and content portal e.g.
Content Portal: http://localhost/_admin/portal
Storage UI: http://localhost:91/_admin/storage
Swarm legacy console: http://localhost:4290/storage/swarm/
Grafana dashboards: http://localhost:4230/

Note the GATEWAY_ADMIN_USER:GATEWAY_ADMIN_PASSWORD now default to dcadmin:datacore.

Use caringo:demo-min instead of caringo:demo if the machine has only 8GB RAM. That lowers some memory settings and simplifies elasticsearch.

note

Swarm on arm64 (EXPERIMENTAL)

Swarm on arm64 (EXPERIMENTAL)

Although Swarm is not supported on ARM64 there is an experimental build available and the other containers have been built for arm64. Thus there is experimental support for running the demo containers on a non-Intel Mac. Note the REGISTRY_URL is different from above (multi-arch images are not yet being used).

export REGISTRY_URL="quay.io/perifery/arm64/" REGISTRY_USER="perifery+demo" REGISTRY_PASSWORD="25VM6XA9JBRRT2ENFZ4KCWXK6Z65PCSHMM7QHD50QK7VYCJA07T4HYFUE5HMV4AW"
docker login --username "${REGISTRY_USER}" --password "${REGISTRY_PASSWORD}" quay.io
docker run --pull always -ti --rm -e UNIQ_PORT=77 -e REGISTRY_USER -e REGISTRY_PASSWORD -e REGISTRY_URL -v /var/run/docker.sock:/var/run/docker.sock ${REGISTRY_URL}caringo:demo init.sh

Next Steps to Attempt

Related articles

The content by label feature displays related articles automatically, based on labels you choose. To edit options for this feature, select the placeholder below and tap the pencil icon.

Related issues