public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: sys-cluster/nova/files/, sys-cluster/nova/
@ 2022-03-30 10:35 Alessandro Barbieri
  0 siblings, 0 replies; only message in thread
From: Alessandro Barbieri @ 2022-03-30 10:35 UTC (permalink / raw
  To: gentoo-commits

commit:     533097a2ef4a441e445bb2feac0ed8e4d5ba1cac
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Mar 30 10:25:22 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Mar 30 10:26:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=533097a2

sys-cluster/nova: units, tmpfile, logrotate

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sys-cluster/nova/files/nova.logrotate               |  7 +++++++
 sys-cluster/nova/files/nova.tmpfile                 |  1 +
 sys-cluster/nova/files/openstack-nova-api.service   | 15 +++++++++++++++
 .../nova/files/openstack-nova-compute.service       | 16 ++++++++++++++++
 .../nova/files/openstack-nova-conductor.service     | 15 +++++++++++++++
 .../nova/files/openstack-nova-metadata-api.service  | 15 +++++++++++++++
 .../nova/files/openstack-nova-novncproxy.service    | 13 +++++++++++++
 .../files/openstack-nova-os-compute-api.service     | 14 ++++++++++++++
 .../nova/files/openstack-nova-scheduler.service     | 15 +++++++++++++++
 ....0_rc1-r2.ebuild => nova-25.0.0.0_rc1-r3.ebuild} | 21 +++++++++++++--------
 10 files changed, 124 insertions(+), 8 deletions(-)

diff --git a/sys-cluster/nova/files/nova.logrotate b/sys-cluster/nova/files/nova.logrotate
new file mode 100644
index 000000000..51c7caf73
--- /dev/null
+++ b/sys-cluster/nova/files/nova.logrotate
@@ -0,0 +1,7 @@
+/var/log/nova/*.log {
+    daily
+    missingok
+    compress
+    delaycompress
+    copytruncate
+}

diff --git a/sys-cluster/nova/files/nova.tmpfile b/sys-cluster/nova/files/nova.tmpfile
new file mode 100644
index 000000000..126845d14
--- /dev/null
+++ b/sys-cluster/nova/files/nova.tmpfile
@@ -0,0 +1 @@
+d /run/nova 0755 nova nova -

diff --git a/sys-cluster/nova/files/openstack-nova-api.service b/sys-cluster/nova/files/openstack-nova-api.service
new file mode 100644
index 000000000..9c83f6da4
--- /dev/null
+++ b/sys-cluster/nova/files/openstack-nova-api.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenStack Nova API Server
+After=syslog.target network.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+TimeoutStartSec=0
+Restart=always
+User=nova
+ExecStart=/usr/bin/nova-api --log-file /var/log/nova/api.log
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/nova/files/openstack-nova-compute.service b/sys-cluster/nova/files/openstack-nova-compute.service
new file mode 100644
index 000000000..1e1f1b4dd
--- /dev/null
+++ b/sys-cluster/nova/files/openstack-nova-compute.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenStack Nova Compute Server
+After=syslog.target network.target libvirtd.service virtqemud.service
+
+[Service]
+Environment=LIBGUESTFS_ATTACH_METHOD=appliance
+Type=notify
+NotifyAccess=all
+TimeoutStartSec=0
+Restart=always
+User=nova
+ExecStart=/usr/bin/nova-compute --log-file /var/log/nova/compute.log
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/nova/files/openstack-nova-conductor.service b/sys-cluster/nova/files/openstack-nova-conductor.service
new file mode 100644
index 000000000..bca3c738e
--- /dev/null
+++ b/sys-cluster/nova/files/openstack-nova-conductor.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenStack Nova Conductor Server
+After=syslog.target network.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+TimeoutStartSec=0
+Restart=always
+User=nova
+ExecStart=/usr/bin/nova-conductor --log-file /var/log/nova/conductor.log
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/nova/files/openstack-nova-metadata-api.service b/sys-cluster/nova/files/openstack-nova-metadata-api.service
new file mode 100644
index 000000000..6885b682c
--- /dev/null
+++ b/sys-cluster/nova/files/openstack-nova-metadata-api.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenStack Nova Metadata API Server
+After=syslog.target network.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+TimeoutStartSec=0
+Restart=always
+User=nova
+ExecStart=/usr/bin/nova-api-metadata --log-file /var/log/nova/metadata.log
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/nova/files/openstack-nova-novncproxy.service b/sys-cluster/nova/files/openstack-nova-novncproxy.service
new file mode 100644
index 000000000..648aab89f
--- /dev/null
+++ b/sys-cluster/nova/files/openstack-nova-novncproxy.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenStack Nova NoVNC Proxy Server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=nova
+EnvironmentFile=-/etc/conf.d/openstack-nova-novncproxy
+ExecStart=/usr/bin/nova-novncproxy --web /usr/share/webapps/novnc/ --log-file /var/log/nova/novnc.log $OPTIONS
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

diff --git a/sys-cluster/nova/files/openstack-nova-os-compute-api.service b/sys-cluster/nova/files/openstack-nova-os-compute-api.service
new file mode 100644
index 000000000..0720a5221
--- /dev/null
+++ b/sys-cluster/nova/files/openstack-nova-os-compute-api.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=OpenStack Nova Compute API Server
+After=syslog.target network.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+TimeoutStartSec=0
+Restart=always
+User=nova
+ExecStart=/usr/bin/nova-api-os-compute --log-file /var/log/nova/api-os-compute.log
+
+[Install]
+WantedBy=multi-user.target

diff --git a/sys-cluster/nova/files/openstack-nova-scheduler.service b/sys-cluster/nova/files/openstack-nova-scheduler.service
new file mode 100644
index 000000000..14e30fe7c
--- /dev/null
+++ b/sys-cluster/nova/files/openstack-nova-scheduler.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenStack Nova Scheduler Server
+After=syslog.target network.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+TimeoutStartSec=0
+Restart=always
+User=nova
+ExecStart=/usr/bin/nova-scheduler --log-file /var/log/nova/scheduler.log
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/nova/nova-25.0.0.0_rc1-r2.ebuild b/sys-cluster/nova/nova-25.0.0.0_rc1-r3.ebuild
similarity index 93%
rename from sys-cluster/nova/nova-25.0.0.0_rc1-r2.ebuild
rename to sys-cluster/nova/nova-25.0.0.0_rc1-r3.ebuild
index 899369c6f..3ae0f19aa 100644
--- a/sys-cluster/nova/nova-25.0.0.0_rc1-r2.ebuild
+++ b/sys-cluster/nova/nova-25.0.0.0_rc1-r3.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 MYP="${P//_/}"
 PYTHON_COMPAT=( python3_{8..9} )
 
-inherit bash-completion-r1 distutils-r1 linux-info udev
+inherit bash-completion-r1 distutils-r1 linux-info systemd tmpfiles udev
 
 DESCRIPTION="Cloud computing fabric controller"
 HOMEPAGE="
@@ -196,13 +196,13 @@ python_compile_all() {
 python_install_all() {
 	distutils-r1_python_install_all
 
-	if use !compute-only; then
-		for svc in api conductor consoleauth network scheduler spicehtml5proxy xvpvncproxy; do
-			newinitd "${FILESDIR}/nova.initd" "nova-${svc}"
-		done
-	fi
-	use compute && newinitd "${FILESDIR}/nova.initd" "nova-compute"
-	use novncproxy && newinitd "${FILESDIR}/nova.initd" "nova-novncproxy"
+	for svc in api compute conductor consoleauth network novncproxy scheduler spicehtml5proxy xvpvncproxy; do
+		newinitd "${FILESDIR}/nova.initd" "nova-${svc}"
+	done
+
+	for svc in api compute conductor metadata-api novncproxy os-compute-api scheduler; do
+		systemd_dounit "${FILESDIR}/openstack-nova-${svc}.service"
+	done
 
 	diropts -m 0750 -o nova -g qemu
 	dodir /var/log/nova /var/lib/nova/instances
@@ -229,6 +229,11 @@ python_install_all() {
 
 	newbashcomp tools/nova-manage.bash_completion nova-manage
 
+	newtmpfiles "${FILESDIR}/nova.tmpfile" nova.conf
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/nova.logrotate" nova.conf
+
 	if use iscsi ; then
 		# Install udev rules for handle iscsi disk with right links under /dev
 		udev_newrules "${FILESDIR}/openstack-scsi-disk.rules" 60-openstack-scsi-disk.rules


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-30 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 10:35 [gentoo-commits] repo/proj/guru:dev commit in: sys-cluster/nova/files/, sys-cluster/nova/ Alessandro Barbieri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox