New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 promotion #863

Merged
merged 237 commits into from Jun 12, 2017

Conversation

Projects
None yet
4 participants
@retr0h
Member

retr0h commented Jun 12, 2017

Promoting the long running v2 branch to master. The
v1 branch contains the previous state of master, and
will be used for future Molecule v1 work.

retr0h and others added some commits Dec 5, 2016

Init add of molecule v2 work
Initial work of a v2 based Molecule.  This version of Molecule
has a slightly different config, uses Ansible to boostrap the
container vs relying on Molecule glue drivers, and only supports
Docker at this time.

Implemented the following subcommands.

1. Create
2. Converge
3. Destroy
4. Verify
5. Lint

Will no longer squash into this commit, and will build ontop.
Various fixups on way to MVP
* Reworked provider class to handle converge.
* Hid the use of AnsiblePlaybook inside the provisioner.
* Passing of os.environ to sh bake calls.
* Continue to cleanup tests.
Improved coverage
* Added unit tests for docker driver.
* 100% ansible.py provisioner.
* 100% testinfra.py verifier.
Added multi-node scenario
The platform name is now appended with the scenario name.
Added basic functional testing framework
Added very basic functional testing from v1 molecule.
Added init and enabled lint subcommand
Added a basic init subcommand and enabled the existing lint command.
Moved config properties into respective base
Config didn't need properties for everything, since base has
properties for each top level class.  Moved the properties
into their respective class.
Many cleanups
* Cleaned up tox.ini.
* Added a dependency sub command.
* Added gilt dependency manager.
* Removed crazy parametrized test config handling.
Init cleanups
* Removed duplicate _process_templates calls.
* Updated docstring to match rest of project.
Added doc strings where necessary
Did not document methods which are obvious.
Added usage/configuration through doc strings
As part of documenting ansible-lint, implemented proper exclude
options handling.
[v2] move cookiecutter back to molecule directory (#678)
- also skip guilt tests verifying bake params, since the param ordering is not deterministic
Implemented scenario_name filtering sub commands (#681)
Sub commands will execute all scenarios, unless the `--scenario-name`
flag is passed.

Fixes: #680
No merging of local config onto scenario config (#685)
It no longer makes sense to merge the local config onto the scenario
config since a scenario can be anything.  In an attempt to keep things
simple, removed this functionality.

Partial-Fix: #684
Implemented duplicate scenario name validation (#686)
Since we can target a scenario based on name, we should not allow
duplicate scenarios to be created.

Fixes: #682
Implemented yaml inventory file (#690)
Moved the generated host inventory from the proprietary "ini" format to
Ansible's new yaml format.

Fixes: #683
Moved vivify under provisioner class
Until we need it elsewhere lets keep it private and inside the
class.
Added state module from v1
Ported over v1's state module.
Add state management to destroy, create, converge
The destroy, create, and converge sub commands are logging their state
to the state file.  We will then make decisions off of that data later.
Idempotence errors if not already converged (#698)
Idempotence should only be run when instances have already
been converged.

Fixes: #694
Run dependency managers only when config present (#699)
Molecule should automatically install dependencies, when the
requirements file is present.

Fixes: #695
Corrected skipping testinfra tests
Tests were skipped due to bad inventory path.  Also, updated
cookiecutter `molecule init` template.
Implemented status subcommand (#706)
* Better capsys variable naming

* Implemented status subcommand

Fixes: #703
Implemented Molecule ansible plugin paths (#708)
Implemented a directory structure to hold ansible plugins for use with
ansible-playbook.  In this commit, added a filter plugin to construct
$instance_name-$scenario_name in playbooks.
Make ansible.cfg settings configurable
Ansible.cfg is written to disk from the provisioners config options.
File is entirely customizable.

retr0h and others added some commits May 24, 2017

Pin pytest
Running into a bug with pytest 3.1.0 and pytest-verbose-parametrize.
Pinning for now.
Pin new version of pbr
Was not compatible with newer Sphinx.
Define ansible ssh common args
When running under tox the path is too long, which causes SSH failures.
Defaulted to a shorter path.
Added base provisioner class
This is potentially setting molecule up for future Helm provisioner.
Added dict_at_index filter plugin
Having ansible convert a dict to a list isn't trivial inside a playbook.
Much easier to do in python, so created a filter plugin.  This also
prevents the Docker create play from unnecessarily looping over each
platform.

> Most everything one hates with Ansible can be corrected with a filter
> plugin.

  - Said None
Ability to init a role with cookiecutter template
Users may wish to supply their own Molecule templates.  Molecule
uses cookiecutter internally, it makes sense to simply use templates
provided by a cookiecutter repo.
Ported v1 trailing whitespace linter to v2
This is not currently enabled.  Not sure how I would like to approach
this.
bumped for release of 1.25
(cherry picked from commit e2a43c5)
Resynced goss library
7b92738 brought in a bug.
Brought in updated sh
This version of sh corrects a py3 issues we ran into.
A few python 3.6 fixes
Still cannot run python 3 against Ansible, due to Ansible not seeming
to fully support py3.
Additional py3 fix
Bug was introduced at a13d5a2.
Added additional Vagrant Molecule Module docs
Along with documenting the molecule vagrant module, corrected
a few bugs which were found.
Preserve special ANSIBLE_ envs with their value
ANSIBLE_ like environment variables have higher precedence over their
equivalents inside ansible.cfg.  Thus, if the envs are set on CLI, the
roles_path, library and filter_plugins inside ansible.cfg are completely
ignored.

No longer set these inside ansible.cfg, and pass them as env vars
to the provisioner and ansible-lint.  This prevents one from providing
these on the command line, since molecule.yml provides a mechanism for
setting env vars.

Fixes: #845
Lame attempt at unit/functional targeting
Not really fond of this approach -- feels anti-tox.
Added v1 docs to the readme
This will help clarify usage once v2 is merged to master.
Merge branch 'master' into v2
Promoting the long running v2 branch to master.  The
v1 branch contains the previous state of master, and
will be used for future Molecule v1 work.

@retr0h retr0h merged commit 2670676 into metacloud:master Jun 12, 2017

@retr0h retr0h deleted the retr0h:v2-promotion branch Jun 12, 2017

@retr0h retr0h added the v2.0 label Jun 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment