Juju Charm - Swift storage
Go to file
Corey Bryant ca420eccbb Enable swift payload upgrades for wallaby+
Sync charm-helpers to pick up fix for openstack_upgrade_available
that enables successful payload upgrades. This will need backporting
to stable/wallaby.

https://github.com/openstack-charmers/zaza/pull/619
Closes-Bug: #2040606
Change-Id: Ib1586a486a7a01023bd59bfa70016481ad5f89dc
2023-10-26 08:12:31 -04:00
actions Add package-upgrade action 2023-05-26 15:07:07 +01:00
charmhelpers Enable swift payload upgrades for wallaby+ 2023-10-26 08:12:31 -04:00
files Add monitoring for object-replicator logs disappearing 2020-07-21 15:31:06 -05:00
hooks Add vm.watermark_scale_factor tuning 2022-09-02 08:53:06 +10:00
lib Fix swift replication errors 2021-01-05 11:19:13 -03:00
templates Fix swift replication errors 2021-01-05 11:19:13 -03:00
tests Add 2023.2 Bobcat support 2023-08-02 14:19:09 -04:00
unit_tests Improve platform mocking 2023-10-23 18:12:50 +01:00
.gitignore Update to classic charms to build using charmcraft in CI 2022-02-17 12:11:47 -05:00
.gitreview OpenDev Migration Patch 2019-04-19 19:29:40 +00:00
.project Resynced helpers 2014-03-20 13:47:54 +00:00
.pydevproject Enable xenial/queens amulet testing 2018-03-12 09:34:00 +00:00
.stestr.conf Replace ostestr with stestr in testing framework. 2019-03-07 17:13:16 -05:00
.zuul.yaml Add Antelope support 2023-03-07 21:49:27 +00:00
actions.yaml Add package-upgrade action 2023-05-26 15:07:07 +01:00
bindep.txt Add Kinetic and Zed support 2022-09-26 21:08:53 +00:00
build-requirements.txt Update to classic charms to build using charmcraft in CI 2022-02-17 12:11:47 -05:00
charm-helpers-hooks.yaml Add Antelope support 2023-03-07 21:49:27 +00:00
charmcraft.yaml Add 2023.2 Bobcat support 2023-08-02 14:19:09 -04:00
config.yaml Add 2023.2 Bobcat support 2023-08-02 14:19:09 -04:00
copyright Re-license charm as Apache-2.0 2016-07-01 18:15:00 +01:00
hardening.yaml Add hardening support 2016-03-24 11:11:58 +00:00
icon.svg Update charm icon 2017-08-02 17:25:40 +01:00
LICENSE Re-license charm as Apache-2.0 2016-07-01 18:15:00 +01:00
Makefile Update Makefile to reference Zaza and Python3 2020-08-27 09:40:37 +10:00
metadata.yaml Add 2023.2 Bobcat support 2023-08-02 14:19:09 -04:00
osci.yaml Add 2023.2 Bobcat support 2023-08-02 14:19:09 -04:00
README.md Review and improve README 2020-02-24 22:08:42 -05:00
rename.sh Update to classic charms to build using charmcraft in CI 2022-02-17 12:11:47 -05:00
requirements.txt Add Kinetic and Zed support 2022-09-26 21:08:53 +00:00
revision Remove debug. 2013-07-19 14:13:59 -07:00
setup.cfg Add Python 3 Train unit tests 2019-07-30 10:18:23 -04:00
test-requirements.txt Fix charm for tox4 compatibility 2023-01-18 12:57:20 +00:00
tox.ini Add Antelope support 2023-03-07 21:49:27 +00:00

Overview

OpenStack Swift is a highly available, distributed, eventually consistent object/blob store.

The swift-storage charm deploys Swift's storage component. The charm's basic function is to initialise storage devices and manage the container, object, and account services. It works in tandem with the swift-proxy charm, which is used to add proxy nodes.

Usage

Configuration

This section covers common configuration options. See file config.yaml for the full list of options, along with their descriptions and default values.

zone

The zone option assigns a storage zone (an integer) to a storage node. A zone is associated with data replicas.

block-device

The block-device option specifies the device(s) that will be used on all machines associated with the application. Value types include:

  • an actual block device (e.g. 'sdb' or '/dev/sdb'). A space-separated list is used for multiple devices.
  • a path to a local file with the size appended after a pipe (e.g. '/etc/swift/storagedev1.img|5G'). The file will be created if necessary and be mapped to a loopback device. This is intended for development and testing purposes.

The resulting block device(s) will be XFS-formatted and use /srv/node/<device-name> as a mount point.

storage-region

The storage-region option specifies a storage region (an integer). It is used only for multi-region (global) clusters.

Deployment

Let file swift.yaml contain the deployment configuration:

    swift-proxy:
        zone-assignment: manual
        replicas: 3
    swift-storage-zone1:
        zone: 1
        block-device: /dev/sdb
    swift-storage-zone2:
        zone: 2
        block-device: /dev/sdb
    swift-storage-zone3:
        zone: 3
        block-device: /dev/sdb

Deploy the proxy and storage nodes:

juju deploy --config swift.yaml swift-proxy
juju deploy --config swift.yaml swift-storage swift-storage-zone1
juju deploy --config swift.yaml swift-storage swift-storage-zone2
juju deploy --config swift.yaml swift-storage swift-storage-zone3

Add relations between the proxy node and all storage nodes:

juju add-relation swift-proxy:swift-storage swift-storage-zone1:swift-storage
juju add-relation swift-proxy:swift-storage swift-storage-zone2:swift-storage
juju add-relation swift-proxy:swift-storage swift-storage-zone3:swift-storage

This will result in a three-zone cluster, with each zone consisting of a single storage node, thereby satisfying the replica requirement of three.

Storage capacity is increased by adding swift-storage units to a zone. For example, to add two storage nodes to zone '3':

juju add-unit -n 2 swift-storage-zone3

Note

: When scaling out ensure the candidate machines are equipped with the block devices currently configured for the associated application.

This charm will not balance the storage ring until there are enough storage zones to meet its minimum replica requirement, in this case three.

Appendix Swift usage in the OpenStack Charms Deployment Guide offers in-depth guidance for deploying Swift with charms. In particular, it shows how to set up a multi-region (global) cluster.

Actions

This section covers Juju actions supported by the charm. Actions allow specific operations to be performed on a per-unit basis.

  • openstack-upgrade
  • pause
  • resume

To display action descriptions run juju actions swift-storage.

Bugs

Please report bugs on Launchpad.

For general charm questions refer to the OpenStack Charm Guide.