wheelhost: Publish wheels built by Jenkins

The point of the "wheel host" is to serve as a repository of Python
packages (wheels) built by Jenkins for consumption by `pip` et al. For
applications and libraries that do not provide all of their dependencies
as binary packages, this makes a convenient way to install them without
requiring all of the build tools and dependencies on the destination
machine.

The idea here is that a Jenkins job runs `pip wheel` for a distribution
package name or `requirements.txt` file and then uploads the resulting
wheel files using `rsync`. Apache is configured to serve the upload
directory with an index compatible with `pip`'s `--find-links`.
jenkins-master
Dustin 2019-03-22 09:50:57 -05:00
parent 2265dd235b
commit c8d6bae093
5 changed files with 52 additions and 0 deletions

3
hosts
View File

@ -117,3 +117,6 @@ zbx0.pyrocufflink.blue
pyrocufflink pyrocufflink
[vm-hosts] [vm-hosts]
[wheelhost]
file0.pyrocufflink.blue

View File

@ -0,0 +1,7 @@
Alias /wheels /var/lib/wheels
<Directory /var/lib/wheels>
Require all granted
Options +Indexes
IndexOptions -FancyIndexing -HTMLTable
</Directory>

View File

@ -0,0 +1,4 @@
- name: reload httpd
service:
name=httpd
state=reloaded

View File

@ -0,0 +1,34 @@
- name: ensure rsync is installed
package:
name=rsync
state=present
tags:
- install
- name: ensure wheel storage directory exists
file:
path=/var/lib/wheels
owner=root
group=root
mode=0775
state=directory
- name: ensure jenkins can write to the wheel storage directory
acl:
path: /var/lib/wheels
etype: user
entity: jenkins
permissions: rwx
default: '{{ item == "default" }}'
state: present
with_items:
- default
- current
- name: ensure apache is configured to serve wheel directory
copy:
src=wheels.httpd.conf
dest=/etc/httpd/conf.d/wheels.conf
mode=0644
notify:
- reload httpd

4
wheelhost.yml Normal file
View File

@ -0,0 +1,4 @@
- hosts: wheelhost
roles:
- web
- wheelhost