Home
Softono
1m-ops-demo

1m-ops-demo

Open source Apache-2.0 HCL
23
Stars
16
Forks
2
Issues
4
Watchers
1 week
Last Commit

About 1m-ops-demo

Set up custom DEMOs and PoCs with ScyllaDB in the cloud

Platforms

Web Self-hosted Cloud

Languages

HCL

ScyllaDB 1 million operations/second DEMOs

This repository contains Terraform and Ansible based projects to help you set up DEMOs and POCs with ScyllaDB in a cloud environment.

Currently supported DEMOs:

See how DEMO UI works.

Prerequisites

Usage

  1. Clone the repository

     git clone https://github.com/scylladb/1m-ops-demo.git
     cd 1m-ops-demo/
  2. Make sure AWS CLI is configured properly, and know the location of the credentials file (e.g. ~/.aws/credentials)

  3. Edit config.py

     {
         "aws_creds_file": "/home/user/.aws/credentials",
         "region": "us-east-1",
         "scylla_cloud_token": "API-TOKEN",
         "running_in_docker": true
     }
    • aws_creds_file: the location (absolute path) of your AWS credentials file
    • region: AWS region you want to use for the demo
    • scylla_cloud_token: You can generate an API token in ScyllaDB Cloud
    • running_in_docker: Normally this should be true
  4. Run the web app (by default, it uses port 5000)

     ./build_and_run.sh 

    This will spin up a Docker container and run the web app on the 5000 port. You can stop the container with docker stop scylla-demo

  5. Open DEMO UI application

    Go to http://0.0.0.0:5000

  6. Select a demo you want to try (this will run terraform init under the hood) demo ui

  7. (Optional) Configure cluster size and workload settings on the left side demo ui workload

  8. Hit APPLY (this runs terraform apply)

  9. Keep an eye on the console output to see when Terraform finishes

  10. Click on the different dashboard tabs to monitor the cluster.

  11. If you are done, don't forget to run DESTROY to remove infrastructure elements and avoid unnecessary costs.

Usage tips

  • In case you need to manually access terraform, you can always access it through the container's shell (keep in mind, that you need to change to a directory that contains the TF files):
      docker exec -it scylla-demo sh
      cd <demo-folder>
  • To run terraform apply from within the container:
      terraform apply -var-file=user.tfvars.json -auto-approve
  • To run terraform destroy from within the container:
      terraform destroy -var-file=user.tfvars.json -auto-approve
  • You can change the underlying Terraform implementation by stopping the container, making your changes then running build_and_run.sh script again.
  • If Terraform fails after spinning up some parts of the infrastructure, you can do two things:
    • Either just click the DESTROY button, fix the problem, then run build_and_run.sh again or
    • Open the container's shell, fix the problem, and run terraform apply -var-file=user.tfvars.json -auto-approve
  • If you want to install some package using the container's shell, you can use apk add <package-name> (the image is based on Alpine)

Local development

Requirements:

  • NodeJS 22 (npm install -g node@22 or nvm install 22)
  • Python 3
  1. Install Python packages and start Flask server
     virtualenv env && source env/bin/activate
     pip install -r reqiurements.txt
     python app.py
  2. Install frontend requirements and start dev server:
     cd frontend
     npm install
     npm run dev
  3. Edit config.json:
     {
         "aws_creds_file": "/home/user/.aws/credentials",
         "region": "us-east-1",
         "scylla_cloud_token": "API-TOKEN",
         "running_in_docker": false
     }

    If you are running the app locally for development purposes, make sure to set running_in_docker to false.

Relevant links