[08:03] <TheAbsentOne> Anyone has a ready-to-use redis/mongo/cassandra example by any chance on how to use the charms/interfaces. It would save me some time. Also is it possible for 2 charms to have 2 relations? Let's say charm A and mysql can I use both mysql-root interface and ordinary mysql interface?
[08:03] <TheAbsentOne> Root for root user and ordinary mysql for a db request
[08:13] <stub> TheAbsentOne: https://git.launchpad.net/cqlsh-charm/tree/ is the only Cassandra example in existence as far as I'm aware. Its published at cs:~cassandra-charmers/cqlsh
[08:17] <stub> TheAbsentOne: Yes, you should be able to use both mysql-root and mysql relations at the same time.
[08:18] <stub> (I did trip over an Amulet bug the other day though that I need to follow through on, where it never actually adds the second relation)
[08:18] <TheAbsentOne> I've never used cassandra before though but what does 'write_cqlshrc('root')' and ubuntu actually do stub? As far as I could understand I need a host of cassandra, a port and a keyspace name to properly connect to it right?
[08:19] <TheAbsentOne> I see, well tbf I think it's not a good practice, but I fail to properly create a database with the mysql-root interface so kinda an issue
[08:19] <stub> TheAbsentOne: The write_cqlshrc helper is specific to writing the .cqlshrc file, which is probably not used except by the cqlsh tool.
[08:19] <TheAbsentOne> ahn I see
[08:19] <stub> (I just put it in the interface as I expect people may want their clients to include cqlsh for reasons)
[08:20] <TheAbsentOne> so in the example there isn't actually a request for a db
[08:21] <stub> TheAbsentOne: You want ep.details to get the raw connection details.
[08:21] <stub> Cassandra doesn't have databases, it has keyspaces
[08:21] <TheAbsentOne> euh yeah i meant keyspaces my bad
[08:21] <stub> And the interface doesn't support asking the Cassandra charm to create it. There are too many options
[08:22] <stub> (choosing replication factors, compaction strategies.... Cassandra is... Cassandra)
[08:23] <TheAbsentOne> so let's say I have a charm and I install some sort of third party python library for cassandra (will need to google for that), with that I would be able to create a keyspace right?
[08:24] <stub> Yes. You might need to do it over the database-admin relation rather than the database one (I don't recall)
[08:24] <TheAbsentOne> "        >>> ep = reactive.endpoint_from_flag('endpoint.mydb.available')         >>> first_details = ep.details[0] if ep.details else None" <-- what does the ep.details[0] return in this case?
[08:25] <stub> You probably want a handler that waits until you have 3 Cassandra units ready, then issue a CREATE KEYSPACE command specifying the keyspace name and replication strategy
[08:26] <TheAbsentOne> I see, well I start of with fixing my mysql then redis and mongo and maybe I'll try cassandra but I doubt I will succeed x)
[08:26] <TheAbsentOne> You know what I'm gonna put some repo's online with minimal working examples so you guys can better help me and hotfix where needed x) I'll get to it asap and I think it might be a nice collection of examples for newcommers too
[08:26] <TheAbsentOne> thanks for the info stub
[08:26] <stub> TheAbsentOne: That returns a the CassandraDetails instance for the first unit, or None if there are no nits ready
[08:26] <stub> Sorry, that is wrong
[08:27] <TheAbsentOne> it's a list with all these attrubites probably
[08:27] <stub> That returns the CassandraDetails instance for the first relation found, or None if there are no units ready
[08:27] <TheAbsentOne> ahn right
[08:27] <stub> (you can relate a charm multiple times to different Cassandra deployments, if you are into really, really big data ;) )
[08:28] <TheAbsentOne> right right that's good stuff but way over my head right now xD just a stupid student over here
[08:28] <TheAbsentOne> but it's there that I would get my connection detail info ^^
[08:28] <TheAbsentOne> great!
[08:28] <stub> Yes
[08:28] <stub> I should create a shortcut for that, because it is what almost all charms will need to do, but don't know what to call it.
[08:32] <TheAbsentOne> connectiondetails is clear and pretty universal
[08:34] <TheAbsentOne> I do think it would be usefull if a requesting charm could simply get that like how the standard mysql renders config file. With ep.host(), ep.port() etc but that's probably me wanting it to easy x)
[13:44] <stickupkid> hml: code review done
[15:32] <kwmonroe> TheAbsentOne: regarding mysql:db vs mysql:db-admin, yes, a single charm can relate to both.  i've updated the readme at https://github.com/juju-solutions/interface-mysql-root showing what the -root interface does.  i do not believe you can specify an admin vs non-admin user for a single charm, so charm A will only have 1 set of user creds passed over the db and db-admin relations.
[15:33] <kwmonroe> in hindsight, it feels like the mysql interface should be able to handle an admin as well as non-admin request.  maybe that can be refactored to make the mysql-root interface obsolete.
[15:34] <kwmonroe> even if the interface doesn't do it, maybe it would fit better as an action on mysql/mariadb charms.  juju run-action mysql grant-admin.
[15:44] <stub> kwmonroe: I just changed that in the Cassandra charm, so the database and database-admin relations both use the 'cassandra' interface. I don't think anything cares about the interface name apart from charms.reactive, so it seemed just legacy cruft from how it used to be.
[15:45] <stub> Might be too late for mysql if the interfaces are already published
[15:48] <TheAbsentOne> hi kwmonroe I wanted to talk to you about it actually. I really miss the feature to name a database on the mysql interface (mysql-shared has this) and I need a way to have a user that can access the db from another host/charm/whatever then the "requesting charm" and right now it seems only mysql-root interface can do this (kinda). Imo it should all be possible on mysql interface and it would make way more sense too but that's just
[15:48] <TheAbsentOne> talking here
[15:49] <TheAbsentOne> because in my use case I don't really need an administrator per se, I need the user as provided by the mysql-shared (or mysql) interface but he needs to be able to access the db from other (known) hosts as well
[15:50] <TheAbsentOne> and I can't figure it out how to properly do that :P
[17:29] <rick_h_> zeestrat: :P I was just typing that out. You beat me!
[19:53] <zeestrat> rick_h_: Had to do a quick check myself if anyone had me beat before I hit send ;)
[19:59] <zeestrat> rick_h_: As a note, is that documented anywhere on docs.jujucharms? My quick search doesn't turn up with anything.
[20:36] <rick_h_> zeestrat: no, but it came up around more developer related docs and the teams' getting a discourse instance soon that we'll move stuff like that to