This is a Juju charm interface layer. This interface is used to connect to ArangoDB.
requires:
arangodb:
interface: arangodb
@when('arangodb.available')
def connect_to_arangodb(arangodb):
print(arangodb.host(), arangodb.port(), arangodb.username(), arangodb.password())
)
The ArangoDB charm can be found here:
provides:
db:
interface: arangodb
@when('arangodb.installed', 'db.available')
def configure_interface(db):
conf = config()
db.configure(conf['port'], kv.get('username'), kv.get('password'))
peers:
cluster:
interface: arangodb
@when('cluster.connected')
def configure_cluster(cluster):
units = cluster.get_peer_addresses()
install_cluster(units, True)