https://github.com/aldy505/local-scylladb-cluster
Local ScyllaDB 4.5 cluster with Docker Compose
https://github.com/aldy505/local-scylladb-cluster
Last synced: about 2 months ago
JSON representation
Local ScyllaDB 4.5 cluster with Docker Compose
- Host: GitHub
- URL: https://github.com/aldy505/local-scylladb-cluster
- Owner: aldy505
- License: mit
- Created: 2022-06-24T02:21:07.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-24T02:21:19.000Z (almost 3 years ago)
- Last Synced: 2025-02-07T10:49:08.327Z (3 months ago)
- Size: 10.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Local ScylladB Cluster with Docker Compose
Sets up a local ScyllaDB v4.5 cluster with 3 nodes.
To add new nodes, just modify the `docker-compose.yml` file and add another ScyllaDB instance,
then point the new instance name to the `--seeds` command value on other nodes. Then you are
good to go.To run it:
```sh
docker compose up -d
```There is no authentication being set up. If you want to enable authentication, change `scylla.yaml`
file on line 237 to `PasswordAuthenticator` and line 249 to `CassandraAuthorizer`. You should read
Cassandra or ScyllaDB documentation about creating a username-password combination.Obviously don't use it on a production environment.
To connect with Go:
```go
package mainimport (
"time"
"github.com/gocql/gocql"
)func main() {
session := gocql.NewSession(gocql.ClusterConfig{
Hosts: []string{"localhost:9042", "localhost:9043", "localhost:9044"},
Timeout: 3 * time.Second,
ConnectTimeout: 3 * time.Second,
Consistency: gocql.Quorum,
})
defer session.Close()// do things with session
}
```