Set up cassandra
This commit is contained in:
13
README.md
13
README.md
@@ -4,9 +4,16 @@ A vault of secrets, a treasure untold, Configurations gathered, both new and old
|
||||
|
||||
## Properties for deployment
|
||||
|
||||
| name | required | info |
|
||||
|------------------------|----------|-------------------------|
|
||||
| spring.profiles.active | * | Spring Boot environment |
|
||||
| name | required | info |
|
||||
|----------------------------|----------|-------------------------|
|
||||
| spring.profiles.active | * | Spring Boot environment |
|
||||
| cassandra.keyspace-name | | |
|
||||
| cassandra.port | | |
|
||||
| cassandra.schema-action | | |
|
||||
| cassandra.local-datacenter | | |
|
||||
| cassandra.contact-points | * | |
|
||||
| cassandra.username | * | |
|
||||
| cassandra.password | ** | |
|
||||
|
||||
Required: * can be stored as text, and ** need to be stored as secret.
|
||||
|
||||
|
||||
@@ -7,9 +7,14 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(hlaeja.fasterxml.jackson.module.kotlin)
|
||||
implementation(hlaeja.kotlin.logging)
|
||||
implementation(hlaeja.kotlin.reflect)
|
||||
implementation(hlaeja.kotlinx.coroutines)
|
||||
implementation(hlaeja.library.hlaeja.common.messages)
|
||||
implementation(hlaeja.springboot.starter.actuator)
|
||||
implementation(hlaeja.springboot.starter.cassandra)
|
||||
implementation(hlaeja.springboot.starter.cassandra.reactive)
|
||||
implementation(hlaeja.springboot.starter.webflux)
|
||||
|
||||
testImplementation(hlaeja.kotlin.test.junit5)
|
||||
|
||||
6
cql/00-setup_device_configuration.cql
Normal file
6
cql/00-setup_device_configuration.cql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Create a keyspace
|
||||
CREATE KEYSPACE IF NOT EXISTS device_configuration
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
|
||||
|
||||
-- Use the keyspace
|
||||
USE device_configuration;
|
||||
@@ -10,6 +10,12 @@ spring:
|
||||
name: "%APP_BUILD_OS_NAME%"
|
||||
version: "%APP_BUILD_OS_VERSION%"
|
||||
|
||||
cassandra:
|
||||
keyspace-name: device_configuration
|
||||
port: 9042
|
||||
schema-action: none
|
||||
local-datacenter: datacenter1
|
||||
|
||||
---
|
||||
###############################
|
||||
### Development environment ###
|
||||
@@ -19,6 +25,11 @@ spring:
|
||||
activate:
|
||||
on-profile: development
|
||||
|
||||
cassandra:
|
||||
contact-points: localhost
|
||||
username: cassandra
|
||||
password: password
|
||||
|
||||
---
|
||||
##########################
|
||||
### Docker environment ###
|
||||
@@ -28,6 +39,11 @@ spring:
|
||||
activate:
|
||||
on-profile: docker
|
||||
|
||||
cassandra:
|
||||
contact-points: cassandra
|
||||
username: cassandra
|
||||
password: password
|
||||
|
||||
---
|
||||
##############################
|
||||
### Production environment ###
|
||||
|
||||
Reference in New Issue
Block a user