Juju Charm - Swift proxy
Go to file
Zuul 4af22b4352 Merge "Review and improve README" 2020-03-06 09:24:25 +00:00
actions When resuming, exclude haproxy 2020-01-27 19:19:07 +00:00
charmhelpers Charmhelper sync for 20.02 2020-02-04 16:40:03 +00:00
files Sync charm/ceph helpers, tox, and requirements 2019-10-01 14:38:02 -05:00
hooks Unmask services during post-series-upgrade 2020-02-03 09:44:20 +00:00
lib Disable Apache port 80 2020-01-29 18:23:08 +00:00
scripts - removed health checks 2013-04-05 17:34:01 -04:00
swift_manager Swift Global Cluster 2019-12-16 14:51:56 +00:00
templates Disable Apache port 80 2020-01-29 18:23:08 +00:00
tests Workaround for Juju bug 1860992 2020-01-29 12:48:19 +00:00
unit_tests When resuming, exclude haproxy 2020-01-27 19:19:07 +00:00
.gitignore Resync charmhelpers for Stein Swift versions 2019-02-28 11:20:53 +00:00
.gitreview OpenDev Migration Patch 2019-04-19 19:36:59 +00:00
.project Fixup missing files 2013-02-27 16:18:34 +00:00
.pydevproject Enable xenial/queens amulet tests 2018-03-20 09:54:11 +00:00
.stestr.conf Convert charm to Python 3 only 2017-12-06 14:20:25 +00:00
.zuul.yaml Switch to Ussuri jobs 2019-12-26 17:30:06 +08:00
LICENSE Re-license charm as Apache-2.0 2016-07-01 18:12:11 +01:00
Makefile Tests dir no longer need copy of charmhelpers 2018-10-10 12:41:46 +00:00
README.Swift_ring_management Fix typo in ring management README 2019-05-17 11:19:47 -07:00
README.md Review and improve README 2020-02-24 22:08:09 -05:00
actions.yaml Drop support of swauth for Train and later 2020-01-07 15:03:08 -05:00
charm-helpers-hooks.yaml Sync charm/ceph helpers, tox, and requirements 2019-10-01 14:38:02 -05:00
config.yaml Drop support of swauth for Train and later 2020-01-07 15:03:08 -05:00
copyright Re-license charm as Apache-2.0 2016-07-01 18:12:11 +01:00
hardening.yaml Add hardening support 2016-03-24 11:36:26 +00:00
icon.svg Update charm icon 2017-08-02 17:28:33 +01:00
metadata.yaml Remove disco support from the charm 2020-02-18 15:45:01 +00:00
requirements.txt Sync charm/ceph helpers, tox, and requirements 2019-10-01 14:38:02 -05:00
revision Add config options for proxy-server.conf template. node-timeout and recoverable-node-timeout. For large swift/glance uploads, higher defaults are needed to prevent uploads from failing on real servers which are slower than VMs. 2014-06-03 20:38:25 -05:00
setup.cfg Add Python 3 Train unit tests 2019-07-30 10:20:39 -04:00
test-requirements.txt Sync charm/ceph helpers, tox, and requirements 2019-10-01 14:38:02 -05:00
tox.ini Sync charm/ceph helpers, tox, and requirements 2019-10-01 14:38:02 -05:00

README.md

Overview

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

The swift-proxy charm deploys Swift's proxy component. The charm's basic function is to manage zone assignment and enforce replica requirements for the storage nodes. It works in tandem with the swift-storage charm, which is used to add storage 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-assignment

The zone-assignment option defines the zone assignment method for storage nodes. Values include 'manual' (the default) and 'auto'.

replicas

The replicas option stipulates the number of data replicas are needed. This value should be equal to the number of zones. The default value is '3'.

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.

Swift as backend for Glance

Swift may be used as a storage backend for the Glance image service. To do so, add a relation between the swift-proxy and glance applications:

juju add-relation swift-proxy:object-store glance:object-store

Telemetry

Starting with OpenStack Mitaka improved telemetry collection support can be achieved by adding a relation to rabbitmq-server:

juju add-relation swift-proxy rabbitmq-server

Doing the above in a busy Swift deployment can add a significant amount of load to the underlying message bus.

High availability

This charm supports high availability. There are two mutually exclusive HA/clustering strategies:

  • virtual IP(s)
  • DNS

In both cases, the hacluster subordinate charm is required. It provides the corosync backend HA functionality.

virtual IP(s)

To use virtual IP(s) the clustered nodes and the VIP must be on the same subnet. That is, the VIP must be a valid IP on the subnet for one of the node's interfaces and each node has an interface in said subnet. The VIP becomes a highly-available API endpoint.

At a minimum, the configuration option vip must be defined. The value can take on space-separated values if multiple networks are in use. Optionally, options vip_iface or vip_cidr may be specified.

DNS

DNS high availability does not require the clustered nodes to be on the same subnet.

It does require:

  • an environment with MAAS 2.0 and Juju 2.0 (as minimum versions)
  • clustered nodes with static or "reserved" IP addresses registered in MAAS
  • DNS hostnames that are pre-registered in MAAS

At a minimum, the configuration option dns-ha must be set to 'true' and at least one of os-admin-hostname, os-internal-hostname, or os-public-hostname must be set.

The charm will throw an exception in the following circumstances:

  • if neither vip nor dns-ha is set and the charm has a relation added to hacluster
  • if both vip and dns-ha are set
  • if dns-ha is set and none of os-admin-hostname, os-internal-hostname, or os-public-hostname are set

Network spaces

This charm supports the use of Juju network spaces (Juju v.2.0). This feature optionally allows specific types of the application's network traffic to be bound to subnets that the underlying hardware is connected to.

Note: Spaces must be configured in the backing cloud prior to deployment.

API endpoints can be bound to distinct network spaces supporting the network separation of public, internal, and admin endpoints.

For example, providing that spaces 'public-space', 'internal-space', and 'admin-space' exist, the deploy command above could look like this:

juju deploy --config swift-proxy.yaml swift-proxy \
   --bind "public=public-space internal=internal-space admin=admin-space"

Alternatively, configuration can be provided as part of a bundle:

    swift-proxy:
      charm: cs:swift-proxy
      num_units: 1
      bindings:
        public: public-space
        internal: internal-space
        admin: admin-space

Note: Existing cinder units configured with the os-admin-network, os-internal-network, or os-public-network options will continue to honour them. Furthermore, these options override any space bindings, if set.

Actions

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

  • add-user
  • diskusage
  • dispersion-populate
  • dispersion-report
  • openstack-upgrade
  • pause
  • remove-devices
  • resume
  • set-weight

To display action descriptions run juju actions swift-proxy.

Bugs

Please report bugs on Launchpad.

For general charm questions refer to the OpenStack Charm Guide.