Set up cassandra
This commit is contained in:
@@ -5,8 +5,15 @@ A vault of secrets, a treasure untold, Configurations gathered, both new and old
|
|||||||
## Properties for deployment
|
## Properties for deployment
|
||||||
|
|
||||||
| name | required | info |
|
| name | required | info |
|
||||||
|------------------------|----------|-------------------------|
|
|----------------------------|----------|-------------------------|
|
||||||
| spring.profiles.active | * | Spring Boot environment |
|
| 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.
|
Required: * can be stored as text, and ** need to be stored as secret.
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation(hlaeja.fasterxml.jackson.module.kotlin)
|
||||||
|
implementation(hlaeja.kotlin.logging)
|
||||||
implementation(hlaeja.kotlin.reflect)
|
implementation(hlaeja.kotlin.reflect)
|
||||||
implementation(hlaeja.kotlinx.coroutines)
|
implementation(hlaeja.kotlinx.coroutines)
|
||||||
|
implementation(hlaeja.library.hlaeja.common.messages)
|
||||||
implementation(hlaeja.springboot.starter.actuator)
|
implementation(hlaeja.springboot.starter.actuator)
|
||||||
|
implementation(hlaeja.springboot.starter.cassandra)
|
||||||
|
implementation(hlaeja.springboot.starter.cassandra.reactive)
|
||||||
implementation(hlaeja.springboot.starter.webflux)
|
implementation(hlaeja.springboot.starter.webflux)
|
||||||
|
|
||||||
testImplementation(hlaeja.kotlin.test.junit5)
|
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%"
|
name: "%APP_BUILD_OS_NAME%"
|
||||||
version: "%APP_BUILD_OS_VERSION%"
|
version: "%APP_BUILD_OS_VERSION%"
|
||||||
|
|
||||||
|
cassandra:
|
||||||
|
keyspace-name: device_configuration
|
||||||
|
port: 9042
|
||||||
|
schema-action: none
|
||||||
|
local-datacenter: datacenter1
|
||||||
|
|
||||||
---
|
---
|
||||||
###############################
|
###############################
|
||||||
### Development environment ###
|
### Development environment ###
|
||||||
@@ -19,6 +25,11 @@ spring:
|
|||||||
activate:
|
activate:
|
||||||
on-profile: development
|
on-profile: development
|
||||||
|
|
||||||
|
cassandra:
|
||||||
|
contact-points: localhost
|
||||||
|
username: cassandra
|
||||||
|
password: password
|
||||||
|
|
||||||
---
|
---
|
||||||
##########################
|
##########################
|
||||||
### Docker environment ###
|
### Docker environment ###
|
||||||
@@ -28,6 +39,11 @@ spring:
|
|||||||
activate:
|
activate:
|
||||||
on-profile: docker
|
on-profile: docker
|
||||||
|
|
||||||
|
cassandra:
|
||||||
|
contact-points: cassandra
|
||||||
|
username: cassandra
|
||||||
|
password: password
|
||||||
|
|
||||||
---
|
---
|
||||||
##############################
|
##############################
|
||||||
### Production environment ###
|
### Production environment ###
|
||||||
|
|||||||
Reference in New Issue
Block a user