613 Commits

Author SHA1 Message Date
Zuul
702501baa5 Merge "Run authorized_keys as root" 2018-05-07 20:05:52 +00:00
Zuul
6c22fc9431 Merge "Split logging of inventory to its own role" 2018-05-07 19:37:06 +00:00
James E. Blair
a87a1db041 Add logo to docs
Change-Id: Ic39e19e4adca85ecf8d67b35de51d604ec2510be
2018-05-04 14:50:13 -07:00
Paul Belanger
65f310e8a9
Add tox-py36 job
Ubuntu bionic (18.04) provides python3.6, lets write a tox job to also
support it.

Change-Id: I7104a2bdc1e568bf83c618bc2127f8622e6ceba9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-05-02 15:32:53 -04:00
Paul Belanger
49711c6540
Update repo file for fedora-28
With the release of fedora-28, the default locations for
fedora-update.repo have changed. We still need to support fedora-27
until fedora-29 is released.

Change-Id: I8eacd659cf18a8dc571aea6531483610fcd91d1a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-05-02 12:28:36 -04:00
Zuul
19868f7d2b Merge "Add installation/deprecation documentation" 2018-04-26 17:42:59 +00:00
Zuul
655b466211 Merge "Remove support for extensions as lists" 2018-04-26 13:20:48 +00:00
Andrea Frittoli (andreaf)
e79be26f70 Run authorized_keys as root
Using become_user only works if either the ansible_user is root
or pipeling is enabled. Use become instead to avoid the dependency
on pipelining being enabled.

Change-Id: I2ca65ab38b51d4949295674abfe594ce26fe35a1
2018-04-24 11:57:43 +01:00
Clark Boylan
f27644c187 Split logging of inventory to its own role
The ability to read and write the inventory is privileged and requires
you are running in a trusted context. This makes testing the
validate-host role difficult as it reads the inventory file and writes
it to the job log dir.

Make a new role called log-inventory that will allow us to eventually
remove this task from validate-host enabling better testing of validate
host. Also this will allow us to log the inventory in the post-run
logging activity.

Change-Id: I4098fd140484bc54dc95b5f4c51afb1c56c7b19c
2018-04-23 15:53:15 -07:00
Andrea Frittoli
4ea02ec487 Deploy ssh key as root for non-root users
The role to distribute the build ssh key to a user uses the "copy"
module in combination with become_user. When the target user is not
root, this does not work because the ansible user is not root
either and "copy" is not compatible with pipelining:
http://docs.ansible.com/ansible/latest/user_guide/become.html#becoming-an-unprivileged-user

To solve the issue run the copy as root and set the owner of the
target file. Use the "user" module to resolve "~" to the target user
home directory.

Change-Id: Ic66eb2b14bc55a412dfa73aa0722cd59887a4e83
2018-04-23 13:07:14 +01:00
Paul Belanger
df364a46e0
Switch to http://security.debian.org/ for debian
Today the mirror system in openstack-infra isn't properly setup to
mirror debian-security. Until we can fix this, switch to the upstream
URL.

Change-Id: Icfa7dc874d14de245927d461595f90b9dacc7825
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-18 13:38:23 -04:00
Clark Boylan
139f12a371 Don't use pip internals
As of pip10 pip is no longer promising external stable apis (they never
really did anyways just failed to annotate the source as such). As a
result our use of direct pip internals breaks under pip10.

We replace this with a fork and exec of pip instead as the command line
is a stable api. We were already doing this anyways so shouldn't cause
anything to run slower and should be more reliable as an api.

Note that we also remove the import of pip as this does an unexpected
thing and uses pip outside of the virtualenv rather than pip inside the
virtualenv. Since we are only forking pip inside the virtualenv now we
don't need to check for external pip.

Change-Id: Ib2628003995530881d297782f044dfc8a1c72d08
2018-04-16 10:33:46 -07:00
Zuul
39c90078d3 Merge "Fix typo in build-sphinx-docs docstring" 2018-04-13 00:39:24 +00:00
Doug Hellmann
6cb1982b0f document that the build-reno-releasenotes job accepts sphinx_python
The variable is defined by the ensure-sphinx role so it can be used with
the job.

Change-Id: Ieb6a96f84e64f8a377483437f754e809012762f5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-12 16:49:41 -04:00
James E. Blair
bb86be2026 Fix typo in build-sphinx-docs docstring
This causes erroneous rendering.

Change-Id: Idca63d8983227c419d51e2bb39a0866b5fcdb0bf
2018-04-12 13:41:08 -07:00
Zuul
15038126d3 Merge "role: Inject public keys in case of failure" 2018-04-12 19:57:24 +00:00
James E. Blair
af0d8eb25b Add installation/deprecation documentation
Change-Id: I4db13e723c90628ef2e3a48ba5758a04d75b8d5c
2018-04-11 08:03:57 -07:00
Zuul
c5fc057417 Merge "Add README to ensure-tox role" 2018-04-05 18:36:29 +00:00
James E. Blair
69b7492af9 Add README to ensure-tox role
Change-Id: I1efdcb8eff522cd58e94d9465d093bbc851aa496
2018-04-05 11:07:42 -07:00
Andrea Frittoli
b3615c0d97 Remove support for extensions as lists
With tempest devstack and networking-odl switched to using dict,
we can now remove support for using lists for the list of extensions.

Depends-on: https://review.openstack.org/539686/
Depends-on: https://review.openstack.org/539708/
Depends-on: https://review.openstack.org/539854/
Change-Id: I62aaa737300c3b24e416f18e4bc469e7bd46ea29
2018-04-03 16:13:52 +01:00
David Moreau Simard
40ef3c084e
Deprecate the emit-ara-html role
This adds a deprecation notice to the README and a debug task that
prints a deprecation notice.
The role is still expected to work but will eventually be removed in
favor of the ara-report role.

This deprecation will be announced on openstack-dev and zuul-announce.

Depends-On: https://review.openstack.org/#/c/557818/
Change-Id: If25e7c7b93cfd1588233fec299a31ad3ce3a873f
2018-03-29 16:29:20 -04:00
Zuul
819cc19d3f Merge "Fix ansible-lint job" 2018-03-29 13:52:58 +00:00
Colleen Murphy
d1956bd9f7 Fix ansible-lint job
The 'linters' tox environment was not running on roles, it was only
running on playbooks. This change adds a command to the linters
environment to ensure all roles are linted.

Since these weren't being linted, there were some problems with them.
The first was a warning about usage of the shell module. Both of these
usages seemed appropriate, so this patch adds a skip_ansible_lint tag to
each task that was failing. The second is a warning "no action detected
in task" for zuul modules. This is due to the fact that the linter
cannot find the custom module. One option is to set the ANSIBLE_LIBRARY
path to point to the zuul ansible library directory[1], but the linter
virtualenv does not actually have zuul installed. Instead, we just
disable the linter for the failing tasks.

This also cleans up a comment in the tox file that was referring to a
nonexistent zuul job.

[1] https://github.com/willthames/ansible-review/issues/16

Change-Id: Ie49da9a09733b623bb25c5a4c8aa07eacacf4b33
2018-03-28 23:10:22 +02:00
Zuul
3f533918da Merge "Handle blank public_ipv4" 2018-03-27 19:46:05 +00:00
James E. Blair
b1a039970a Add a flag to disable no_log on upload-logs
So that it is possible to debug this role, add a flag which disables
setting no_log on the synchronize task.

Change-Id: Ie433ada5ff6cb15b68f19e8678244af9ce9faa13
Depends-On: https://review.openstack.org/556881
2018-03-27 09:17:18 -07:00
Ian Wienand
3230139d65 Handle blank public_ipv4
Some clouds such as limestone have no public_ipv4; handle this in the
firewall setup

Change-Id: Id4a8032a6a14a040d62d1c70bf5e6e789fd8ff55
2018-03-27 12:27:21 +00:00
Zuul
ad683253ed Merge "Uninstall and reinstall siblings one at a time" 2018-03-21 15:02:59 +00:00
Monty Taylor
a99a73dca6 Uninstall and reinstall siblings one at a time
The current logic uninstalls all detected siblings first, then it
executes a single install with all of the detected sibling git repos.

If one sibling (A) depends on another sibling (B), then the commands:

  pip uninstall A
  pip uninstall B
  pip install ../A ../B

Will result in pip finding B in the requirements list for ../A and
re-installing the released version, then considering the requirement
satisfied when it gets to ../B and not installing it.

To solve that, do the uninstall and reinstall in a single-project loop
for each sibling. This results in:

  pip uninstall A
  pip install ../A

pip will find B in ../A's requirements, but B will already be installed
because it hasn't been uninstalled yet, so nothing will happen. Then:

  pip uninstall B
  pip install ../B

Which will result in both ../A and ../B being installed.

As if that wasn't enough, if A and B happen to appear in the opposite
order, doing:

  pip uninstall B
  pip install ../B
  pip uninstall A
  pip install ../A

Will wind up with pip uninstalling ../B and installing B if the version
requested for B is greater than the version reported by ../B (which is
the case for openstack projects operating from master after a release
but before the first release of the next cycle)

In order to combat that, do a second installation pass with --no-deps.
This way the first pass will be sure to get any transitive dependency
changes, but the second pass will ensure all the siblings are installed
instead of their non-git versions.

  pip uninstall B
  pip install ../B
  pip uninstall A
  pip install ../A
  pip install --no-deps ../B
  pip install --no-deps ../A

Change-Id: I060e188313391de7847adf851566468c4b032342
2018-03-20 16:01:09 +00:00
David Moreau-Simard
d75f5d2bf2 Refactor "emit-ara-html" into a new role: "ara-report"
We are going to provide support the ARA sqlite middleware which
provides the ability for an ARA web application to dynamically load
databases, eliminating the need for HTML generation.

HTML generation does not scale very well: it's orders of magnitude
larger than the database file containing the data and it also takes
a significant amount of time to generate the report.

It would be awkward to add dynamic database things into a role called
"emit-ara-html" and so I took the opportunity to refactor things a
little bit and make the role less prone to failures.

Note that this role was developed with the nested Ansible use case in
mind -- a job running it's own copy of Ansible with ARA should be able
to use this role to generate the report or save the database.

This role will be tested with 'base-test' first and it is expected to
make the 'emit-ara-html' role obsolete if everything works well.

Change-Id: Idedc0bfa1f0f89356b795fb9e2a16f9421a2dc18
Depends-On: I3b10c93b4902a9b45e23c227863e472697f662ef
2018-03-19 15:45:34 +00:00
Zuul
d28c326b36 Merge "Parameterize the test-setup role" 2018-03-08 19:08:24 +00:00
Zuul
eeae72ef66 Merge "Add known hosts for all users" 2018-03-08 10:05:17 +00:00
Paul Belanger
7e69f2f8ea
Fix lint issue with emit-job-header role
This is breaking project-config, and some reason we didn't catch it in
testing.  We should look into why that is.

Change-Id: I994484cdb28297fdff8c52ccf7455733584cd8ae
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-03-07 10:20:00 -05:00
Andrea Frittoli
870298bf54 Add known hosts for all users
The role today only adds known hosts for the zuul user.
This replicates what d-g does today by adding a default known_hosts
file which applies to all users.

We csnnot remove the original task that adds for the zuul user since
there's a unit test in openstack-zuul-jons that expects that.

Depends-on: https://review.openstack.org/550425/

Change-Id: I54d4d975fa54cbb6df7dbed525211ab5c2cd6754
2018-03-07 11:03:24 +00:00
Andreas Jaeger
71bc02db76 Fix emit-job-header
This currently fails with "Error 'nodepool' is undefined".

REmove nodepool line completely for now.

Change-Id: I134079a6118c8825fa91920c0f12c2d2789361a5
2018-03-07 11:53:31 +01:00
Zuul
f8fd1b0a92 Merge "Add Ansible version to job header" 2018-03-07 09:19:15 +00:00
Zuul
8ce392b66e Merge "Revert "Revert "Add zuul.{pipeline,nodepool.provider,executor.hostname} to job header""" 2018-03-07 09:19:14 +00:00
Andreas Jaeger
54077ba1e1 Fix condition in version-from-git
This should be the negation of the condition above, not exactly the same
but double negated.

Change-Id: I24e5f73480c83777f8dcb5ca71283afe5565212f
2018-03-07 08:25:18 +00:00
Andreas Jaeger
9ff13740f8 Fix version-from-git syntax
Fix "Syntax Error while loading YAML" with proper ordering of block.

Change-Id: I8a59856dbc91bec03adf193128ca6cc0ff7a7b54
2018-03-07 07:51:45 +01:00
Zuul
08724c3134 Merge "Add arm64 support to mirror setup" 2018-03-07 05:28:26 +00:00
Zuul
6188f949a9 Merge "Handle repos with no tags in version-from-git" 2018-03-07 04:06:23 +00:00
Ian Wienand
44bc52a539 Add arm64 support to mirror setup
Load the variables from an architecture specific file first --
ansible's ansible_architecture fact for arm64 is aarch64 (it's all
confusing, Ubuntu calls it arm64).  Add this file that sets up the
repo as "ubuntu-ports", which is our mirror of ports.ubuntu.com

Change-Id: Ieb50ae29c7f822e831ef1e32fdd03f74a93e298a
2018-03-07 13:49:26 +11:00
Zuul
c8b2ecf59a Merge "Add role for fetching javascript built content" 2018-03-06 21:58:17 +00:00
Monty Taylor
35da394f53
Add role for fetching javascript built content
Built content and source tarballs are different. Have a role that
handles uploading built content.

Append -content to the tarball so that a project can publish both a
source tarball and a built content tarball without stepping on each
other.

Change-Id: I33dff8080018bda281a00e648468de80d3ecd679
2018-03-06 13:33:10 -06:00
Zuul
f57fe26cdd Merge "Revert "Revert "Deploy the build ssh key to auth_keys""" 2018-03-06 19:18:45 +00:00
Zuul
90b3f4e6be Merge "Fix the copy-build-sshkey role" 2018-03-06 19:18:44 +00:00
Monty Taylor
a966445c16 Handle repos with no tags in version-from-git
The version-from-git role doesn't properly handle tag-less repos. Update
it to handle that case too.

Change-Id: I358037fd34f5dc202a6761b9e6f81bbe7870f3f2
2018-03-06 19:14:06 +00:00
Andrea Frittoli
d4ee2b5dc6 Revert "Revert "Deploy the build ssh key to auth_keys""
After fixing the copy-build-sshkey role, using it again in
multinode job pre.

This reverts commit ace4db4b04fd1eb71411d079524fded8189a72aa.

Change-Id: Id59216ce7dd62ff604ddf2c2c1cf27c4dca0deb0
2018-03-06 18:51:30 +00:00
David Moreau Simard
85c7ff6989 Fix the copy-build-sshkey role
Run the first task in the block, with become_user since the zuul
user may not access a generic use .ssh folder.

Depends-on: https://review.openstack.org/550091

Change-Id: I4ce120412079fe92502eee5310a03664aa55d5ce
2018-03-06 18:26:26 +00:00
Zuul
fd35b1b9aa Merge "ara: check for return code instead of succeed" 2018-03-05 16:02:09 +00:00
Zuul
0bbe3d31cb Merge "bindep: use shell instead of command with executable" 2018-03-05 16:02:07 +00:00