-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #982 from alesstimec/backport-charm-changes-from-f…
…eature-rebac CSS-4547 Backports charm changes from feature-rebac into main.
- Loading branch information
Showing
48 changed files
with
13,811 additions
and
659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
[flake8] | ||
max-line-length = 99 | ||
max-line-length = 120 | ||
select: E,W,F,C,N | ||
exclude: | ||
venv | ||
.git | ||
build | ||
dist | ||
*.egg_info | ||
ignore = W503 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,64 @@ | ||
# jimm | ||
# Contributing | ||
|
||
## Overview | ||
|
||
This documents explains the processes and practices recommended for contributing enhancements to | ||
this operator. | ||
|
||
- If you would like to chat with us about your use-cases, you can reach | ||
us at [Discourse](https://chat.charmhub.io/charmhub/channels/jaas). | ||
- Familiarising yourself with the [Charmed Operator Framework](https://juju.is/docs/sdk) library | ||
will help you a lot when working on new features or bug fixes. | ||
- All enhancements require review before being merged. Code review typically examines | ||
- code quality | ||
- test coverage | ||
- user experience for Juju administrators this charm. | ||
- Please help us out in ensuring easy to review branches by rebasing your pull request branch onto | ||
the `main` branch. This also avoids merge commits and creates a linear Git commit history. | ||
|
||
## Developing | ||
|
||
Create and activate a virtualenv with the development requirements: | ||
You can create an environment for development with `tox`: | ||
|
||
```shell | ||
virtualenv -p python3 venv | ||
source venv/bin/activate | ||
pip install -r requirements-dev.txt | ||
pip install tox | ||
``` | ||
|
||
The charm additionally requires the following relations: | ||
- ingress, interface: ingress | ||
- database, interface: postgresql_client | ||
- vault, interface: vault-kv | ||
- certificates, interface: tls-certificates | ||
|
||
virtualenv -p python3 venv | ||
source venv/bin/activate | ||
pip install -r requirements-dev.txt | ||
### Testing | ||
|
||
## Intended use case | ||
```shell | ||
tox -e fmt # update your code according to linting rules | ||
tox -e lint # code style | ||
tox -e unit # unit tests | ||
tox -e integration # integration tests | ||
tox # runs 'lint' and 'unit' environments | ||
``` | ||
|
||
This JIMM operator charm is intended for deploying the | ||
Juju Intelligent Model Manager in a k8s cluster. The charm | ||
does not use relations to connect to postgresql and/or | ||
vault as it is assumed those services could be deployed | ||
in a different model. | ||
|
||
## Roadmap | ||
## Build charm | ||
|
||
* Add postgresql relation | ||
* Add vault relation (when a k8s vault charm becomes available) | ||
Build the charm in this git repository using: | ||
|
||
## Testing | ||
```shell | ||
charmcraft pack | ||
``` | ||
|
||
The Python operator framework includes a very nice harness for testing | ||
operator behaviour without full deployment. Just `run_tests` : | ||
### Deploy | ||
|
||
./run_tests | ||
```bash | ||
# Create a model | ||
juju add-model dev | ||
# Enable DEBUG logging | ||
juju model-config logging-config="<root>=INFO;unit=DEBUG" | ||
# Deploy the charm | ||
juju deploy ./juju-jimm-k8s_ubuntu-22.04-amd64.charm | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# Copyright 2022 Canonical Ltd | ||
# See LICENSE file for licensing details. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.