Skip to content

Instantly share code, notes, and snippets.

@tzach
Last active July 8, 2024 03:41
Show Gist options
  • Select an option

  • Save tzach/66c8d0ce76ae50fd6ead36f263b5bedf to your computer and use it in GitHub Desktop.

Select an option

Save tzach/66c8d0ce76ae50fd6ead36f263b5bedf to your computer and use it in GitHub Desktop.

Revisions

  1. tzach revised this gist Jun 4, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
    # Do not use the above --api-address for production. Exposing API IP is not secure.
    SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla)
    ECHO $SEED
    echo $SEED
    docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
    docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"

  2. tzach revised this gist Mar 6, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,7 @@ UN 172.18.0.4 110.58 KB 256 ? c5c0bd6f-c7b4-4dee-8fe9-0ca495b0
    docker run --name scylla-manager-db -d scylladb/scylla --smp 1 --memory 750M --overprovision 1
    docker run -d --name scylla-manager --link scylla-manager-db scylladb/scylla-manager

    # Validate Scylla Manager is up and running
    # Validate Scylla Manager is up and running (may take 1-2 min)

    > docker exec -it scylla-manager sctool version
    Client version: 1.3.1-0.20190124.08fc477
  3. tzach revised this gist Mar 3, 2019. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,8 @@ UN 172.18.0.4 110.58 KB 256 ? c5c0bd6f-c7b4-4dee-8fe9-0ca495b0

    # Start A Scylla Manager
    ########################

    # Best is *not* to use a production cluster as a backend for Manager
    docker run --name scylla-manager-db -d scylladb/scylla --smp 1 --memory 750M --overprovision 1
    docker run -d --name scylla-manager --link scylla-manager-db scylladb/scylla-manager

    @@ -31,7 +33,7 @@ Client version: 1.3.1-0.20190124.08fc477
    Server version: 1.3.1-0.20190124.08fc477

    # Add the cluster to the Manager
    # Best is *not* to use a production cluster as a backend for Manager, but for the demo its good enough

    > docker exec -it scylla-manager sctool cluster add --host="$SEED" --name=my-cluster
    30ab8b15-3515-4e37-b3d0-fa1d92c84870
    __
  4. tzach revised this gist Mar 3, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -21,8 +21,8 @@ UN 172.18.0.4 110.58 KB 256 ? c5c0bd6f-c7b4-4dee-8fe9-0ca495b0

    # Start A Scylla Manager
    ########################

    docker run -d --name scylla-manager --link some-scylla:scylla-manager-db scylladb/scylla-manager
    docker run --name scylla-manager-db -d scylladb/scylla --smp 1 --memory 750M --overprovision 1
    docker run -d --name scylla-manager --link scylla-manager-db scylladb/scylla-manager

    # Validate Scylla Manager is up and running

  5. tzach revised this gist Mar 3, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@
    docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
    # Do not use the above --api-address for production. Exposing API IP is not secure.
    SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla)
    ECHO $SEED
    docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
    docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"

  6. tzach revised this gist Feb 28, 2019. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -52,6 +52,11 @@ Server version: 1.3.1-0.20190124.08fc477

    #> exit

    # Extract the IP address of Scylla and Manager for the next step
    > docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' some-scylla some-scylla2 some-scylla3
    > docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' scylla-manager


    # Setup Monitoring
    ##################
    git clone https://github.com/scylladb/scylla-grafana-monitoring.git
  7. tzach revised this gist Feb 28, 2019. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    # Start a Scylla cluster
    ########################

    docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
    # Do not use the above --api-address for production. Exposing API IP is not secure.
    SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla)
    docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
    docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"

    docker run -d --name scylla-manager --link some-scylla:scylla-manager-db scylladb/scylla-manager

    # Valdiate cluster is up and running
    > docker exec -it some-scylla nodetool status
    Datacenter: datacenter1
    @@ -17,6 +18,10 @@ UN 172.18.0.2 110.77 KB 256 ? 63ef531d-13a4-4ffa-9d28-3985aeb5
    UN 172.18.0.3 104.88 KB 256 ? 7e985ea1-66d8-4c47-a517-2ef22f70d29c rack1
    UN 172.18.0.4 110.58 KB 256 ? c5c0bd6f-c7b4-4dee-8fe9-0ca495b02a2b rack1

    # Start A Scylla Manager
    ########################

    docker run -d --name scylla-manager --link some-scylla:scylla-manager-db scylladb/scylla-manager

    # Validate Scylla Manager is up and running

  8. tzach revised this gist Feb 28, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
    # Do not use the above for production. Exposing API IP is not secure.
    # Do not use the above --api-address for production. Exposing API IP is not secure.
    SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla)
    docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
    docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
    @@ -25,6 +25,7 @@ Client version: 1.3.1-0.20190124.08fc477
    Server version: 1.3.1-0.20190124.08fc477

    # Add the cluster to the Manager
    # Best is *not* to use a production cluster as a backend for Manager, but for the demo its good enough
    > docker exec -it scylla-manager sctool cluster add --host="$SEED" --name=my-cluster
    30ab8b15-3515-4e37-b3d0-fa1d92c84870
    __
  9. tzach revised this gist Feb 28, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
    ;; Do not use the above for production. Exposing API IP is not secure.
    # Do not use the above for production. Exposing API IP is not secure.
    SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla)
    docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
    docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
  10. tzach revised this gist Feb 28, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ Client version: 1.3.1-0.20190124.08fc477
    Server version: 1.3.1-0.20190124.08fc477

    # Add the cluster to the Manager
    > docker exec -it scylla-manager sctool cluster add --host="$SEED" --name=my-min-cluster
    > docker exec -it scylla-manager sctool cluster add --host="$SEED" --name=my-cluster
    30ab8b15-3515-4e37-b3d0-fa1d92c84870
    __
    / \ Cluster added, to set it as a default run:
    @@ -41,7 +41,7 @@ Server version: 1.3.1-0.20190124.08fc477
    ╭──────────────────────────────────────┬────────────────┬──────────╮
    │ cluster id │ name │ ssh user │
    ├──────────────────────────────────────┼────────────────┼──────────┤
    │ 30ab8b15-3515-4e37-b3d0-fa1d92c84870 │ my-min-cluster │ │
    │ 30ab8b15-3515-4e37-b3d0-fa1d92c84870 │ my-cluster │ │
    ╰──────────────────────────────────────┴────────────────┴──────────╯

    #> exit
  11. tzach revised this gist Feb 28, 2019. 1 changed file with 31 additions and 4 deletions.
    35 changes: 31 additions & 4 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overpr

    docker run -d --name scylla-manager --link some-scylla:scylla-manager-db scylladb/scylla-manager

    ### Valdiate cluster is up and running
    # Valdiate cluster is up and running
    > docker exec -it some-scylla nodetool status
    Datacenter: datacenter1
    =======================
    @@ -18,13 +18,13 @@ UN 172.18.0.3 104.88 KB 256 ? 7e985ea1-66d8-4c47-a517-2ef22f70
    UN 172.18.0.4 110.58 KB 256 ? c5c0bd6f-c7b4-4dee-8fe9-0ca495b02a2b rack1


    ### Validate Scylla Manager is up and running
    # Validate Scylla Manager is up and running

    > docker exec -it scylla-manager sctool version
    Client version: 1.3.1-0.20190124.08fc477
    Server version: 1.3.1-0.20190124.08fc477

    ### Add the cluster to the Manager
    # Add the cluster to the Manager
    > docker exec -it scylla-manager sctool cluster add --host="$SEED" --name=my-min-cluster
    30ab8b15-3515-4e37-b3d0-fa1d92c84870
    __
    @@ -42,4 +42,31 @@ Server version: 1.3.1-0.20190124.08fc477
    │ cluster id │ name │ ssh user │
    ├──────────────────────────────────────┼────────────────┼──────────┤
    │ 30ab8b15-3515-4e37-b3d0-fa1d92c84870 │ my-min-cluster │ │
    ╰──────────────────────────────────────┴────────────────┴──────────╯
    ╰──────────────────────────────────────┴────────────────┴──────────╯

    #> exit

    # Setup Monitoring
    ##################
    git clone https://github.com/scylladb/scylla-grafana-monitoring.git
    cd scylla-grafana-monitoring

    # edit prometheus/scylla_servers.yml with scylla nodes:

    - targets:
    - 172.17.0.2:9180
    - 172.17.0.3:9180
    - 172.17.0.4:9180

    labels:
    cluster: my-cluster

    # edit prometheus/scylla_manager_servers.yml with manager IP:

    - targets:
    - 172.17.0.5:56090

    ./start-all.sh -v 3.0 -M 1.3

    Grafana IP: http://localhost:3000
    Prometheus IP: http://localhost:9090
  12. tzach revised this gist Feb 28, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,8 @@ Server version: 1.3.1-0.20190124.08fc477
    |\_/|
    \___/

    > docker exec -it scylla-manager sctool cluster list
    > docker exec -it scylla-manager bash
    #> sctool cluster list
    ╭──────────────────────────────────────┬────────────────┬──────────╮
    │ cluster id │ name │ ssh user │
    ├──────────────────────────────────────┼────────────────┼──────────┤
  13. tzach revised this gist Feb 28, 2019. 1 changed file with 7 additions and 35 deletions.
    42 changes: 7 additions & 35 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -1,37 +1,10 @@
    ### create a docker-compose.yaml
    docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
    ;; Do not use the above for production. Exposing API IP is not secure.
    SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla)
    docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
    docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"

    version: '3'

    services:

    scylla-manager:
    image: scylladb/scylla-manager
    container_name: scylla-manager
    depends_on:
    - some-scylla
    links:
    - some-scylla:scylla-manager-db

    some-scylla:
    image: scylladb/scylla
    container_name: some-scylla
    command: --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0

    some-scylla2:
    image: scylladb/scylla
    container_name: some-scylla2
    command: --seeds=some-scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0

    some-scylla3:
    image: scylladb/scylla
    container_name: some-scylla3
    command: --seeds=some-scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0

    ;;; **Do not use the above for production. Exposing API IP is not secure.**

    ### Run the Scylla Cluster and Scylla Manager, using the cluster as a backend storage

    > docker-compose up -d
    docker run -d --name scylla-manager --link some-scylla:scylla-manager-db scylladb/scylla-manager

    ### Valdiate cluster is up and running
    > docker exec -it some-scylla nodetool status
    @@ -52,8 +25,7 @@ Client version: 1.3.1-0.20190124.08fc477
    Server version: 1.3.1-0.20190124.08fc477

    ### Add the cluster to the Manager

    > docker exec -it scylla-manager sctool cluster add --host=172.18.0.2 --name=my-min-cluster
    > docker exec -it scylla-manager sctool cluster add --host="$SEED" --name=my-min-cluster
    30ab8b15-3515-4e37-b3d0-fa1d92c84870
    __
    / \ Cluster added, to set it as a default run:
  14. tzach created this gist Feb 26, 2019.
    72 changes: 72 additions & 0 deletions Demo Scylla Manager with Docker
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,72 @@
    ### create a docker-compose.yaml

    version: '3'

    services:

    scylla-manager:
    image: scylladb/scylla-manager
    container_name: scylla-manager
    depends_on:
    - some-scylla
    links:
    - some-scylla:scylla-manager-db

    some-scylla:
    image: scylladb/scylla
    container_name: some-scylla
    command: --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0

    some-scylla2:
    image: scylladb/scylla
    container_name: some-scylla2
    command: --seeds=some-scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0

    some-scylla3:
    image: scylladb/scylla
    container_name: some-scylla3
    command: --seeds=some-scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0

    ;;; **Do not use the above for production. Exposing API IP is not secure.**

    ### Run the Scylla Cluster and Scylla Manager, using the cluster as a backend storage

    > docker-compose up -d

    ### Valdiate cluster is up and running
    > docker exec -it some-scylla nodetool status
    Datacenter: datacenter1
    =======================
    Status=Up/Down
    |/ State=Normal/Leaving/Joining/Moving
    -- Address Load Tokens Owns Host ID Rack
    UN 172.18.0.2 110.77 KB 256 ? 63ef531d-13a4-4ffa-9d28-3985aeb5dc18 rack1
    UN 172.18.0.3 104.88 KB 256 ? 7e985ea1-66d8-4c47-a517-2ef22f70d29c rack1
    UN 172.18.0.4 110.58 KB 256 ? c5c0bd6f-c7b4-4dee-8fe9-0ca495b02a2b rack1


    ### Validate Scylla Manager is up and running

    > docker exec -it scylla-manager sctool version
    Client version: 1.3.1-0.20190124.08fc477
    Server version: 1.3.1-0.20190124.08fc477

    ### Add the cluster to the Manager

    > docker exec -it scylla-manager sctool cluster add --host=172.18.0.2 --name=my-min-cluster
    30ab8b15-3515-4e37-b3d0-fa1d92c84870
    __
    / \ Cluster added, to set it as a default run:
    @ @ export SCYLLA_MANAGER_CLUSTER=30ab8b15-3515-4e37-b3d0-fa1d92c84870
    | |
    || |/ Repair will run on 27 Feb 19 00:00:00 UTC and will be repeated every 7d.
    || || To see the currently scheduled tasks: sctool task list -c 30ab8b15-3515-4e37-b3d0-fa1d92c84870
    |\_/|
    \___/

    > docker exec -it scylla-manager sctool cluster list
    ╭──────────────────────────────────────┬────────────────┬──────────╮
    │ cluster id │ name │ ssh user │
    ├──────────────────────────────────────┼────────────────┼──────────┤
    │ 30ab8b15-3515-4e37-b3d0-fa1d92c84870 │ my-min-cluster │ │
    ╰──────────────────────────────────────┴────────────────┴──────────╯