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
parent
2265dd235b
commit
c8d6bae093
3
hosts
3
hosts
|
@ -117,3 +117,6 @@ zbx0.pyrocufflink.blue
|
||||||
pyrocufflink
|
pyrocufflink
|
||||||
|
|
||||||
[vm-hosts]
|
[vm-hosts]
|
||||||
|
|
||||||
|
[wheelhost]
|
||||||
|
file0.pyrocufflink.blue
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
Alias /wheels /var/lib/wheels
|
||||||
|
|
||||||
|
<Directory /var/lib/wheels>
|
||||||
|
Require all granted
|
||||||
|
Options +Indexes
|
||||||
|
IndexOptions -FancyIndexing -HTMLTable
|
||||||
|
</Directory>
|
|
@ -0,0 +1,4 @@
|
||||||
|
- name: reload httpd
|
||||||
|
service:
|
||||||
|
name=httpd
|
||||||
|
state=reloaded
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
||||||
|
- hosts: wheelhost
|
||||||
|
roles:
|
||||||
|
- web
|
||||||
|
- wheelhost
|
Loading…
Reference in New Issue