-
Notifications
You must be signed in to change notification settings - Fork 80
[Question] Database schema load #6
Comments
Hi Matt, thanks for your feedback! Currently it's not possible to create a (I suppose CQL3) schema in Cassandra with this Puppet module but it might make sense to implement that feature. Would you mind describing your use case (and how you currently create the keyspaces and schemas) in a little more detail? Best regards |
Hey, Yes could be nice to have this feature :) cql3 or "raw" cassandra.
Regards, Matt |
There can be a problem when loading the schema just after installing cassandra. Matt |
We are currently using something like the following: define cassandra::configure(
$content = undef,
$source = undef) {
include ::cassandra
$config_file = "${cassandra::base_path}/puppet-tmp/${title}"
file { $config_file:
content => $content,
source => $source,
owner => $cassandra::user,
group => $cassandra::user,
notify => Exec["configure-keyspaces-${title}"],
}
exec {"configure-keyspaces-${title}":
user => $cassandra::user,
# Check that cassandra has started up with nodetool and then execute the main script
command => "${cassandra::base_path}/bin/nodetool status && ${cassandra::base_path}/bin/cassandra-cli -h ${cassandra::bindaddress} -f ${config_file} > ${config_file}.log 2>&1",
provider => 'shell',
tries => 3,
refreshonly => true
try_sleep => 2,
}
Class['cassandra::service'] -> Cassandra::Configure<| |>
} Some things to note...
nikolavp |
Hi,
Can we load the database schema from this puppet module, or do we need to do it after applying the recipe ?
Very nice job, I'm currently using it on the Grid'5000 testbed (https://www.grid5000.fr/mediawiki/index.php/Grid5000:Home) !
Best Regards
Matt
The text was updated successfully, but these errors were encountered: