RexSystem1 voteoriginally by @Mar0xy on GitHub2 replies
Gonna leave this here for anyone interested in setting up Cassandra as I had to experiment with this for 3 hours
Setup Guide
1. Add Service to Compose
Here we will use the bitnamilegacy image as all the other cassandra images require you to directly have a full on cassandra config to get them to work.
this sets up the keyspace used in the config with basically the simplest of replication options
4. Run Migrations
Now we will get to the hard part as the migration script is not included in the docker image you will have to run all migrations yourself one by one in the shell by going through each file in fluxer_devops/cassandra/migrations
5. Start Fluxer
After all this is done fluxer should be able to start without issues
Caveats
Cassandra tends to eat a lot of RAM so make sure you either host it on a separate machine if possible or you have a beefy server otherwise it will Exited with code 137 while fluxer is up and you get the dreaded loading/splash screen
Benefits
You no longer have to deal with the KV SQLite file meaning you can actually easily modify the table entries and etc like adding visionary to a user by running this query
OOTB Cassandra takes up as much RAM as it can (in my case it was 8GB) you can limit the usage by adding this into the compose:
environments section on the cassandra service:
There are no real differences between cassandra and sqlite besides the fact that cassandra is better for redundancy/replication/scaling and that it isn't KV based like mentioned previously which makes managing the DB directly much easier.
In terms of users my instance only has me and a friend as well as 2 bot accounts and it has been working fine so far after I applied a few more changes like setting this env variable CASSANDRA_CFG_YAML_DISK_ACCESS_MODE: mmap_index_only
Thread
Comment by @Mar0xy
Setup Guide
1. Add Service to Compose
Here we will use thebitnamilegacyimage as all the other cassandra images require you to directly have a full on cassandra config to get them to work.cassandra_data:2. Configure cassandra in the Fluxer Config
3. Prepare Cassandra
Start just the cassandra instance and wait for it to be fully booted (takes about 30-40 seconds) then run the following commands:4. Run Migrations
Now we will get to the hard part as the migration script is not included in the docker image you will have to run all migrations yourself one by one in the shell by going through each file influxer_devops/cassandra/migrations5. Start Fluxer
After all this is done fluxer should be able to start without issuesCaveats
Cassandra tends to eat a lot of RAM so make sure you either host it on a separate machine if possible or you have a beefy server otherwise it will Exited with code 137 while fluxer is up and you get the dreaded loading/splash screenBenefits
You no longer have to deal with the KV SQLite file meaning you can actually easily modify the table entries and etc like adding visionary to a user by running this queryRAM usage improvement
OOTB Cassandra takes up as much RAM as it can (in my case it was 8GB) you can limit the usage by adding this into the compose: environments section on the cassandra service:Comment by @mgabor3141
Comment by @Mar0xy
CASSANDRA_CFG_YAML_DISK_ACCESS_MODE: mmap_index_only