Add Keystone charm
[osm/devops.git] / installers / charm / osm-keystone / CONTRIBUTING.md
1 # Copyright 2021 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
16 # Contributing
17
18 ## Overview
19
20 This documents explains the processes and practices recommended for contributing enhancements to
21 the Keystone charm.
22
23 - If you would like to chat with us about your use-cases or proposed implementation, you can reach
24   us at [OSM public channel](https://opensourcemano.slack.com/archives/CA2TLA48Y)
25 - Familiarising yourself with the [Charmed Operator Framework](https://juju.is/docs/sdk) library
26   will help you a lot when working on new features or bug fixes.
27 - All enhancements require review before being merged. Code review typically examines
28   - code quality
29   - test coverage
30   - user experience for Juju administrators this charm.
31 - Please help us out in ensuring easy to review branches by rebasing your gerrit patch onto
32   the `master` branch.
33
34 ## Developing
35
36 You can use the environments created by `tox` for development:
37
38 ```shell
39 tox --notest -e unit
40 source .tox/unit/bin/activate
41 ```
42
43 ### Testing
44
45 ```shell
46 tox -e fmt           # update your code according to linting rules
47 tox -e lint          # code style
48 tox -e unit          # unit tests
49 # tox -e integration   # integration tests
50 tox                  # runs 'lint' and 'unit' environments
51 ```
52
53 ## Build charm
54
55 Build the charm in this git repository using:
56
57 ```shell
58 charmcraft pack
59 ```
60
61 ### Deploy
62
63 ```bash
64 # Create a model
65 juju add-model test-keystone
66 # Enable DEBUG logging
67 juju model-config logging-config="<root>=INFO;unit=DEBUG"
68 # Deploy the charm
69 juju deploy ./keystone_ubuntu-22.04-amd64.charm \
70   --resource keystone-image=opensourcemano/keystone:testing-daily --series jammy
71 ```