Commit Graph

12 Commits

Author SHA1 Message Date
Dmitry Tantsur 9b83665d83 Generate an environment file during bifrost-cli install
It is recommended to pass the same variables (e.g. testing) to other
commands and playbooks, the new file makes it possible.

Change-Id: I2adc4e2dcfd8555b2c9e6c3bf0f512f603367091
2022-01-06 15:36:47 +01:00
Jacob Anders fbb66d1bc3 Add ansible collections symlink to .gitignore
https://review.opendev.org/#/c/742192/ added the creation of
symbolic link to Ansible Collections to env-setup.sh script
however it overlooked adding the symbolic link to .gitignore.
This change resolves this issue.

Change-Id: I5327b67d42b196c1e16d97ba562d1f7845ab407f
2020-07-27 12:00:01 +10:00
Dmitry Tantsur 12c6f7120f Quick start Bifrost CLI
This change adds a local CLI ./bifrost-cli that allows to easily
run bifrost playbooks. It is targeting early adopters and thus
is opinionated and does not expose all possible options.

Only the very minimum is provided in this patch. More options
will be added later as we decide they are important.

Documentation will also be provided later as it's going to be
quite large. This feature should be considered technical preview
at this point until we give it more testing.

Change-Id: I2205e759431024124518716eccd07f79bda14f3a
2020-06-10 15:03:47 +02:00
Riccardo Pittau db3d46a7d3 Switch to stestr
Use stestr for tests.

Also clean tox.ini and add check for flake8 H106:
Don't put vim configuration in source files.

Change-Id: Ia76961a091688372c6df363d5e1dcb29ff0f39bf
2020-03-17 07:48:42 +01:00
KaiFeng Wang 1b8ab72ba1 Update .gitignore
This patch updates two exclude rules to .gitignore:

1. Exclude .idea directory created by some IDEs based
   on IntelliJ.
2. Exclude .DS_Store generated by MacOS system.

Change-Id: If89c73f30c14fee5a92e21ee97a0545c6a1067d9
2017-08-03 10:07:01 +08:00
Arundhati Surpur c9b0e50b3a Update .gitignore
Because egg* already ignores egg-info.

Change-Id: I13dc838647c69ccf2e522e9e309f5fefbbd64ba1
2017-07-22 00:50:57 +05:30
Pavlo Shchelokovskyy 7a7f858ae2 Always install Ansible with pip
Instaling and using Ansible from source for bifrost has several
drawbacks, mainly due to how Ansible's 'ansible/hacking/env-setup'
script mangles with PATH and PYTHONPATH, which complicates running it as
part of other scripts. Besides, cloning the whole repo and it's
submodules is somewhat longer.

The main reason why we were doing that at all was a necessity to install
some additional Ansible modules from newer Ansible versions, which we
dropped right into the source of Ansible code - but this does not have to
be so.

Luckily for us, all Ansible versions we target to support can load
modules from 'library' directory next to playbooks/roles,
and we already use that for 'os_ironic_facts' module.
The need to install a particular module can be assessed by running
ad-hoc 'ansible' command against localhost with the module in question
and without any arguments ('ansible localhost -m <module>'):
- if the module is available in Ansible, the stderr will contain
  "changed" substring (as part of the standard module output)
- if the module is absent form Ansible, "changed" string will be absent
  from stderr too, in which case we can download the module from github
  directly into 'playbooks/library' directory.

This patch removes possibility of installing Ansible from source, and
always installs a released Ansible version via pip.
If not installed into venv, Ansible will be installed in user's ~/.local
directory via 'pip install --user'.
The missing but needed modules are downloaded as described above.

Some level of backward compatibility is provided:
- when the ANSIBLE_GIT_BRANCH has form of 'stable-X.Y', the
  env-setup.sh script will do the next best thing and install latest
  available Ansible version of X.Y.w.z

Also, ANSIBLE_PIP_VERSION can now accept a full pip version specifier:
- if ANSIBLE_PIP_VERSION starts with a digit, this exact version will be
  installed (as 'ansible==X.Y.W.Z')
- otherwize this whole variable is assigned as Ansible version specifier
  for pip, e.g

    env ANSIBLE_PIP_VERSION="<2.2" env-setup.sh

  will result in pip being called as

    pip install -U "ansible<2.2"

Closes-Bug: #1663562
Change-Id: I2c9f47abbbb6740d03978f684ad2c876749655b7
2017-02-13 13:10:54 +02:00
Markos Chandras fe9680c61f Ignore Ansible retry files in .gitignore
Add an entry to .gitignore to prevent accidental commits of the Ansible
retry files.

Change-Id: Ib67e0cec5a056433e2589772aa7aa7ab18940cad
2016-09-23 10:25:40 +01:00
Julia Kreger 3c62f730a1 Initial support for Reno
Since everyone is going to reno, why not bifrost as well.

Adds basic substrate for reno, which may be incorrect, however
that can be addressed as time goes on.

Change-Id: I36caf7682de56917be90bed14e290c5509c7fa86
2015-12-17 05:17:27 -05:00
Peter Martini 129ec60970 Add `logs' from test-bifrost to .gitignore
The directory is created during a test-bifrost.sh and so
shouldn't be watched by git.

Change-Id: Iab7cf67ef66c157139fd89dbd889fb2e8f161771
2015-07-03 12:42:01 -04:00
Jenkins 2a9d49d9bc Add cookiecutter-generated files for project
Use cookiecutter (https://git.openstack.org/openstack-dev/cookiecutter)
to generate config for tox so we can generate docs, run pep8, etc.
Also move CONTRIBUTING.rst to the root of the repository in keeping
with what seems to be the standard location. This move allows us to
easily generate the docs. Also include a tiny fix to allow pep8 to
run cleanly.

Change-Id: Ifbfc6d85c7b02bf4ab989974b491a3a1ae6f0900
2015-06-10 08:40:19 -07:00
Zhenguo Niu de79209b8c Add .gitignore file
Change-Id: I1c2430f6dff5770374bb8a220f1909a5f412e6b9
2015-06-04 10:48:33 +08:00