Simplify pulling of images in installer, and pull OSM prometheus image before deploying
[osm/devops.git] / installers / charm / osm-update-db-operator / CONTRIBUTING.md
1 <!-- Copyright 2022 Canonical Ltd.
2
3 Licensed under the Apache License, Version 2.0 (the "License"); you may
4 not use this file except in compliance with the License. You may obtain
5 a copy of the License at
6
7         http://www.apache.org/licenses/LICENSE-2.0
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 License for the specific language governing permissions and limitations
13 under the License.
14 -->
15 # Contributing
16
17 ## Overview
18
19 This documents explains the processes and practices recommended for contributing enhancements to
20 the Update DB charm.
21
22 - Generally, before developing enhancements to this charm, you should consider [opening an issue
23   ](https://github.com/gcalvinos/update-db-operator/issues) explaining your use case.
24 - If you would like to chat with us about your use-cases or proposed implementation, you can reach
25   us at [Canonical Mattermost public channel](https://chat.charmhub.io/charmhub/channels/charm-dev)
26   or [Discourse](https://discourse.charmhub.io/). The primary author of this charm is available on
27   the Mattermost channel as `@davigar15`.
28 - Familiarising yourself with the [Charmed Operator Framework](https://juju.is/docs/sdk) library
29   will help you a lot when working on new features or bug fixes.
30 - All enhancements require review before being merged. Code review typically examines
31   - code quality
32   - test coverage
33   - user experience for Juju administrators this charm.
34 - Please help us out in ensuring easy to review branches by rebasing your pull request branch onto
35   the `main` branch. This also avoids merge commits and creates a linear Git commit history.
36
37 ## Developing
38
39 You can use the environments created by `tox` for development:
40
41 ```shell
42 tox --notest -e unit
43 source .tox/unit/bin/activate
44 ```
45
46 ### Testing
47
48 ```shell
49 tox -e fmt           # update your code according to linting rules
50 tox -e lint          # code style
51 tox -e unit          # unit tests
52 # tox -e integration   # integration tests
53 tox                  # runs 'lint' and 'unit' environments
54 ```
55
56 ## Build charm
57
58 Build the charm in this git repository using:
59
60 ```shell
61 charmcraft pack
62 ```
63
64 ### Deploy
65
66 ```bash
67 # Create a model
68 juju add-model test-update-db
69 # Enable DEBUG logging
70 juju model-config logging-config="<root>=INFO;unit=DEBUG"
71 # Deploy the charm
72 juju deploy ./update-db_ubuntu-20.04-amd64.charm \
73   --resource update-db-image=ubuntu:latest
74 ```