Rename API and common Debian packages

Closes #79
This commit is contained in:
Joshua Boniface 2020-02-08 18:48:59 -05:00
parent 74228eb063
commit 4505b239eb
35 changed files with 60 additions and 60 deletions

View File

@ -26,12 +26,12 @@ import lxml.etree as etree
from distutils.util import strtobool from distutils.util import strtobool
import client_lib.common as pvc_common import daemon_lib.common as pvc_common
import client_lib.cluster as pvc_cluster import daemon_lib.cluster as pvc_cluster
import client_lib.node as pvc_node import daemon_lib.node as pvc_node
import client_lib.vm as pvc_vm import daemon_lib.vm as pvc_vm
import client_lib.network as pvc_network import daemon_lib.network as pvc_network
import client_lib.ceph as pvc_ceph import daemon_lib.ceph as pvc_ceph
# #
# Initialization function # Initialization function

View File

@ -30,11 +30,11 @@ import time
import shlex import shlex
import subprocess import subprocess
import client_lib.common as pvc_common import daemon_lib.common as pvc_common
import client_lib.node as pvc_node import daemon_lib.node as pvc_node
import client_lib.vm as pvc_vm import daemon_lib.vm as pvc_vm
import client_lib.network as pvc_network import daemon_lib.network as pvc_network
import client_lib.ceph as pvc_ceph import daemon_lib.ceph as pvc_ceph
import api_lib.libvirt_schema as libvirt_schema import api_lib.libvirt_schema as libvirt_schema

1
api-daemon/daemon_lib Symbolic link
View File

@ -0,0 +1 @@
../daemon-common

View File

@ -16,7 +16,7 @@ HOSTS=( ${@} )
echo "${HOSTS[@]}" echo "${HOSTS[@]}"
# Build the packages # Build the packages
$SUDO ./build-deb.sh ./build-deb.sh
# Install the client(s) locally # Install the client(s) locally
$SUDO dpkg -i ../pvc-client*.deb $SUDO dpkg -i ../pvc-client*.deb

View File

@ -1 +0,0 @@
../client-common

View File

@ -23,7 +23,7 @@
import kazoo.client import kazoo.client
import uuid import uuid
import client_lib.ansiprint as ansiprint import daemon_lib.ansiprint as ansiprint
# Exists function # Exists function
def exists(zk_conn, key): def exists(zk_conn, key):

View File

@ -26,9 +26,9 @@ import json
import time import time
import math import math
import client_lib.ansiprint as ansiprint import daemon_lib.ansiprint as ansiprint
import client_lib.zkhandler as zkhandler import daemon_lib.zkhandler as zkhandler
import client_lib.common as common import daemon_lib.common as common
# #
# Supplemental functions # Supplemental functions

View File

@ -24,13 +24,13 @@ import json
from distutils.util import strtobool from distutils.util import strtobool
import client_lib.ansiprint as ansiprint import daemon_lib.ansiprint as ansiprint
import client_lib.zkhandler as zkhandler import daemon_lib.zkhandler as zkhandler
import client_lib.common as common import daemon_lib.common as common
import client_lib.vm as pvc_vm import daemon_lib.vm as pvc_vm
import client_lib.node as pvc_node import daemon_lib.node as pvc_node
import client_lib.network as pvc_network import daemon_lib.network as pvc_network
import client_lib.ceph as pvc_ceph import daemon_lib.ceph as pvc_ceph
def set_maintenance(zk_conn, maint_state): def set_maintenance(zk_conn, maint_state):
try: try:

View File

@ -27,7 +27,7 @@ import kazoo.client
from distutils.util import strtobool from distutils.util import strtobool
import client_lib.zkhandler as zkhandler import daemon_lib.zkhandler as zkhandler
############################################################################### ###############################################################################
# Supplemental functions # Supplemental functions

View File

@ -34,9 +34,9 @@ import lxml.objectify
import configparser import configparser
import kazoo.client import kazoo.client
import client_lib.ansiprint as ansiprint import daemon_lib.ansiprint as ansiprint
import client_lib.zkhandler as zkhandler import daemon_lib.zkhandler as zkhandler
import client_lib.common as common import daemon_lib.common as common
# #
# Cluster search functions # Cluster search functions

View File

@ -34,10 +34,10 @@ import lxml.objectify
import configparser import configparser
import kazoo.client import kazoo.client
import client_lib.ansiprint as ansiprint import daemon_lib.ansiprint as ansiprint
import client_lib.zkhandler as zkhandler import daemon_lib.zkhandler as zkhandler
import client_lib.common as common import daemon_lib.common as common
import client_lib.vm as pvc_vm import daemon_lib.vm as pvc_vm
def getNodeInformation(zk_conn, node_name): def getNodeInformation(zk_conn, node_name):
""" """

View File

@ -35,11 +35,11 @@ import kazoo.client
from collections import deque from collections import deque
import client_lib.ansiprint as ansiprint import daemon_lib.ansiprint as ansiprint
import client_lib.zkhandler as zkhandler import daemon_lib.zkhandler as zkhandler
import client_lib.common as common import daemon_lib.common as common
import client_lib.ceph as ceph import daemon_lib.ceph as ceph
# #
# Cluster search functions # Cluster search functions

View File

@ -23,7 +23,7 @@
import kazoo.client import kazoo.client
import uuid import uuid
import client_lib.ansiprint as ansiprint import daemon_lib.ansiprint as ansiprint
# Exists function # Exists function
def exists(zk_conn, key): def exists(zk_conn, key):

24
debian/control vendored
View File

@ -8,28 +8,28 @@ X-Python3-Version: >= 3.2
Package: pvc-daemon Package: pvc-daemon
Architecture: all Architecture: all
Depends: systemd, pvc-client-common, python3-kazoo, python3-psutil, python3-apscheduler, python3-libvirt, python3-psycopg2, python3-dnspython, python3-yaml, python3-distutils, ipmitool, libvirt-daemon-system, arping, vlan, bridge-utils, dnsmasq, nftables, pdns-server, pdns-backend-pgsql Depends: systemd, pvc-daemon-common, python3-kazoo, python3-psutil, python3-apscheduler, python3-libvirt, python3-psycopg2, python3-dnspython, python3-yaml, python3-distutils, ipmitool, libvirt-daemon-system, arping, vlan, bridge-utils, dnsmasq, nftables, pdns-server, pdns-backend-pgsql
Suggests: pvc-client-api, pvc-client-cli Suggests: pvc-client-api, pvc-client-cli
Description: Parallel Virtual Cluster virtualization daemon (Python 3) Description: Parallel Virtual Cluster virtualization daemon (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 node daemon This package installs the PVC node daemon
Package: pvc-client-common Package: pvc-api
Architecture: all
Depends: systemd, pvc-daemon-common, python3-yaml, python3-flask, python3-flask-restful, python3-gevent, python3-celery, python-celery-common, python3-distutils, redis, python3-redis
Description: Parallel Virtual Cluster API (Python 3)
A KVM/Zookeeper/Ceph-based VM and private cloud manager
.
This package installs the PVC API daemon
Package: pvc-daemon-common
Architecture: all Architecture: all
Depends: python3-kazoo, python3-psutil, python3-click, python3-lxml Depends: python3-kazoo, python3-psutil, python3-click, python3-lxml
Description: Parallel Virtual Cluster common client libraries (Python 3) Description: Parallel Virtual Cluster common libraries (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 common client libraries This package installs the common libraries for the daemon and API
Package: pvc-client-api
Architecture: all
Depends: systemd, pvc-client-common, python3-yaml, python3-flask, python3-flask-restful, python3-gevent, python3-celery, python-celery-common, python3-distutils, redis, python3-redis
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-cli Package: pvc-client-cli
Architecture: all Architecture: all

6
debian/pvc-api.install vendored Normal file
View File

@ -0,0 +1,6 @@
api-daemon/pvc-api.py usr/share/pvc
api-daemon/pvc-api.sample.yaml etc/pvc
api-daemon/api_lib usr/share/pvc
api-daemon/pvc-api.service lib/systemd/system
api-daemon/pvc-provisioner-worker.service lib/systemd/system
api-daemon/provisioner usr/share/pvc

View File

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

View File

@ -1 +0,0 @@
client-common/* usr/share/pvc/client_lib

1
debian/pvc-daemon-common.install vendored Normal file
View File

@ -0,0 +1 @@
daemon-common/* usr/share/pvc/daemon_lib

View File

@ -8,9 +8,9 @@ import os
import sys import sys
import json import json
os.environ['PVC_CONFIG_FILE'] = "./client-api/pvc-api.sample.yaml" os.environ['PVC_CONFIG_FILE'] = "./api-daemon/pvc-api.sample.yaml"
sys.path.append('client-api') sys.path.append('api-daemon')
pvc_api = __import__('pvc-api') pvc_api = __import__('pvc-api')

View File

@ -29,8 +29,8 @@ import psycopg2
from psycopg2.extras import RealDictCursor from psycopg2.extras import RealDictCursor
# The metadata server requires client libraries # The metadata server requires client libraries
import client_lib.vm as pvc_vm import daemon_lib.vm as pvc_vm
import client_lib.network as pvc_network import daemon_lib.network as pvc_network
class MetadataAPIInstance(object): class MetadataAPIInstance(object):
mdapi = flask.Flask(__name__) mdapi = flask.Flask(__name__)