Charmed MongoDB
- By Canonical Data Platform
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
5/stable | 117 | 20 Apr 2023 | |
5/candidate | 117 | 20 Apr 2023 | |
5/edge | 118 | 03 May 2023 | |
3.6/stable | 100 | 28 Apr 2023 | |
3.6/candidate | 100 | 13 Apr 2023 | |
3.6/edge | 100 | 03 Feb 2023 |
juju deploy mongodb --channel 5/stable
You will need Juju 2.9 to be able to run this command. Learn how to upgrade to Juju 2.9.
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
charms.mongodb.v0.helpers
-
- Last updated 03 May 2023
- Revision Library version 0
Simple functions, which can be used in both K8s and VM charms.
Index
def
get_create_user_cmd(
config: MongoDBConfiguration,
mongo_path
)
Creates initial admin user for MongoDB.
Description
Initial admin user can be created only through localhost connection. see https://www.mongodb.com/docs/manual/core/localhost-exception/ unfortunately, pymongo not able to create connection which considered as local connection by MongoDB, even if socket connection used. As result where are only hackish ways to create initial user. It is needed to install mongodb-clients inside charm container to make this function work correctly
def
get_mongod_args(
config: MongoDBConfiguration,
auth: bool,
snap_install: bool
)
Construct the MongoDB startup command line.
Returns
def generate_password()
Generate a random password string.
Returns
def generate_keyfile()
Key file used for authentication between replica set peers.
Returns
def
build_unit_status(
mongodb_config: MongoDBConfiguration,
unit_ip: str
)
Description
Generates the status of a unit based on its status reported by mongod. None
def copy_licenses_to_unit()
Description
Copies licenses packaged in the snap to the charm's licenses directory. None