Add provisioner to Debian packages

This commit is contained in:
Joshua Boniface 2019-12-09 10:40:27 -05:00
parent 19a75ea92e
commit 57e8fba602
4 changed files with 34 additions and 2 deletions

12
debian/control vendored
View File

@ -26,7 +26,7 @@ Description: Parallel Virtual Cluster common client libraries (Python 3)
Package: pvc-client-cli Package: pvc-client-cli
Architecture: all Architecture: all
Depends: pvc-client-common, python3-yaml, python3-netifaces, python3-dialog Depends: pvc-client-common, python3-yaml, python3-netifaces, python3-dialog
Description: Parallel Virtual Cluster client (Python 3) Description: Parallel Virtual Cluster CLI client (Python 3)
A KVM/Zookeeper/Ceph-based VM and private cloud manager A KVM/Zookeeper/Ceph-based VM and private cloud manager
. .
This package installs the PVC command-line client This package installs the PVC command-line client
@ -34,8 +34,16 @@ Description: Parallel Virtual Cluster client (Python 3)
Package: pvc-client-api Package: pvc-client-api
Architecture: all Architecture: all
Depends: pvc-client-common, python3-yaml, python3-flask, python3-gevent Depends: pvc-client-common, python3-yaml, python3-flask, python3-gevent
Description: Parallel Virtual Cluster client (Python 3) Description: Parallel Virtual Cluster API client (Python 3)
A KVM/Zookeeper/Ceph-based VM and private cloud manager A KVM/Zookeeper/Ceph-based VM and private cloud manager
. .
This package installs the PVC API client daemon This package installs the PVC API client daemon
Package: pvc-client-provisioner
Architecture: all
Depends: pvc-client-common, python3-yaml, python3-flask, python3-celery, python-celery-common
Description: Parallel Virtual Cluster Provisioner client (Python 3)
A KVM/Zookeeper/Ceph-based VM and private cloud manager
.
This package installs the PVC provisioner daemon

5
debian/pvc-client-provisioner.install vendored Normal file
View File

@ -0,0 +1,5 @@
client-provisioner/pvc-provisioner.py usr/share/pvc
client-provisioner/pvc-provisioner.sample.yaml etc/pvc
client-provisioner/provisioner_lib usr/share/pvc
client-provisioner/pvc-provisioner.service lib/systemd/system
client-provisioner/pvc-provisioner-worker.service lib/systemd/system

15
debian/pvc-client-provisioner.postinst vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# Install client binary to /usr/bin via symlink
ln -s /usr/share/pvc/provisioner.py /usr/bin/pvc-provisioner
# Reload systemd's view of the units
systemctl daemon-reload
# Restart the daemon (or warn on first install)
if systemctl is-active --quiet pvc-provisioner.service; then
systemctl restart pvc-provisioner.service
systemctl restart pvc-provisioner-worker.service
else
echo "NOTE: The PVC client API daemon (pvc-provisioner.service) has not been started; create a config file at /etc/pvc/pvc-provisioner.yaml then start it."
fi

4
debian/pvc-client-provisioner.prerm vendored Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
# Remove client binary symlink
rm -f /usr/bin/pvc-provisioner