Use consistent naming of components

Rename "pvcd" to "pvcnoded", and "pvc-api" to "pvcapid" so names for the
daemons are fully consistent. Update the names of the configuration
files as well to match this new formatting.

References #79
This commit is contained in:
2020-02-08 19:16:19 -05:00
parent 83704d8677
commit ce985234c3
43 changed files with 158 additions and 159 deletions

View File

@ -1,16 +0,0 @@
# Parallel Virtual Cluster Provisioner client worker unit file
[Unit]
Description = Parallel Virtual Cluster Provisioner worker
After = network-online.target
[Service]
Type = simple
WorkingDirectory = /usr/share/pvc
Environment = PYTHONUNBUFFERED=true
Environment = PVC_CONFIG_FILE=/etc/pvc/pvc-api.yaml
ExecStart = /usr/bin/celery worker -A pvc-api.celery --concurrency 1 --loglevel INFO
Restart = on-failure
[Install]
WantedBy = multi-user.target

View File

@ -0,0 +1,16 @@
# Parallel Virtual Cluster Provisioner API provisioner worker unit file
[Unit]
Description = Parallel Virtual Cluster API provisioner worker
After = network-online.target
[Service]
Type = simple
WorkingDirectory = /usr/share/pvc
Environment = PYTHONUNBUFFERED=true
Environment = PVC_CONFIG_FILE=/etc/pvc/pvcapid.yaml
ExecStart = /usr/bin/celery worker -A pvcapid.celery --concurrency 1 --loglevel INFO
Restart = on-failure
[Install]
WantedBy = multi-user.target

View File

@ -37,8 +37,8 @@ from flask_restful import Resource, Api, reqparse, abort
from celery import Celery
from celery.task.control import inspect
import api_lib.pvcapi_helper as api_helper
import api_lib.pvcapi_provisioner as api_provisioner
import pvcapid.helper as api_helper
import pvcapid.provisioner as api_provisioner
API_VERSION = 1.0
@ -46,7 +46,7 @@ API_VERSION = 1.0
try:
pvc_config_file = os.environ['PVC_CONFIG_FILE']
except:
print('Error: The "PVC_CONFIG_FILE" environment variable must be set before starting pvc-api.')
print('Error: The "PVC_CONFIG_FILE" environment variable must be set before starting pvcapid.')
exit(1)
print('Starting PVC API daemon')

View File

@ -1,11 +1,11 @@
---
# pvc-api client configuration file example
# pvcapid configuration file example
#
# This configuration file specifies details for the PVC API client running on
# This configuration file specifies details for the PVC API daemon running on
# this machine. Default values are not supported; the values in this sample
# configuration are considered defaults and can be used as-is.
#
# Copy this example to /etc/pvc/pvc-api.conf and edit to your needs
# Copy this example to /etc/pvc/pvcapid.conf and edit to your needs
pvc:
# debug: Enable/disable API debug mode

View File

@ -8,8 +8,8 @@ After = network-online.target
Type = simple
WorkingDirectory = /usr/share/pvc
Environment = PYTHONUNBUFFERED=true
Environment = PVC_CONFIG_FILE=/etc/pvc/pvc-api.yaml
ExecStart = /usr/share/pvc/pvc-api.py
Environment = PVC_CONFIG_FILE=/etc/pvc/pvcapid.yaml
ExecStart = /usr/share/pvc/pvcapid.py
Restart = on-failure
[Install]

View File

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
# pvcapi_helper.py - PVC HTTP API functions
# helper.py - PVC HTTP API helper functions
# Part of the Parallel Virtual Cluster (PVC) system
#
# Copyright (C) 2018-2020 Joshua M. Boniface <joshua@boniface.me>

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
# pvcapi_provisioner.py - PVC Provisioner functions
# provisioner.py - PVC API Provisioner functions
# Part of the Parallel Virtual Cluster (PVC) system
#
# Copyright (C) 2018-2020 Joshua M. Boniface <joshua@boniface.me>
@ -36,7 +36,7 @@ import daemon_lib.vm as pvc_vm
import daemon_lib.network as pvc_network
import daemon_lib.ceph as pvc_ceph
import api_lib.libvirt_schema as libvirt_schema
import pvcapid.libvirt_schema as libvirt_schema
#
# Exceptions (used by Celery tasks)