Skip to content
Snippets Groups Projects
Unverified Commit 5bc131eb authored by Ben Kochie's avatar Ben Kochie Committed by GitHub
Browse files

Merge pull request #219 from cloudalchemy/skeleton

[REPO SYNC] Merge pull request #9 from cloudalchemy/superq/more_updates
parents cddc25fd caff9970
No related branches found
No related tags found
No related merge requests found
...@@ -34,13 +34,13 @@ jobs: ...@@ -34,13 +34,13 @@ jobs:
- run: molecule test -s default --destroy always - run: molecule test -s default --destroy always
- run: | - run: |
if [[ -d 'molecule/alternative' ]]; then if [[ -d 'molecule/alternative' ]]; then
molecule test -s alternative --destroy never molecule test -s alternative --destroy always
else else
echo 'No alternative test' echo 'No alternative test'
fi fi
- run: | - run: |
if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ -d 'molecule/latest' ]]; then if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ -d 'molecule/latest' ]]; then
molecule test -s latest --destroy never molecule test -s latest --destroy always
else else
echo 'Not running latest on PR' echo 'Not running latest on PR'
fi fi
......
...@@ -4,19 +4,19 @@ area/docs: ...@@ -4,19 +4,19 @@ area/docs:
- meta/* - meta/*
- CHANGELOG.md - CHANGELOG.md
- CONTRIBUTING.md - CONTRIBUTING.md
- TROUBLESHOOTING.md
- LICENSE - LICENSE
- README.md - README.md
area/tests: area/tests:
- molecule/* - molecule/*
- molecule/**/* - molecule/**/*
- .ansible-lint - .ansible-lint
- .yamllint
- test-requirements.txt - test-requirements.txt
- tox.ini
area/automation: area/automation:
- .travis/* - .circleci/*
- .github/* - .github/*
- .github/**/* - .github/**/*
- .travis.yml
- .mergify.yml - .mergify.yml
area/vars: area/vars:
- defaults/* - defaults/*
......
...@@ -10,3 +10,7 @@ pull_request_rules: ...@@ -10,3 +10,7 @@ pull_request_rules:
merge: merge:
method: squash method: squash
strict: true strict: true
- name: delete head branch after merge
conditions: []
actions:
delete_head_branch: {}
--- ---
extends: default extends: default
ignore: | ignore: |
.travis/
.travis.yml
.github/ .github/
meta/ meta/
......
...@@ -34,17 +34,17 @@ Some great guidelines can be found [here](https://wiki.openstack.org/wiki/GitCom ...@@ -34,17 +34,17 @@ Some great guidelines can be found [here](https://wiki.openstack.org/wiki/GitCom
## Releases ## Releases
We try to stick to semantic versioning and our releases are automated. Release is created by assigning a keyword (in a We try to stick to semantic versioning and our releases are automated. Release is created by assigning a keyword (in a
way similar to travis [`[ci skip]`](https://docs.travis-ci.com/user/customizing-the-build#Skipping-a-build)) to a way similar to circle ci keyword [`[ci skip]`](https://docs.travis-ci.com/user/customizing-the-build#Skipping-a-build))
commit with merge request. Available keywords are (square brackets are important!): to a commit with merge request. Available keywords are (square brackets are important!):
* `[patch]`, `[fix]` - for PATCH version release * `[patch]`, `[fix]`, `[bugfix]` - for PATCH version release
* `[minor]`, `[feature]`, `[feat]` - for MINOR version release * `[minor]`, `[feature]`, `[feat]` - for MINOR version release
* `[major]`, `[breaking change]` - for MAJOR version release * `[major]`, `[breaking change]` - for MAJOR version release
## Changelog ## Changelog
Changelog is generateg automatically on every merged Pull Request and all information is taken from github issues, PRs Changelog is generated automatically during release process and all information is taken from github issues, PRs and
and labels. labels.
## Expectations ## Expectations
...@@ -78,8 +78,9 @@ More information about: ...@@ -78,8 +78,9 @@ More information about:
Please follow [ansible best practices](http://docs.ansible.com/ansible/latest/playbooks_best_practices.html) and Please follow [ansible best practices](http://docs.ansible.com/ansible/latest/playbooks_best_practices.html) and
especially provide meaningful names to tasks and even comments where needed. especially provide meaningful names to tasks and even comments where needed.
Our test framework automatically lints code with [`yamllint`](https://yamllint.readthedocs.io) and Our test framework automatically lints code with [`yamllint`](https://github.com/adrienverge/yamllint),
[`ansible-lint`](https://github.com/willthames/ansible-lint) programs so be sure to follow their rules. [`ansible-lint`](https://github.com/willthames/ansible-lint), and [`flake8`](https://gitlab.com/pycqa/flake8) programs
so be sure to follow their rules.
Remember: Code is generally read much more often than written. Remember: Code is generally read much more often than written.
...@@ -92,6 +93,6 @@ Wherever possible, please refrain from any other formats and stick to simple mar ...@@ -92,6 +93,6 @@ Wherever possible, please refrain from any other formats and stick to simple mar
We are trying to create the best and most secure installation method for non-containerized prometheus stack components. We are trying to create the best and most secure installation method for non-containerized prometheus stack components.
To accomplish this all roles need to support: To accomplish this all roles need to support:
- current and at least one previous ansible version (wherever possible we try to support 2 previous ansible versions) - current and at least one previous ansible version
- systemd as the only available process manager - systemd as the only available process manager
- at least latest debian and CentOS distributions - at least latest debian and CentOS distributions
...@@ -17,7 +17,7 @@ Deploy prometheus [node exporter](https://github.com/prometheus/node_exporter) u ...@@ -17,7 +17,7 @@ Deploy prometheus [node exporter](https://github.com/prometheus/node_exporter) u
## Requirements ## Requirements
- Ansible >= 2.9 (It might work on previous versions, but we cannot guarantee it) - Ansible >= 2.7 (It might work on previous versions, but we cannot guarantee it)
- gnu-tar on Mac deployer host (`brew install gnu-tar`) - gnu-tar on Mac deployer host (`brew install gnu-tar`)
- Passlib is required when using the basic authentication feature (`pip install passlib[bcrypt]`) - Passlib is required when using the basic authentication feature (`pip install passlib[bcrypt]`)
...@@ -85,26 +85,11 @@ We provide demo site for full monitoring solution based on prometheus and grafan ...@@ -85,26 +85,11 @@ We provide demo site for full monitoring solution based on prometheus and grafan
## Local Testing ## Local Testing
The preferred way of locally testing the role is to use Docker and [molecule](https://github.com/metacloud/molecule) (v2.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable for your system. The preferred way of locally testing the role is to use Docker and [molecule](https://github.com/ansible-community/molecule) (v3.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable to for your system. Running your tests is as simple as executing `molecule test`.
We are using tox to simplify the process of testing on multiple ansible versions. To install tox execute:
```sh
pip3 install tox
```
To run tests on all ansible versions (WARNING: this can take some time)
```sh
tox
```
To run a custom molecule command on a custom environment with only default test scenario:
```sh
tox -e py35-ansible28 -- molecule test -s default
```
For more information about molecule go to their [docs](http://molecule.readthedocs.io/en/latest/).
If you would like to run tests on a remote docker host just specify `DOCKER_HOST` variable before running tox tests.
## Travis CI ## Continuous Intergation
Combining molecule and travis CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows creating test scenarios for different role configurations. As a result, we have a quite large test matrix which will take more time than local testing, so please be patient. Combining molecule and circle CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows use to create test scenarios for different role configurations. As a result we have a quite large test matrix which can take more time than local testing, so please be patient.
## Contributing ## Contributing
......
...@@ -3,11 +3,6 @@ dependency: ...@@ -3,11 +3,6 @@ dependency:
name: galaxy name: galaxy
driver: driver:
name: docker name: docker
# lint: |
# set -e
# yamllint .
# ansible-lint
# flake8
platforms: platforms:
- name: bionic - name: bionic
pre_build_image: true pre_build_image: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment