Skip to main content

Configuration

In order to use a notebook with an ApertureDB instance, it is necessary to supply details about how to connect. Primarily, this consists of the host name, the user name, and the password. You can supply this information directly to Connector.Connector() or Configuration.Configuration(), but it is usually better to store password information outside of your source code. A more convenient approach is to call CommonLibrary.create_connector().

create_connector() looks for configuration information in a number of places. Some of these try to find an existing configuration. To create a configuration manually, see adb config create.

create_connector() will also get connection information from its environment in the form of a JSON string. This JSON string is offered as a convenience method to provide all connection information in one place. The correct contents of this JSON string will depend on how you have set up your ApertureDB instance.

Getting Your JSON String

If you created your ApertureDB instance using our self-service cloud portal, then you can obtain a partially filled in JSON template by clicking on the "Connect" button for your instance.

Connect button on Cloud

JSON string in Cloud interface

Note that the admin password you selected will not be shown in this interface and must be filled in by you.

Storing Your JSON String

One way to make your JSON string available is by putting it into the APERTUREDB_JSON environment variable:

export `APERTUREDB_JSON='{ "host": "[HOSTNAME]", "username": "admin", "password": "[PASSWORD]"}`

This approach might be useful when running scripts under Docker, as the environment variable can come from one of various possible stores of cloud secrets.