Move all provisioner API functionality into main

This commit is contained in:
2019-12-14 14:12:55 -05:00
parent 45dbc0eef8
commit 0727a7f6ed
17 changed files with 3001 additions and 128 deletions

11
debian/control vendored
View File

@ -33,17 +33,8 @@ Description: Parallel Virtual Cluster CLI client (Python 3)
Package: pvc-client-api
Architecture: all
Depends: pvc-client-common, python3-yaml, python3-flask, python3-gevent
Depends: pvc-client-common, python3-yaml, python3-flask, python3-gevent, python3-celery, python-celery-common
Description: Parallel Virtual Cluster API client (Python 3)
A KVM/Zookeeper/Ceph-based VM and private cloud manager
.
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

View File

@ -2,3 +2,6 @@ client-api/pvc-api.py usr/share/pvc
client-api/pvc-api.sample.yaml etc/pvc
client-api/api_lib usr/share/pvc
client-api/pvc-api.service lib/systemd/system
client-api/pvc-provisioner-worker.service lib/systemd/system
client-api/schema.sql usr/share/pvc
client-api/provisioner/examples usr/share/pvc/provisioner

View File

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

View File

@ -1,6 +0,0 @@
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
client-provisioner/examples usr/share/pvc/provisioner

View File

@ -1,15 +0,0 @@
#!/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 provisioner API daemon (pvc-provisioner.service) has not been started; create a config file at /etc/pvc/pvc-provisioner.yaml then start it."
fi

View File

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