Shared and reusable code for Mongo-related charms
Project description
Mongo Charms Single Kernel library
Library containing shared code for MongoDB operators (mongodb, mongos, VM and k8s).
The goal of this library is to provide reusable and shared code for the four mongo charms:
Code layout
The source code can be found in single_kernel_mongo/ The layout is organised as so:
- configurations
- core services
- events handlers
- event managers
- charm state
- charm workloads
- utils and helpers
- abstract charm skeleton
- exceptions
Charm Structure
This single kernel library aims at providing a clear and reliable structure, following the single responsibility principle. All the logic is expected to happen in this library and a charm should be no more than a few lines defining the substrate, the operator type and the config.
class MongoTestCharm(AbstractMongoCharm[MongoDBCharmConfig, MongoDBOperator]):
config_type = MongoDBCharmConfig
operator_type = MongoDBOperator
substrate = Substrates.VM
peer_rel_name = PeerRelationNames.PEERS
name = "mongodb-test"
Contributing
You can have longer explanations in ./CONTRIBUTING.md but for a quick start:
# Install poetry and tox
pipx install tox
pipx install poetry
poetry install
Code quality is enforced using pre-commit hooks. They will run before each commit and also at other stages.
# Install the first time
pre-commit install
# Run it manually with
pre-commit run --all-files
Once a PR is opened, it's possible to trigger integration testing on the charms with a comment on the PR. This can be run only by members of the Data and AI team
Use the following syntax:
* /test to run on 4 charms.
* /test/<mongodb | mongos>/<vm | k8s> to run on a specific charm.
* /test/*/<vm | k8s> to run for both charms on a specific substrate.
This will create a PR with an updated version of the library on the selected charms.
Project and community
Mongo Charms Single Kernel library is an open source project that warmly welcomes community contributions, suggestions, fixes, and constructive feedback.
- Check our Code of Conduct
- Raise software issues or feature requests on GitHub
- Report security issues through LaunchPad.
- Meet the community and chat with us on Matrix
- Contribute to the code
License
The Mongo Single Library is free software, distributed under the Apache Software License, version 2.0. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mongo_charms_single_kernel-1.8.24.tar.gz.
File metadata
- Download URL: mongo_charms_single_kernel-1.8.24.tar.gz
- Upload date:
- Size: 300.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e8f440b0830ea11d58bf5cbb7e16213fc7e7fb7785cfd89b6e09175ad2adb22
|
|
| MD5 |
7f5cd88d8c8610db41016e6701dd33ed
|
|
| BLAKE2b-256 |
420c6a2055385458cef6d3a4355fb9707e260bfefd06aaa869e0d6ef57390b4c
|
Provenance
The following attestation bundles were made for mongo_charms_single_kernel-1.8.24.tar.gz:
Publisher:
release.yaml on canonical/mongo-single-kernel-library
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mongo_charms_single_kernel-1.8.24.tar.gz -
Subject digest:
9e8f440b0830ea11d58bf5cbb7e16213fc7e7fb7785cfd89b6e09175ad2adb22 - Sigstore transparency entry: 831989854
- Sigstore integration time:
-
Permalink:
canonical/mongo-single-kernel-library@334744f1b36cc73fb237cf9be0b1befd9682fd04 -
Branch / Tag:
refs/heads/8/edge - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@334744f1b36cc73fb237cf9be0b1befd9682fd04 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mongo_charms_single_kernel-1.8.24-py3-none-any.whl.
File metadata
- Download URL: mongo_charms_single_kernel-1.8.24-py3-none-any.whl
- Upload date:
- Size: 353.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bc32466eee0555a3870b90bbc1e4f74b0920ce101ba734823ae42cf2d6344f0
|
|
| MD5 |
2f491b30f037148b61f75e31604d9d0f
|
|
| BLAKE2b-256 |
2bb3b55f5273c08dbea8241d67abb3d2d935320457043446ef3f7aa7f329d2d6
|
Provenance
The following attestation bundles were made for mongo_charms_single_kernel-1.8.24-py3-none-any.whl:
Publisher:
release.yaml on canonical/mongo-single-kernel-library
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mongo_charms_single_kernel-1.8.24-py3-none-any.whl -
Subject digest:
7bc32466eee0555a3870b90bbc1e4f74b0920ce101ba734823ae42cf2d6344f0 - Sigstore transparency entry: 831989857
- Sigstore integration time:
-
Permalink:
canonical/mongo-single-kernel-library@334744f1b36cc73fb237cf9be0b1befd9682fd04 -
Branch / Tag:
refs/heads/8/edge - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@334744f1b36cc73fb237cf9be0b1befd9682fd04 -
Trigger Event:
push
-
Statement type: