container-sync-realms.conf(5)

πŸ“¦
version 2.38.2 Β· 2 versions
  • 2.38.2 Β· nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.29.2 Β· ubuntu jammy
, in nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– container-sync-realms.conf(5) β€” the OpenStack Swift container sync realms config, explained by your fave ✨

okay so bestie, this is the manual page for container-sync-realms.conf, which lives under OpenStack Swift. Pull up a chair, grab a boba, we're doing config files today πŸŽ€


🌸 NAME 🌸

container-sync-realms.conf β€” the configuration file for the OpenStack Swift container sync realms πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

container-sync-realms.conf

✨ DESCRIPTION ✨

So this is the config file the Object storage Swift uses to do container-to-container synchronization. Basically, this file is how you set up clusters to allow and accept sync requests to and from other clusters. In it, you tell Swift where to sync your container to, plus a secret synchronization key to keep things on lock πŸ”

Want more info on container-to-container sync? It's all at:

https://docs.openstack.org/swift/latest/overview_container_sync.html

The file follows python-pastedeploy syntax. It's split into sections, and sections are wrapped in square brackets. Each section holds some key/value parameters, and we'll get into those below.

Any line that starts with a # symbol? Ignored. Trashed. Not the vibe. πŸ™ˆ

More on the python-pastedeploy config format here:

https://docs.pylonsproject.org/projects/pastedeploy/en/latest/#config-format


πŸ‘‘ GLOBAL SECTION πŸ‘‘

This one is marked by the section named [DEFAULT]. Here's what's allowed in there:

  • mtime_check_interval β€” how many seconds pass between checks of this config file's modified time to see if it changed and needs reloading. The default value is 300. ⏰

🌈 REALM SECTIONS 🌈

Every section name here is the name of a sync realm, like [realm1]. A sync realm is a set of clusters that agreed to let each other do container syncing. Realm names are treated as case insensitive, no cap. Here's what's allowed inside:

  • cluster_clustername1 β€” any value in the realm section whose name begins with cluster_ indicates the name and endpoint of a cluster, and external users will use it in their container's X-Container-Sync-To metadata header values, formatted like "realm_name/cluster_name/container_name". The Realm and cluster names are considered case insensitive. πŸ’«
  • cluster_clustername2 β€” same deal, bestie: any value in the realm section whose name begins with cluster_ indicates the name and endpoint of a cluster, and external users use it in their container's X-Container-Sync-To metadata header values, formatted like "realm_name/cluster_name/container_name". The Realm and cluster names are considered case insensitive.

The endpoint is what the container sync daemon uses when it sends requests out to that cluster. Big heads-up: this endpoint must be reachable by all container servers, because that's where the container sync daemon actually runs 🫢 Also note the endpoint ends with /v1/, and after that the container sync daemon adds the account/container/obj name.

  • key β€” this is the overall cluster-to-cluster key, used together with the external users' key that they set on their containers' X-Container-Sync-Key metadata header values. These keys sign every request the container sync daemon makes, and they validate every incoming container sync request. πŸ”‘
  • key2 β€” optional! An additional key that incoming requests get checked against. This is so you can rotate keys if you want: you move the existing key over to key2 and make a new key value. So slick 🧚

πŸ“ EXAMPLE πŸ“

[DEFAULT]
mtime_check_interval = 300

[realm1]
key = realm1key
key2 = realm1key2
cluster_clustername1 = https://host1/v1/
cluster_clustername2 = https://host2/v1/

[realm2]
key = realm2key
key2 = realm2key2
cluster_clustername3 = https://host3/v1/
cluster_clustername4 = https://host4/v1/

πŸ’œ DOCUMENTATION πŸ’œ

Want the deep dive? More in-depth docs about swift-container-sync and about OpenStack Swift as a whole live at:

https://docs.openstack.org/swift/latest/overview_container_sync.html

and

https://docs.openstack.org/swift/latest/


⭐ SEE ALSO ⭐


heads up bestie: this page is from OpenStack Swift, running on the Linux platform, and this version is dated 10/09/2017 β€” that's the container-sync-realms.conf(5) page, periodt. Go forth and sync responsibly πŸ’…βœ¨