Giter Site home page Giter Site logo

singlestoredb-fly's Introduction

SingleStoreDB on Fly.io

This project contains everything you need to run SingleStoreDB on Fly.io for development. This deployment is not supported for production workloads or benchmarks so please keep that in mind when using it. Internally, this project uses the singlestoredb-dev-image, please see the documentation for that project if you want to customize the deployment.

If you have any questions or issues, please file an issue on the GitHub repo or our forums.

Quick Start

Before you can run this application you will need to get a free SingleStore License key. Sign up for a SingleStore account and then grab your license key from the customer portal to use below.

You will also need to install flyctl and sign up for a Fly.io account before continuing.

Next, follow these steps to deploy SingleStoreDB on your Fly.io account:

git clone https://github.com/singlestore-labs/singlestoredb-fly
cd singlestoredb-fly

# initialize the application on your Fly.io account
# with the singlestoredb-dev image
flyctl launch --copy-config --no-deploy \
  --image ghcr.io/singlestore-labs/singlestoredb-dev

# decide what size app to launch
# see sizes here: https://fly.io/docs/about/pricing/#virtual-machines
# dedicated-cpu-1x is minimum recommended size
flyctl scale vm dedicated-cpu-1x

# set your SingleStoreDB license key and root password like so:
flyctl secrets set SINGLESTORE_LICENSE="YOUR LICENSE KEY" ROOT_PASSWORD="SINGLESTORE PASSWORD"

# create volume to store SingleStoreDB data
flyctl volume create singlestoredb_data --size 30

# deploy the fly application
flyctl deploy

# check the logs
flyctl logs

# check SingleStoreDB status
flyctl status

# stop SingleStoreDB
flyctl scale count 0

# start SingleStoreDB
flyctl scale count 1

# destroy the app
flyctl destroy

Connect to SingleStoreDB

Once SingleStoreDB is running in Fly.io, you can connect to it using either the app IP or hostname. You can retrieve the app IP using flyctl ips list or open up the Studio console using flyctl open.

Note The Fly.io hostname (looks like app-name.fly.dev) can take a couple minutes to resolve, so if it doesn't work right away just use the IP address for now.

Once you have either the hostname or the IP, you can also run a local mysql shell like so:

mysql -u root -h <fly app ip> -p

The Data API can also be accessed over HTTPS on port 9000 using your app hostname (app-name.fly.dev) like so:

~ โžœ curl -s -XPOST -H "content-type: application/json" -d '{ "sql": "select 1" }' root:YOUR_ROOT_PASSWORD@APP_NAME.fly.dev:9000/api/v1/query/rows
{
  "results": [
    {
      "rows": [ { "1": 1 } ]
    }
  ]
}

Note For more information on how to use the Data API please visit the documentation.

Where can I learn how to use SingleStoreDB?

Now that you have SingleStore running, please check out the following sections of our official documentation for guides on what to do next.

singlestoredb-fly's People

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.