Add swift-ring element

A swift-ring element consists of the basic swift package and the
swift-ring-builder tool. The purpose of this element is exclusively to create
and update swift ring files. The benefit here is that it may be used on an
undercloud or overcloud controller node without having to install the entire
swift service. Also, updates to a ring/creation of a new ring may be
performed on a single, centralised node in the under/overcloud and distributed
to all the swift nodes in a system.

This is not intended to replace anything in the existing swift element. Unlike
the swift element, it does not require any heat-teamplate which is used to
generate swift rings on the node in question (as well as other things) so right
now any node with the swift element must be a part of the swift rings.
Therefore, the swift-ring element could be added to any node in a system
without any other swift services or presence in the rings required.

Change-Id: I018bdb7a8c6f2f7f83a0a7fb6d27332b6ca266a8
This commit is contained in:
Lorcan 2014-07-03 10:43:13 +01:00
parent 396bdbd9c5
commit 1c394cc11e
7 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1 @@
Element that provides a node with the tools to build a swift ring

View File

@ -0,0 +1,2 @@
os-svc-install
source-repositories

View File

@ -0,0 +1,6 @@
if [ -z "${SWIFT_VENV_DIR:-}" ]; then
export SWIFT_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/swift"}
fi
if [ -z "${SWIFT_EXTRA_INSTALL_OPTS:-}" ]; then
export SWIFT_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
fi

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -eux
set -o pipefail
install-packages -m swift-ring swift_package

View File

@ -0,0 +1,10 @@
#!/bin/bash
set -eux
set -o pipefail
install-packages -m swift-ring libffi_dev_package
os-svc-install $SWIFT_EXTRA_INSTALL_OPTS -i "$SWIFT_VENV_DIR" -u swift -r /opt/stack/swift
ln -s "$SWIFT_VENV_DIR/bin/swift-ring-builder" /usr/local/bin/swift-ring-builder

View File

@ -0,0 +1,12 @@
{
"family": {
"redhat": {
"libffi_dev_package": "libffi-devel",
"swift_package": "openstack-swift"
}
},
"default": {
"libffi_dev_package": "libffi-dev",
"swift_package": "openstack-swift"
}
}

View File

@ -0,0 +1 @@
swift git /opt/stack/swift https://git.openstack.org/openstack/swift