It’s pretty easy to make Ansible, or Python with Jinja by itself if you don’t 
use Ansible, and just templatize your config file so the environment variables 
get substituted.

From: Jeff Jirsa <jji...@gmail.com>
Reply-To: "user@cassandra.apache.org" <user@cassandra.apache.org>
Date: Monday, June 29, 2020 at 10:36 AM
To: cassandra <user@cassandra.apache.org>
Subject: Re: Can cassandra pick configuration from environment variables

Message from External Sender
You can probably implement a custom config loader that pulls all the config 
from env vars, if you're so inclined (a bit of java, the interface has a single 
method, maybe one or two hooks into the db, which may be suitable for 
committing for general purpose use).

On Mon, Jun 29, 2020 at 4:35 AM Angelo Polo 
<language.de...@gmail.com<mailto:language.de...@gmail.com>> wrote:
You can, however, set the environment variable CASSANDRA_CONF to direct the 
startup script to the configuration directory that holds cassandra.yaml, 
cassandra-env.sh, etc. So while you can't set individual C* configuration 
parameters from environment variables, you could have different configuration 
directories (can think of them as different profiles) and specify at startup 
which to use.

Best,
Angelo Polo

On Sun, Jun 28, 2020 at 2:28 PM Erick Ramirez 
<erick.rami...@datastax.com<mailto:erick.rami...@datastax.com>> wrote:
You can't. You can only configure Cassandra by setting the properties in 
cassandra.yaml file. Cheers!

Reply via email to