diff --git a/sys-cluster/swift/files/openstack-swift-account-auditor.AT.service b/sys-cluster/swift/files/openstack-swift-account-auditor.AT.service new file mode 100644 index 0000000000..8b44df92d1 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account-auditor.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Auditor instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-auditor /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-account-auditor.service b/sys-cluster/swift/files/openstack-swift-account-auditor.service new file mode 100644 index 0000000000..35413ceb7e --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account-auditor.service @@ -0,0 +1,12 @@ +# After network.target just because. +[Unit] +Description=OpenStack Object Storage (swift) - Account Auditor +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-auditor /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-account-reaper.AT.service b/sys-cluster/swift/files/openstack-swift-account-reaper.AT.service new file mode 100644 index 0000000000..dbd5aa4bb6 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account-reaper.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Reaper instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-reaper /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-account-reaper.service b/sys-cluster/swift/files/openstack-swift-account-reaper.service new file mode 100644 index 0000000000..dd6fb004d5 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account-reaper.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Reaper +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-reaper /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-account-replicator.AT.service b/sys-cluster/swift/files/openstack-swift-account-replicator.AT.service new file mode 100644 index 0000000000..65fbaa359b --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account-replicator.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Replicator instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-replicator /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-account-replicator.service b/sys-cluster/swift/files/openstack-swift-account-replicator.service new file mode 100644 index 0000000000..0cad889caf --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account-replicator.service @@ -0,0 +1,12 @@ +# After network.target just so replicator can talk to other nodes. +[Unit] +Description=OpenStack Object Storage (swift) - Account Replicator +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-replicator /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-account.AT.service b/sys-cluster/swift/files/openstack-swift-account.AT.service new file mode 100644 index 0000000000..518c72d5b3 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account.AT.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Server instance %I +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-server /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-account.service b/sys-cluster/swift/files/openstack-swift-account.service new file mode 100644 index 0000000000..190c4e7163 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-account.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-server /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container-auditor.AT.service b/sys-cluster/swift/files/openstack-swift-container-auditor.AT.service new file mode 100644 index 0000000000..7c046da956 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container-auditor.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Auditor instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-auditor /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container-auditor.service b/sys-cluster/swift/files/openstack-swift-container-auditor.service new file mode 100644 index 0000000000..6359b9198e --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container-auditor.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Auditor +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-auditor /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container-reconciler.service b/sys-cluster/swift/files/openstack-swift-container-reconciler.service new file mode 100644 index 0000000000..f23345127b --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container-reconciler.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Reconciler +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-reconciler /etc/swift/container-reconciler.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container-replicator.AT.service b/sys-cluster/swift/files/openstack-swift-container-replicator.AT.service new file mode 100644 index 0000000000..4803503522 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container-replicator.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Replicator instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-replicator /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container-replicator.service b/sys-cluster/swift/files/openstack-swift-container-replicator.service new file mode 100644 index 0000000000..399f7b41e9 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container-replicator.service @@ -0,0 +1,12 @@ +# After network.target just so replicator can talk to other nodes. +[Unit] +Description=OpenStack Object Storage (swift) - Container Replicator +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-replicator /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container-updater.AT.service b/sys-cluster/swift/files/openstack-swift-container-updater.AT.service new file mode 100644 index 0000000000..19f99ff7f8 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container-updater.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Updater instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-updater /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container-updater.service b/sys-cluster/swift/files/openstack-swift-container-updater.service new file mode 100644 index 0000000000..6efc57e5c4 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container-updater.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Updater +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-updater /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container.AT.service b/sys-cluster/swift/files/openstack-swift-container.AT.service new file mode 100644 index 0000000000..ff65089051 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container.AT.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Server instance %I +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-server /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-container.service b/sys-cluster/swift/files/openstack-swift-container.service new file mode 100644 index 0000000000..46752a4abe --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-container.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-server /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object-auditor.AT.service b/sys-cluster/swift/files/openstack-swift-object-auditor.AT.service new file mode 100644 index 0000000000..f5c253703a --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object-auditor.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Auditor instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-auditor /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object-auditor.service b/sys-cluster/swift/files/openstack-swift-object-auditor.service new file mode 100644 index 0000000000..498d53e266 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object-auditor.service @@ -0,0 +1,12 @@ +# After network.target just because. +[Unit] +Description=OpenStack Object Storage (swift) - Object Auditor +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-auditor /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object-expirer.service b/sys-cluster/swift/files/openstack-swift-object-expirer.service new file mode 100644 index 0000000000..0fbe2e507d --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object-expirer.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Expirer +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-expirer /etc/swift/object-expirer.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object-replicator.AT.service b/sys-cluster/swift/files/openstack-swift-object-replicator.AT.service new file mode 100644 index 0000000000..7493398751 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object-replicator.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Replicator instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-replicator /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object-replicator.service b/sys-cluster/swift/files/openstack-swift-object-replicator.service new file mode 100644 index 0000000000..be1d3fa1a7 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object-replicator.service @@ -0,0 +1,12 @@ +# After network.target just so replicator can talk to other nodes. +[Unit] +Description=OpenStack Object Storage (swift) - Object Replicator +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-replicator /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object-updater.AT.service b/sys-cluster/swift/files/openstack-swift-object-updater.AT.service new file mode 100644 index 0000000000..9f223c756c --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object-updater.AT.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Updater instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-updater /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object-updater.service b/sys-cluster/swift/files/openstack-swift-object-updater.service new file mode 100644 index 0000000000..d9697a5290 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object-updater.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Updater +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-updater /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object.AT.service b/sys-cluster/swift/files/openstack-swift-object.AT.service new file mode 100644 index 0000000000..4199e6844d --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object.AT.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Server instance %I +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-server /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-object.service b/sys-cluster/swift/files/openstack-swift-object.service new file mode 100644 index 0000000000..3e57503c89 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-object.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-server /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift-proxy.service b/sys-cluster/swift/files/openstack-swift-proxy.service new file mode 100644 index 0000000000..d22e8826b7 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift-proxy.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Proxy Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/sys-cluster/swift/files/openstack-swift.logrotate b/sys-cluster/swift/files/openstack-swift.logrotate new file mode 100644 index 0000000000..f38e268c98 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift.logrotate @@ -0,0 +1,6 @@ +/var/log/swift/swift.log +{ + postrotate + /bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/sys-cluster/swift/files/openstack-swift.rsyslog b/sys-cluster/swift/files/openstack-swift.rsyslog new file mode 100644 index 0000000000..3473748714 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift.rsyslog @@ -0,0 +1,5 @@ +# LOCAL0 is the upstream default. LOCAL1, LOCAL2 are configured in +# RHOS and RDO if installed with Packstack (also, mentioned in docs). +# The breakout action prevents logging into /var/log/messages, bz#997983. +local0.*;local1.*;local2.* /var/log/swift/swift.log +& ~ diff --git a/sys-cluster/swift/files/openstack-swift.tmpfs b/sys-cluster/swift/files/openstack-swift.tmpfs new file mode 100644 index 0000000000..8f4f5a5466 --- /dev/null +++ b/sys-cluster/swift/files/openstack-swift.tmpfs @@ -0,0 +1,6 @@ +# swift needs a couple of directories in /var/run +d /var/run/swift 0755 swift root +d /var/run/swift/account-server 0755 swift root +d /var/run/swift/container-server 0755 swift root +d /var/run/swift/object-server 0755 swift root +d /var/run/swift/proxy-server 0755 swift root diff --git a/sys-cluster/swift/metadata.xml b/sys-cluster/swift/metadata.xml index 73eabd2b63..7ec5fbabcd 100644 --- a/sys-cluster/swift/metadata.xml +++ b/sys-cluster/swift/metadata.xml @@ -7,11 +7,7 @@ Alessandro Barbieri - adds swift account support - adds swift container support adds memcached support - adds swift object support - adds swift proxy support swift diff --git a/sys-cluster/swift/swift-2.29.1.ebuild b/sys-cluster/swift/swift-2.29.1-r1.ebuild similarity index 69% rename from sys-cluster/swift/swift-2.29.1.ebuild rename to sys-cluster/swift/swift-2.29.1-r1.ebuild index 33f9039b94..6b5d4f14cc 100644 --- a/sys-cluster/swift/swift-2.29.1.ebuild +++ b/sys-cluster/swift/swift-2.29.1-r1.ebuild @@ -5,19 +5,20 @@ EAPI=8 PYTHON_COMPAT=( python3_{8..9} ) -inherit distutils-r1 linux-info +inherit distutils-r1 linux-info optfeature systemd tmpfiles DESCRIPTION="A highly available, distributed, and eventually consistent object/blob store" HOMEPAGE=" https://github.com/openstack/swift https://launchpad.net/swift + https://opendev.org/openstack/swift " SRC_URI="https://tarballs.openstack.org/${PN}/${P}.tar.gz" KEYWORDS="~amd64" LICENSE="Apache-2.0" SLOT="0" -IUSE="account container doc +memcached +object proxy" +IUSE="doc +memcached" RDEPEND=" >=dev-python/eventlet-0.25.0[${PYTHON_USEDEP}] @@ -55,7 +56,6 @@ BDEPEND=" ) " -REQUIRED_USE="|| ( proxy account container object )" RESTRICT="test" # tests run forever distutils_enable_tests nose @@ -89,26 +89,30 @@ python_install_all() { newins "etc/drive-audit.conf-sample" "drive-audit.conf-sample" newins "etc/dispersion.conf-sample" "dispersion.conf-sample" - if use proxy; then - newinitd "${FILESDIR}/swift-proxy.initd" "swift-proxy" - newins "etc/proxy-server.conf-sample" "proxy-server.conf" - if use memcached; then - sed -i '/depend/a\ need memcached' "${D}/etc/init.d/swift-proxy" - fi - fi - if use account; then - newinitd "${FILESDIR}/swift-account.initd" "swift-account" - newins "etc/account-server.conf-sample" "account-server.conf" - fi - if use container; then - newinitd "${FILESDIR}/swift-container.initd" "swift-container" - newins "etc/container-server.conf-sample" "container-server.conf" - fi - if use object; then - newinitd "${FILESDIR}/swift-object.initd" "swift-object" - newins "etc/object-server.conf-sample" "object-server.conf" - newins "etc/object-expirer.conf-sample" "object-expirer.conf" + newinitd "${FILESDIR}/swift-proxy.initd" "swift-proxy" + newins "etc/proxy-server.conf-sample" "proxy-server.conf" + if use memcached; then + sed -i '/depend/a\ need memcached' "${D}/etc/init.d/swift-proxy" fi + newinitd "${FILESDIR}/swift-account.initd" "swift-account" + newins "etc/account-server.conf-sample" "account-server.conf" + newinitd "${FILESDIR}/swift-container.initd" "swift-container" + newins "etc/container-server.conf-sample" "container-server.conf" + newinitd "${FILESDIR}/swift-object.initd" "swift-object" + newins "etc/object-server.conf-sample" "object-server.conf" + newins "etc/object-expirer.conf-sample" "object-expirer.conf" + + for i in "${FILESDIR}"/openstack-swift*.service ; do + systemd_dounit "${i/.AT/@}" + done + + insinto /etc/logrotate.d + newins "${FILESDIR}/openstack-swift.logrotate" swift + + newtmpfiles "${FILESDIR}/openstack-swift.tmpfs" swift.conf + + insinto /etc/rsyslog.d/ + newins "${FILESDIR}/openstack-swift.rsyslog" openstack-swift.conf if use doc; then doman doc/manpages/* @@ -120,9 +124,15 @@ python_install_all() { } pkg_postinst() { + tmpfiles_process swift.conf + elog "Openstack swift will default to using insecure http unless a" elog "certificate is created in /etc/swift/cert.crt and the associated key" elog "in /etc/swift/cert.key. These can be created with the following:" elog " * cd /etc/swift" elog " * openssl req -new -x509 -nodes -out cert.crt -keyout cert.key" + + optfeature "kms_keymaster" >=dev-python/oslo.config-4.0.0 >=dev-python/castellan-0.13.0 + #optfeature "kmip_keymaster" >=dev-python/pykmip-0.7.0 + optfeature "keystone" >=dev-python/keystonemiddleware-4.17.0 }