Menu

DockerΒΆ

Scylla Manager docker images can be downloaded from Docker hub:

The following procedure enables you to play and experiment with Scylla Manager as you read the docs.

Note that Scylla Kubernetes Operator would setup Scylla Manager for you.

Prerequisites

Docker and docker-compose commands installed.

Procedure

  1. Save as docker-compose.yaml

    version: "3.7"
    
    services:
      scylla-manager:
        image: scylladb/scylla-manager
        networks:
          public:
        depends_on:
          - scylla-manager-db
    
      scylla-manager-db:
        image: scylladb/scylla
        volumes:
          - scylla_manager_db_data:/var/lib/scylla
        networks:
          public:
        command: --smp 1 --memory 100M
    
      scylla:
        build:
          context: .
        image: scylladb/scylla-with-agent
        volumes:
          - scylla_data:/var/lib/scylla
        networks:
          public:
            ipv4_address: 192.168.100.100
        command: --smp 1 --memory 1G
    
      minio:
        image: minio/minio
        volumes:
          - minio_data:/data
        networks:
          public:
        ports:
          - "9001:9000"
        environment:
          MINIO_ACCESS_KEY: minio
          MINIO_SECRET_KEY: minio123
        command: server /data
    
    volumes:
      minio_data:
      scylla_data:
      scylla_manager_db_data:
    
    networks:
      public:
        driver: bridge
        ipam:
          driver: default
          config:
            - subnet: 192.168.100.0/24
    
  2. Save as Dockerfile

    FROM scylladb/scylla-manager-agent:latest as agent
    FROM scylladb/scylla:latest
    
    COPY --from=agent /usr/bin/scylla-manager-agent /usr/bin/
    RUN echo -e "[program:scylla-manager-agent]\n\
    command=/usr/bin/scylla-manager-agent\n\
    autorestart=true\n\
    stdout_logfile=/dev/stdout\n\
    stdout_logfile_maxbytes=0\n\
    stderr_logfile=/dev/stderr\n\
    stderr_logfile_maxbytes=0" > /etc/supervisord.conf.d/scylla-manager-agent.conf
    RUN mkdir -p /etc/scylla-manager-agent && echo -e "auth_token: token\n\
    s3:\n\
        access_key_id: minio\n\
        secret_access_key: minio123\n\
        provider: Minio\n\
        endpoint: http://minio:9000" > /etc/scylla-manager-agent/scylla-manager-agent.yaml
    
  3. Run containers, this will run:

    • Scylla node with Scylla Manager Agent installed (a toy cluster)

    • MinIO (for backups)

    • Scylla Manager and its backend Scylla instance

    docker-compose up --build -d
    docker-compose logs -f scylla-manager
    
  4. Wait until the server is started, you should see something like

    scylla-manager_1     | {"L":"INFO","T":"2021-05-07T12:55:42.964Z","M":"Starting HTTP server","address":":5080","_trace_id":"sgZk4CPpSx2KkeXU9CqIKg"}
    scylla-manager_1     | {"L":"INFO","T":"2021-05-07T12:55:42.964Z","M":"Starting HTTPS server","address":":5443","client_ca":"","_trace_id":"sgZk4CPpSx2KkeXU9CqIKg"}
    scylla-manager_1     | {"L":"INFO","T":"2021-05-07T12:55:42.964Z","M":"Starting Prometheus server","address":":5090","_trace_id":"sgZk4CPpSx2KkeXU9CqIKg"}
    scylla-manager_1     | {"L":"INFO","T":"2021-05-07T12:55:42.964Z","M":"Starting debug server","address":"127.0.0.1:5112","_trace_id":"sgZk4CPpSx2KkeXU9CqIKg"}
    scylla-manager_1     | {"L":"INFO","T":"2021-05-07T12:55:42.964Z","M":"Service started","_trace_id":"sgZk4CPpSx2KkeXU9CqIKg"}
    
  5. Start bash session in scylla-manager container

    docker-compose exec scylla-manager bash
    
  6. Add the cluster to Scylla Manager

    sctool cluster add --name test --host=scylla --auth-token=token
    

    this will print the cluster added message

    defe1ffe-c992-4ca2-9fad-82a61f39ad9e
     __
    /  \     Cluster added! You can set it as default, by exporting its name or ID as env variable:
    @  @     $ export SCYLLA_MANAGER_CLUSTER=defe1ffe-c992-4ca2-9fad-82a61f39ad9e
    |  |     $ export SCYLLA_MANAGER_CLUSTER=<name>
    || |/
    || ||    Now run:
    |\_/|    $ sctool status -c defe1ffe-c992-4ca2-9fad-82a61f39ad9e
    \___/    $ sctool task list -c defe1ffe-c992-4ca2-9fad-82a61f39ad9e