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:
parent
396bdbd9c5
commit
1c394cc11e
1
elements/swift-ring/README.md
Normal file
1
elements/swift-ring/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
Element that provides a node with the tools to build a swift ring
|
2
elements/swift-ring/element-deps
Normal file
2
elements/swift-ring/element-deps
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
os-svc-install
|
||||||
|
source-repositories
|
@ -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
|
6
elements/swift-ring/install.d/swift-package-install/75-swift-ring
Executable file
6
elements/swift-ring/install.d/swift-package-install/75-swift-ring
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eux
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
install-packages -m swift-ring swift_package
|
10
elements/swift-ring/install.d/swift-source-install/75-swift-ring
Executable file
10
elements/swift-ring/install.d/swift-source-install/75-swift-ring
Executable 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
|
12
elements/swift-ring/pkg-map
Normal file
12
elements/swift-ring/pkg-map
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
1
elements/swift-ring/source-repository-swift
Normal file
1
elements/swift-ring/source-repository-swift
Normal file
@ -0,0 +1 @@
|
|||||||
|
swift git /opt/stack/swift https://git.openstack.org/openstack/swift
|
Loading…
Reference in New Issue
Block a user