diff --git a/README.en.md b/README.en.md index e354696ba92bbf329cfa410dc21a3dbe6f98f7e8..8a8fec8cc5cfbbad756a181ac03ed3a9b241d876 100644 --- a/README.en.md +++ b/README.en.md @@ -1,3 +1,36 @@ # openstack-swift -OpenStack services are exclusively released in the openEuler LTS version. Please refer to other Multi-Version branches for the Spec source code. \ No newline at end of file +#### Description +OpenStack Swift is a distributed object storage system designed to scale from a single machine to thousands of servers. + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index 376abb5fe11c2b9e80fff30fbfc2f96202cdcc16..79614e9d77857c46b8176ee88c458ab785ca0bf1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,37 @@ # openstack-swift -openstack服务只在openEuler LTS版本发布,Spec源码请参考其他Multi-Version分支。 \ No newline at end of file +#### 介绍 +OpenStack Swift is a distributed object storage system designed to scale from a single machine to thousands of servers. + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/account-server.conf b/account-server.conf new file mode 100644 index 0000000000000000000000000000000000000000..ab78395db7d2cad6687ca5277ab2300cf98e7581 --- /dev/null +++ b/account-server.conf @@ -0,0 +1,21 @@ +[DEFAULT] +bind_ip = 127.0.0.1 +bind_port = 6202 +workers = 2 +user = swift +swift_dir = /etc/swift +devices = /srv/node +mount_check = True + +[pipeline:main] +pipeline = healthcheck recon account-server + +[filter:healthcheck] +use = egg:swift#healthcheck + +[filter:recon] +use = egg:swift#recon +recon_cache_path = /var/cache/swift + +[app:account-server] +use = egg:swift#account diff --git a/container-reconciler.conf b/container-reconciler.conf new file mode 100644 index 0000000000000000000000000000000000000000..0a3de0220d78eab2bdb056f60b5b03a1bae10184 --- /dev/null +++ b/container-reconciler.conf @@ -0,0 +1,52 @@ +[DEFAULT] +# swift_dir = /etc/swift +# user = swift +# You can specify default log routing here if you want: +# log_name = swift +# log_facility = LOG_LOCAL0 +# log_level = INFO +# log_address = /dev/log +# +# comma separated list of functions to call to setup custom log handlers. +# functions get passed: conf, name, log_to_console, log_route, fmt, logger, +# adapted_logger +# log_custom_handlers = +# +# If set, log_udp_host will override log_address +# log_udp_host = +# log_udp_port = 514 +# +# You can enable StatsD logging here: +# log_statsd_host = localhost +# log_statsd_port = 8125 +# log_statsd_default_sample_rate = 1.0 +# log_statsd_sample_rate_factor = 1.0 +# log_statsd_metric_prefix = + +[container-reconciler] +# The reconciler will re-attempt reconciliation if the source object is not +# available up to reclaim_age seconds before it gives up and deletes the entry +# in the queue. +# reclaim_age = 604800 +# The cycle time of the daemon +# interval = 300 +# Server errors from requests will be retried by default +# request_tries = 3 + +[pipeline:main] +pipeline = catch_errors proxy-logging cache proxy-server + +[app:proxy-server] +use = egg:swift#proxy +# See proxy-server.conf-sample for options + +[filter:cache] +use = egg:swift#memcache +# See proxy-server.conf-sample for options + +[filter:proxy-logging] +use = egg:swift#proxy_logging + +[filter:catch_errors] +use = egg:swift#catch_errors +# See proxy-server.conf-sample for options diff --git a/container-server.conf b/container-server.conf new file mode 100644 index 0000000000000000000000000000000000000000..c64e153bce543a692ee062d7ffa42cbde861ebb6 --- /dev/null +++ b/container-server.conf @@ -0,0 +1,21 @@ +[DEFAULT] +bind_ip = 127.0.0.1 +bind_port = 6201 +workers = 2 +user = swift +swift_dir = /etc/swift +devices = /srv/node +mount_check = True + +[pipeline:main] +pipeline = healthcheck recon container-server + +[filter:healthcheck] +use = egg:swift#healthcheck + +[filter:recon] +use = egg:swift#recon +recon_cache_path = /var/cache/swift + +[app:container-server] +use = egg:swift#container diff --git a/internal-client.conf b/internal-client.conf new file mode 100644 index 0000000000000000000000000000000000000000..a3be2eaa4186124e4a0f2f92d08d7567ff96c759 --- /dev/null +++ b/internal-client.conf @@ -0,0 +1,47 @@ +[DEFAULT] +# swift_dir = /etc/swift +# user = swift +# You can specify default log routing here if you want: +# log_name = swift +# log_facility = LOG_LOCAL0 +# log_level = INFO +# log_address = /dev/log +# +# comma separated list of functions to call to setup custom log handlers. +# functions get passed: conf, name, log_to_console, log_route, fmt, logger, +# adapted_logger +# log_custom_handlers = +# +# If set, log_udp_host will override log_address +# log_udp_host = +# log_udp_port = 514 +# +# You can enable StatsD logging here: +# log_statsd_host = +# log_statsd_port = 8125 +# log_statsd_default_sample_rate = 1.0 +# log_statsd_sample_rate_factor = 1.0 +# log_statsd_metric_prefix = + +[pipeline:main] +pipeline = catch_errors proxy-logging cache symlink proxy-server + +[app:proxy-server] +use = egg:swift#proxy +account_autocreate = true +# See proxy-server.conf-sample for options + +[filter:symlink] +use = egg:swift#symlink +# See proxy-server.conf-sample for options + +[filter:cache] +use = egg:swift#memcache +# See proxy-server.conf-sample for options + +[filter:proxy-logging] +use = egg:swift#proxy_logging + +[filter:catch_errors] +use = egg:swift#catch_errors +# See proxy-server.conf-sample for options diff --git a/object-expirer.conf b/object-expirer.conf new file mode 100644 index 0000000000000000000000000000000000000000..29327ab476b0670a152cda98df631193eb359e79 --- /dev/null +++ b/object-expirer.conf @@ -0,0 +1,20 @@ +[DEFAULT] + +[object-expirer] +# auto_create_account_prefix = . + +[pipeline:main] +pipeline = catch_errors proxy-logging cache proxy-server + +[app:proxy-server] +use = egg:swift#proxy + +[filter:cache] +use = egg:swift#memcache +memcache_servers = 127.0.0.1:11211 + +[filter:catch_errors] +use = egg:swift#catch_errors + +[filter:proxy-logging] +use = egg:swift#poxy_logging diff --git a/object-server.conf b/object-server.conf new file mode 100644 index 0000000000000000000000000000000000000000..74912b3293986dbb54f7e5fe6b479cf7d8f1325e --- /dev/null +++ b/object-server.conf @@ -0,0 +1,22 @@ +[DEFAULT] +bind_ip = 127.0.0.1 +bind_port = 6200 +workers = 2 +user = swift +swift_dir = /etc/swift +devices = /srv/node +mount_check = True + +[pipeline:main] +pipeline = healthcheck recon object-server + +[filter:healthcheck] +use = egg:swift#healthcheck + +[filter:recon] +use = egg:swift#recon +recon_cache_path = /var/cache/swift +recon_lock_path = /var/lock + +[app:object-server] +use = egg:swift#object diff --git a/openstack-swift-account-auditor.service b/openstack-swift-account-auditor.service new file mode 100644 index 0000000000000000000000000000000000000000..35413ceb7efe15daa751a286908c92d0b342c2fd --- /dev/null +++ b/openstack-swift-account-auditor.service @@ -0,0 +1,12 @@ +# After network.target just because. +[Unit] +Description=OpenStack Object Storage (swift) - Account Auditor +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-auditor /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-account-auditor@.service b/openstack-swift-account-auditor@.service new file mode 100644 index 0000000000000000000000000000000000000000..8b44df92d13434cab4f5248b6f52ce98a114b5bc --- /dev/null +++ b/openstack-swift-account-auditor@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Auditor instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-auditor /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-account-reaper.service b/openstack-swift-account-reaper.service new file mode 100644 index 0000000000000000000000000000000000000000..dd6fb004d5556131f63b98b6e1820c166fa62f1c --- /dev/null +++ b/openstack-swift-account-reaper.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Reaper +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-reaper /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-account-reaper@.service b/openstack-swift-account-reaper@.service new file mode 100644 index 0000000000000000000000000000000000000000..dbd5aa4bb64df72ec7a211fe3d8e6ea087642b25 --- /dev/null +++ b/openstack-swift-account-reaper@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Reaper instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-reaper /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-account-replicator.service b/openstack-swift-account-replicator.service new file mode 100644 index 0000000000000000000000000000000000000000..0cad889cafc399f522262867ef30717ab30e7468 --- /dev/null +++ b/openstack-swift-account-replicator.service @@ -0,0 +1,12 @@ +# After network.target just so replicator can talk to other nodes. +[Unit] +Description=OpenStack Object Storage (swift) - Account Replicator +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-replicator /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-account-replicator@.service b/openstack-swift-account-replicator@.service new file mode 100644 index 0000000000000000000000000000000000000000..65fbaa359b42c8230cdcd30132028365a57eb23c --- /dev/null +++ b/openstack-swift-account-replicator@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Replicator instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-replicator /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-account.service b/openstack-swift-account.service new file mode 100644 index 0000000000000000000000000000000000000000..190c4e716340418cf7938284af7f03fc6ae25c82 --- /dev/null +++ b/openstack-swift-account.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-server /etc/swift/account-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-account@.service b/openstack-swift-account@.service new file mode 100644 index 0000000000000000000000000000000000000000..518c72d5b3c79e2a9610d7b917eb1ef2a3322aff --- /dev/null +++ b/openstack-swift-account@.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Account Server instance %I +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-account-server /etc/swift/account-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-auditor.service b/openstack-swift-container-auditor.service new file mode 100644 index 0000000000000000000000000000000000000000..6359b9198e5e296f95dfbdc4a2aaedd1829b8761 --- /dev/null +++ b/openstack-swift-container-auditor.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Auditor +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-auditor /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-auditor@.service b/openstack-swift-container-auditor@.service new file mode 100644 index 0000000000000000000000000000000000000000..7c046da956172bc361dc0996db11fbd8452adfd2 --- /dev/null +++ b/openstack-swift-container-auditor@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Auditor instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-auditor /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-reconciler.service b/openstack-swift-container-reconciler.service new file mode 100644 index 0000000000000000000000000000000000000000..f23345127b7cf5eaebb2f254498187024f57e1c3 --- /dev/null +++ b/openstack-swift-container-reconciler.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Reconciler +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-reconciler /etc/swift/container-reconciler.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-replicator.service b/openstack-swift-container-replicator.service new file mode 100644 index 0000000000000000000000000000000000000000..399f7b41e90ef13aaeeb995d185112ee15734524 --- /dev/null +++ b/openstack-swift-container-replicator.service @@ -0,0 +1,12 @@ +# After network.target just so replicator can talk to other nodes. +[Unit] +Description=OpenStack Object Storage (swift) - Container Replicator +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-replicator /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-replicator@.service b/openstack-swift-container-replicator@.service new file mode 100644 index 0000000000000000000000000000000000000000..48035035228f0b415eed9dc7b3fccfa46401e98b --- /dev/null +++ b/openstack-swift-container-replicator@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Replicator instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-replicator /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-sharder.service b/openstack-swift-container-sharder.service new file mode 100644 index 0000000000000000000000000000000000000000..20bf17ba161cc3acb9d6d4a764759c34faf82d94 --- /dev/null +++ b/openstack-swift-container-sharder.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Sharder +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-sharder /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-sync.service b/openstack-swift-container-sync.service new file mode 100644 index 0000000000000000000000000000000000000000..28df8148459f0f0e1c1ed41b55e8415057c56b58 --- /dev/null +++ b/openstack-swift-container-sync.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Sync +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-sync /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-sync@.service b/openstack-swift-container-sync@.service new file mode 100644 index 0000000000000000000000000000000000000000..4e99c8e2e726ccd4e454154825eadcf4364d79e2 --- /dev/null +++ b/openstack-swift-container-sync@.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container sync instance %I +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-sync /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-updater.service b/openstack-swift-container-updater.service new file mode 100644 index 0000000000000000000000000000000000000000..6efc57e5c4fbebd7a3e556b81a4333de0a9f8307 --- /dev/null +++ b/openstack-swift-container-updater.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Updater +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-updater /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container-updater@.service b/openstack-swift-container-updater@.service new file mode 100644 index 0000000000000000000000000000000000000000..19f99ff7f8af27deabfa0225a435d3d94b443856 --- /dev/null +++ b/openstack-swift-container-updater@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Updater instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-updater /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container.service b/openstack-swift-container.service new file mode 100644 index 0000000000000000000000000000000000000000..46752a4abe52bca107afb6c36157aadd9fcc87e3 --- /dev/null +++ b/openstack-swift-container.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-server /etc/swift/container-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-container@.service b/openstack-swift-container@.service new file mode 100644 index 0000000000000000000000000000000000000000..ff65089051c5ab38ce1c67271b7da022d7aa91a0 --- /dev/null +++ b/openstack-swift-container@.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Container Server instance %I +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-container-server /etc/swift/container-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-auditor.service b/openstack-swift-object-auditor.service new file mode 100644 index 0000000000000000000000000000000000000000..498d53e26603c38aa3bbb76a9c5c96c46ede8c49 --- /dev/null +++ b/openstack-swift-object-auditor.service @@ -0,0 +1,12 @@ +# After network.target just because. +[Unit] +Description=OpenStack Object Storage (swift) - Object Auditor +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-auditor /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-auditor@.service b/openstack-swift-object-auditor@.service new file mode 100644 index 0000000000000000000000000000000000000000..f5c253703a8cccc45b4f2b6f14220337aebf72a0 --- /dev/null +++ b/openstack-swift-object-auditor@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Auditor instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-auditor /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-expirer.service b/openstack-swift-object-expirer.service new file mode 100644 index 0000000000000000000000000000000000000000..0fbe2e507d8078df51c4fbb7d2d7f427dd5ed7fa --- /dev/null +++ b/openstack-swift-object-expirer.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Expirer +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-expirer /etc/swift/object-expirer.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-reconstructor.service b/openstack-swift-object-reconstructor.service new file mode 100644 index 0000000000000000000000000000000000000000..a0fa66363f96485b01367badaabe21f8d075e230 --- /dev/null +++ b/openstack-swift-object-reconstructor.service @@ -0,0 +1,12 @@ +# After network.target just so replicator can talk to other nodes. +[Unit] +Description=OpenStack Object Storage (swift) - Object Reconstructor +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-reconstructor /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-reconstructor@.service b/openstack-swift-object-reconstructor@.service new file mode 100644 index 0000000000000000000000000000000000000000..a69d969c4fa8b174b7b42d7126474cc5a7be7f84 --- /dev/null +++ b/openstack-swift-object-reconstructor@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Reconstructor instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-reconstructor /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-replicator.service b/openstack-swift-object-replicator.service new file mode 100644 index 0000000000000000000000000000000000000000..be1d3fa1a7c649ac2671fb301dd77c2cc188b3f8 --- /dev/null +++ b/openstack-swift-object-replicator.service @@ -0,0 +1,12 @@ +# After network.target just so replicator can talk to other nodes. +[Unit] +Description=OpenStack Object Storage (swift) - Object Replicator +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-replicator /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-replicator@.service b/openstack-swift-object-replicator@.service new file mode 100644 index 0000000000000000000000000000000000000000..74933987519d747f1481065887a0974cb74d8f43 --- /dev/null +++ b/openstack-swift-object-replicator@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Replicator instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-replicator /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-updater.service b/openstack-swift-object-updater.service new file mode 100644 index 0000000000000000000000000000000000000000..d9697a5290e4605281e7ef2846962722b56e8036 --- /dev/null +++ b/openstack-swift-object-updater.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Updater +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-updater /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object-updater@.service b/openstack-swift-object-updater@.service new file mode 100644 index 0000000000000000000000000000000000000000..9f223c756cf337f92f841555085a7c2a7a33173c --- /dev/null +++ b/openstack-swift-object-updater@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Updater instance %I +After=syslog.target network.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-updater /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object.service b/openstack-swift-object.service new file mode 100644 index 0000000000000000000000000000000000000000..3e57503c8926c8f153d1c12c56b0456313c9fc48 --- /dev/null +++ b/openstack-swift-object.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-server /etc/swift/object-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-object@.service b/openstack-swift-object@.service new file mode 100644 index 0000000000000000000000000000000000000000..4199e6844d5c762c2c1f9ba4152b50135e8b4e71 --- /dev/null +++ b/openstack-swift-object@.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Object Server instance %I +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-object-server /etc/swift/object-server/%i.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift-proxy.service b/openstack-swift-proxy.service new file mode 100644 index 0000000000000000000000000000000000000000..d22e8826b767d912d8c12fa793dafbc12bed9210 --- /dev/null +++ b/openstack-swift-proxy.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack Object Storage (swift) - Proxy Server +Wants=network-online.target +After=syslog.target network-online.target + +[Service] +Type=simple +User=swift +ExecStart=/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack-swift.logrotate b/openstack-swift.logrotate new file mode 100644 index 0000000000000000000000000000000000000000..f275ac7e49ac49d7dfa46c82cd710c333561ca78 --- /dev/null +++ b/openstack-swift.logrotate @@ -0,0 +1,8 @@ +/var/log/swift/swift.log +{ + missingok + compress + postrotate + /bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/openstack-swift.rsyslog b/openstack-swift.rsyslog new file mode 100644 index 0000000000000000000000000000000000000000..4ea55c236d1668efb97286dcb72fcada810cb504 --- /dev/null +++ b/openstack-swift.rsyslog @@ -0,0 +1,5 @@ +# LOCAL2 is what Swift gets in RHOS and RDO if installed with Packstack (also, +# in docs). The breakout action prevents logging into /var/log/messages, +# bz#997983. +local2.* /var/log/swift/swift.log +& stop diff --git a/openstack-swift.spec b/openstack-swift.spec new file mode 100644 index 0000000000000000000000000000000000000000..60e3a344de671fa01365f6b5fd54bd692c7319fe --- /dev/null +++ b/openstack-swift.spec @@ -0,0 +1,612 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%global with_doc 1 + +%global common_desc \ +OpenStack Object Storage (Swift) aggregates commodity servers to work together \ +in clusters for reliable, redundant, and large-scale storage of static objects. \ +Objects are written to multiple hardware devices in the data center, with the \ +OpenStack software responsible for ensuring data replication and integrity \ +across the cluster. Storage clusters can scale horizontally by adding new nodes, \ +which are automatically configured. Should a node fail, OpenStack works to \ +replicate its content from other active nodes. Because OpenStack uses software \ +logic to ensure data replication and distribution across different devices, \ +inexpensive commodity hard drives and servers can be used in lieu of more \ +expensive equipment. + +Name: openstack-swift +Version: 2.31.1 +Release: 1 +Summary: OpenStack Object Storage +License: ASL 2.0 +URL: https://docs.openstack.org/swift/latest/ +Source0: https://tarballs.openstack.org/swift/swift-%{upstream_version}.tar.gz + +Source2: %{name}-account.service +Source21: %{name}-account@.service +Source22: account-server.conf +Source23: %{name}-account-replicator.service +Source24: %{name}-account-replicator@.service +Source25: %{name}-account-auditor.service +Source26: %{name}-account-auditor@.service +Source27: %{name}-account-reaper.service +Source28: %{name}-account-reaper@.service +Source4: %{name}-container.service +Source41: %{name}-container@.service +Source42: container-server.conf +Source43: %{name}-container-replicator.service +Source44: %{name}-container-replicator@.service +Source45: %{name}-container-auditor.service +Source46: %{name}-container-auditor@.service +Source47: %{name}-container-updater.service +Source48: %{name}-container-updater@.service +Source49: %{name}-container-sharder.service +# we seriously need to think about dropping the enumerated units - no sharder@ +Source5: %{name}-object.service +Source51: %{name}-object@.service +Source52: object-server.conf +Source53: %{name}-object-replicator.service +Source54: %{name}-object-replicator@.service +Source55: %{name}-object-auditor.service +Source56: %{name}-object-auditor@.service +Source57: %{name}-object-updater.service +Source58: %{name}-object-updater@.service +Source59: %{name}-object-expirer.service +Source63: %{name}-container-reconciler.service +Source6: %{name}-proxy.service +Source61: proxy-server.conf +Source62: object-expirer.conf +Source64: container-reconciler.conf +Source20: %{name}.tmpfs +Source7: swift.conf +Source71: %{name}.rsyslog +Source72: %{name}.logrotate +Source73: %{name}-object-reconstructor.service +Source74: %{name}-object-reconstructor@.service +Source75: %{name}-container-sync.service +Source76: %{name}-container-sync@.service +Source77: internal-client.conf + +BuildArch: noarch + +BuildRequires: openstack-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-wheel +BuildRequires: python3-idna +BuildRequires: git-core +BuildRequires: /usr/bin/pathfix.py + +BuildRequires: systemd + +# Required to compile translation files +BuildRequires: python3-babel +# Required to build docs: doxygen invokes actual code and its imports +BuildRequires: python3-keystoneclient + +Requires: openstack-swift-proxy +Requires: openstack-swift-account +Requires: openstack-swift-container +Requires: openstack-swift-object + +%description +%{common_desc} + +%package account +Summary: Account services for Swift + +Requires: openstack-swift-common = %{version}-%{release} +Requires: rsync >= 3.0 + +%description account +%{common_desc} + +This package contains the %{name} account server. + +%package container +Summary: Container services for Swift + +Requires: openstack-swift-common = %{version}-%{release} +Requires: rsync >= 3.0 + +%description container +%{common_desc} + +This package contains the %{name} container server. + +%package object +Summary: Object services for Swift + +Requires: openstack-swift-common = %{version}-%{release} +Requires: rsync >= 3.0 + +%description object +%{common_desc} + +This package contains the %{name} object server. + +%package proxy +Summary: A proxy server for Swift + +Requires: openstack-swift-common = %{version}-%{release} +Requires: python3-keystoneclient +Requires: python3-keystonemiddleware + +%description proxy +%{common_desc} + +This package contains the %{name} proxy server. + +%package common +Summary: Common files for Swift service +Requires: python3-swift = %{version}-%{release} + +%description common +%{common_desc} + +This package contains the common files for swift service. + +%package -n python3-swift +Summary: Python libraries for the OpenStack Object Storage (Swift) +%{?python_provide:%python_provide python3-swift} + +Requires: python3-eventlet >= 0.25.0 +Requires: python3-greenlet >= 0.3.2 +Requires: python3-pyeclib >= 1.3.1 +Requires: python3-cryptography >= 2.0.2 +Requires: python3-oslo-config >= 5.1.0 +Requires: python3-castellan >= 0.7.0 +Requires: python3-requests >= 2.14.2 +Requires: python3-six >= 1.10.0 + +Requires: python3-paste-deploy >= 1.3.3 +Requires: python3-xattr >= 0.4 +Requires: python3-netifaces >= 0.8 +Requires: python3-lxml >= 3.4.1 +Requires: python3-idna + +%{?systemd_ordering} + +Requires(pre): shadow-utils + +%description -n python3-swift +%{common_desc} + +This package contains the %{name} Python library. + +%package -n python3-swift-tests +Summary: Swift tests +Requires: python3-swift = %{version}-%{release} +%{?python_provide:%python_provide python3-swift-tests} +Provides: python-swift-tests = %{version}-%{release} + +%description -n python3-swift-tests +%{common_desc} + +This package contains the %{name} test files. + +%if 0%{?with_doc} +%package doc +Summary: Documentation for %{name} + +BuildRequires: python3-sphinx > 2.1.0 +BuildRequires: python3-openstackdocstheme >= 2.2.1 +BuildRequires: python3-sphinxcontrib-svg2pdfconverter >= 0.1.0 +BuildRequires: python3-reno >= 3.1.0 +BuildRequires: python3-os-api-ref >= 1.0.0 +BuildRequires: python3-keystoneclient > 2.1.0 +# Required for generating docs (otherwise py-modindex.html is missing) +BuildRequires: python3-eventlet +BuildRequires: python3-pyeclib + +BuildRequires: python3-netifaces +BuildRequires: python3-paste-deploy +BuildRequires: python3-xattr +BuildRequires: python3-lxml +BuildRequires: python3-idna + +%description doc +%{common_desc} + +This package contains documentation files for %{name}. +%endif + +%prep +# Required for tarball sources verification + +%autosetup -n swift-%{upstream_version} -S git + +# Let RPM handle the dependencies +%py_req_cleanup + +%build +%{py3_build} +# Generate i18n files +%{__python3} setup.py compile_catalog -d build/lib/swift/locale --domain swift + +%if 0%{?with_doc} +# Fails unless we create the build directory +mkdir -p doc/build +# Build docs +CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \ +PATH="%{buildroot}%{_bindir}:$PATH" \ +PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \ +PYTHONDONTWRITEBYTECODE=1 \ +%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \ +PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \ +sphinx-build -b html doc/source doc/build/html +# Fix hidden-file-or-dir warning +rm -rf doc/build/html/.{doctrees,buildinfo} +%endif + +%install +%{py3_install} +# systemd units +install -p -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}-account.service +install -p -D -m 644 %{SOURCE21} %{buildroot}%{_unitdir}/%{name}-account@.service +install -p -D -m 644 %{SOURCE23} %{buildroot}%{_unitdir}/%{name}-account-replicator.service +install -p -D -m 644 %{SOURCE24} %{buildroot}%{_unitdir}/%{name}-account-replicator@.service +install -p -D -m 644 %{SOURCE25} %{buildroot}%{_unitdir}/%{name}-account-auditor.service +install -p -D -m 644 %{SOURCE26} %{buildroot}%{_unitdir}/%{name}-account-auditor@.service +install -p -D -m 644 %{SOURCE27} %{buildroot}%{_unitdir}/%{name}-account-reaper.service +install -p -D -m 644 %{SOURCE28} %{buildroot}%{_unitdir}/%{name}-account-reaper@.service +install -p -D -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}-container.service +install -p -D -m 644 %{SOURCE41} %{buildroot}%{_unitdir}/%{name}-container@.service +install -p -D -m 644 %{SOURCE43} %{buildroot}%{_unitdir}/%{name}-container-replicator.service +install -p -D -m 644 %{SOURCE44} %{buildroot}%{_unitdir}/%{name}-container-replicator@.service +install -p -D -m 644 %{SOURCE45} %{buildroot}%{_unitdir}/%{name}-container-auditor.service +install -p -D -m 644 %{SOURCE46} %{buildroot}%{_unitdir}/%{name}-container-auditor@.service +install -p -D -m 644 %{SOURCE47} %{buildroot}%{_unitdir}/%{name}-container-updater.service +install -p -D -m 644 %{SOURCE48} %{buildroot}%{_unitdir}/%{name}-container-updater@.service +install -p -D -m 644 %{SOURCE49} %{buildroot}%{_unitdir}/%{name}-container-sharder.service +install -p -D -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}-object.service +install -p -D -m 644 %{SOURCE51} %{buildroot}%{_unitdir}/%{name}-object@.service +install -p -D -m 644 %{SOURCE53} %{buildroot}%{_unitdir}/%{name}-object-replicator.service +install -p -D -m 644 %{SOURCE54} %{buildroot}%{_unitdir}/%{name}-object-replicator@.service +install -p -D -m 644 %{SOURCE55} %{buildroot}%{_unitdir}/%{name}-object-auditor.service +install -p -D -m 644 %{SOURCE56} %{buildroot}%{_unitdir}/%{name}-object-auditor@.service +install -p -D -m 644 %{SOURCE57} %{buildroot}%{_unitdir}/%{name}-object-updater.service +install -p -D -m 644 %{SOURCE58} %{buildroot}%{_unitdir}/%{name}-object-updater@.service +install -p -D -m 644 %{SOURCE59} %{buildroot}%{_unitdir}/%{name}-object-expirer.service +install -p -D -m 644 %{SOURCE63} %{buildroot}%{_unitdir}/%{name}-container-reconciler.service +install -p -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}-proxy.service +install -p -D -m 644 %{SOURCE73} %{buildroot}%{_unitdir}/%{name}-object-reconstructor.service +install -p -D -m 644 %{SOURCE74} %{buildroot}%{_unitdir}/%{name}-object-reconstructor@.service +install -p -D -m 644 %{SOURCE75} %{buildroot}%{_unitdir}/%{name}-container-sync.service +install -p -D -m 644 %{SOURCE76} %{buildroot}%{_unitdir}/%{name}-container-sync@.service +# Misc other +install -d -m 755 %{buildroot}%{_sysconfdir}/swift +install -d -m 755 %{buildroot}%{_sysconfdir}/swift/account-server +install -d -m 755 %{buildroot}%{_sysconfdir}/swift/container-server +install -d -m 755 %{buildroot}%{_sysconfdir}/swift/object-server +install -d -m 755 %{buildroot}%{_sysconfdir}/swift/proxy-server +# Config files +install -p -D -m 660 %{SOURCE22} %{buildroot}%{_sysconfdir}/swift/account-server.conf +install -p -D -m 660 %{SOURCE42} %{buildroot}%{_sysconfdir}/swift/container-server.conf +install -p -D -m 660 %{SOURCE52} %{buildroot}%{_sysconfdir}/swift/object-server.conf +install -p -D -m 660 %{SOURCE61} %{buildroot}%{_sysconfdir}/swift/proxy-server.conf +install -p -D -m 660 %{SOURCE62} %{buildroot}%{_sysconfdir}/swift/object-expirer.conf +install -p -D -m 660 %{SOURCE64} %{buildroot}%{_sysconfdir}/swift/container-reconciler.conf +install -p -D -m 660 %{SOURCE7} %{buildroot}%{_sysconfdir}/swift/swift.conf +install -p -D -m 660 %{SOURCE77} %{buildroot}%{_sysconfdir}/swift/internal-client.conf +# Install pid directory +install -d -m 755 %{buildroot}%{_localstatedir}/run/swift +install -d -m 755 %{buildroot}%{_localstatedir}/run/swift/account-server +install -d -m 755 %{buildroot}%{_localstatedir}/run/swift/container-server +install -d -m 755 %{buildroot}%{_localstatedir}/run/swift/object-server +install -d -m 755 %{buildroot}%{_localstatedir}/run/swift/proxy-server +# syslog +install -d -m 755 %{buildroot}%{_localstatedir}/log/swift +install -p -D -m 644 %{SOURCE71} %{buildroot}%{_sysconfdir}/rsyslog.d/openstack-swift.conf +install -p -D -m 644 %{SOURCE72} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-swift +# Swift run directories +install -p -D -m 644 %{SOURCE20} %{buildroot}%{_tmpfilesdir}/openstack-swift.conf +# Install recon directory +install -d -m 755 %{buildroot}%{_localstatedir}/cache/swift +# Install home directory +install -d -m 755 %{buildroot}%{_sharedstatedir}/swift +# man pages +install -d -m 755 %{buildroot}%{_mandir}/man5 +for m in doc/manpages/*.5; do + install -p -m 0644 $m %{buildroot}%{_mandir}/man5 +done +install -d -m 755 %{buildroot}%{_mandir}/man1 +for m in doc/manpages/*.1; do + install -p -m 0644 $m %{buildroot}%{_mandir}/man1 +done + +# tests +mkdir -p %{buildroot}%{_datadir}/swift/test +cp -r test %{buildroot}%{python3_sitelib}/swift/test + +# Remove unnecessary shebangs +sed -i '1{/^#!/d}' %{buildroot}%{python3_sitelib}/swift/test/probe/test_object_partpower_increase.py +sed -i '1{/^#!/d}' %{buildroot}%{python3_sitelib}/swift/test/functional/test_symlink.py +# Remove executable bit to avoid rpmlint failures +chmod -x %{buildroot}%{python3_sitelib}/swift/test/probe/test_object_partpower_increase.py +chmod -x %{buildroot}%{python3_sitelib}/swift/test/functional/test_symlink.py + +# Install i18n files +install -d -m 755 %{buildroot}%{_datadir} +rm -f %{buildroot}%{python3_sitelib}/swift/locale/*/LC_*/swift*po +rm -f %{buildroot}%{python3_sitelib}/swift/locale/*pot +mv %{buildroot}%{python3_sitelib}/swift/locale %{buildroot}%{_datadir}/locale + +# Fix shebangs for Python 3-only distros +pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/swift/test + +# Find language files +%find_lang swift --all-name + +%clean +rm -rf %{buildroot} + +%pre -n python3-swift +getent group swift >/dev/null || groupadd -r swift -g 160 +getent passwd swift >/dev/null || \ +useradd -r -g swift -u 160 -d %{_sharedstatedir}/swift -s /sbin/nologin \ +-c "OpenStack Swift Daemons" swift +exit 0 + +%post account +%systemd_post %{name}-account.service +%systemd_post %{name}-account-replicator.service +%systemd_post %{name}-account-auditor.service +%systemd_post %{name}-account-reaper.service + +%preun account +%systemd_preun %{name}-account.service +%systemd_preun %{name}-account-replicator.service +%systemd_preun %{name}-account-auditor.service +%systemd_preun %{name}-account-reaper.service + +%postun account +%systemd_postun %{name}-account.service +%systemd_postun %{name}-account-replicator.service +%systemd_postun %{name}-account-auditor.service +%systemd_postun %{name}-account-reaper.service + +%post container +%systemd_post %{name}-container.service +%systemd_post %{name}-container-replicator.service +%systemd_post %{name}-container-auditor.service +%systemd_post %{name}-container-updater.service +%systemd_post %{name}-container-sync.service + +%preun container +%systemd_preun %{name}-container.service +%systemd_preun %{name}-container-replicator.service +%systemd_preun %{name}-container-auditor.service +%systemd_preun %{name}-container-updater.service +%systemd_preun %{name}-container-sync.service + +%postun container +%systemd_postun %{name}-container.service +%systemd_postun %{name}-container-replicator.service +%systemd_postun %{name}-container-auditor.service +%systemd_postun %{name}-container-updater.service +%systemd_postun %{name}-container-sync.service + +%post object +%systemd_post %{name}-object.service +%systemd_post %{name}-object-replicator.service +%systemd_post %{name}-object-reconstructor.service +%systemd_post %{name}-object-auditor.service +%systemd_post %{name}-object-updater.service + +%preun object +%systemd_preun %{name}-object.service +%systemd_preun %{name}-object-replicator.service +%systemd_preun %{name}-object-reconstructor.service +%systemd_preun %{name}-object-auditor.service +%systemd_preun %{name}-object-updater.service + +%postun object +%systemd_postun %{name}-object.service +%systemd_postun %{name}-object-replicator.service +%systemd_postun %{name}-object-reconstructor.service +%systemd_postun %{name}-object-auditor.service +%systemd_postun %{name}-object-updater.service + +%post proxy +%systemd_post %{name}-proxy.service +%systemd_post %{name}-object-expirer.service + +%preun proxy +%systemd_preun %{name}-proxy.service +%systemd_preun %{name}-object-expirer.service + +%postun proxy +%systemd_postun %{name}-proxy.service +%systemd_postun %{name}-object-expirer.service + +%post -n python3-swift +/usr/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || : + +%files +%defattr(-,root,root,-) +%license LICENSE + +%files account +%defattr(-,root,root,-) +%{_mandir}/man5/account-server.conf.5* +%{_mandir}/man1/swift-account-auditor.1* +%{_mandir}/man1/swift-account-info.1* +%{_mandir}/man1/swift-account-reaper.1* +%{_mandir}/man1/swift-account-replicator.1* +%{_mandir}/man1/swift-account-server.1* +%{_unitdir}/%{name}-account*.service +%dir %{_sysconfdir}/swift/account-server +%config(noreplace) %attr(640, swift, swift) %{_sysconfdir}/swift/account-server.conf +%dir %attr(0755, swift, root) %{_localstatedir}/run/swift/account-server +%{_bindir}/swift-account-auditor +%{_bindir}/swift-account-info +%{_bindir}/swift-account-reaper +%{_bindir}/swift-account-replicator +%{_bindir}/swift-account-server + +%files container +%defattr(-,root,root,-) +%{_mandir}/man5/container-server.conf.5* +%{_mandir}/man1/swift-container-auditor.1* +%{_mandir}/man1/swift-container-info.1* +%{_mandir}/man1/swift-container-replicator.1* +%{_mandir}/man1/swift-container-server.1* +%{_mandir}/man1/swift-container-sync.1* +%{_mandir}/man1/swift-container-updater.1* +%{_unitdir}/%{name}-container*.service +%dir %{_sysconfdir}/swift/container-server +%config(noreplace) %attr(640, swift, swift) %{_sysconfdir}/swift/container-server.conf +%config(noreplace) %attr(640, swift, swift) %{_sysconfdir}/swift/internal-client.conf +%dir %attr(0755, swift, root) %{_localstatedir}/run/swift/container-server +%{_bindir}/swift-container-auditor +%{_bindir}/swift-container-deleter +%{_bindir}/swift-container-info +%{_bindir}/swift-container-server +%{_bindir}/swift-container-replicator +%{_bindir}/swift-container-updater +%{_bindir}/swift-container-sync +%{_bindir}/swift-container-sharder + +%files object +%defattr(-,root,root,-) +%{_mandir}/man5/object-server.conf.5* +%{_mandir}/man1/swift-object-auditor.1* +%{_mandir}/man1/swift-object-info.1* +%{_mandir}/man1/swift-object-reconstructor.1* +%{_mandir}/man1/swift-object-replicator.1* +%{_mandir}/man1/swift-object-server.1* +%{_mandir}/man1/swift-object-updater.1* +%{_unitdir}/%{name}-object.service +%{_unitdir}/%{name}-object@.service +%{_unitdir}/%{name}-object-auditor.service +%{_unitdir}/%{name}-object-auditor@.service +%{_unitdir}/%{name}-object-replicator.service +%{_unitdir}/%{name}-object-replicator@.service +%{_unitdir}/%{name}-object-reconstructor.service +%{_unitdir}/%{name}-object-reconstructor@.service +%{_unitdir}/%{name}-object-updater.service +%{_unitdir}/%{name}-object-updater@.service +%dir %{_sysconfdir}/swift/object-server +%config(noreplace) %attr(640, swift, swift) %{_sysconfdir}/swift/object-server.conf +%dir %attr(0755, swift, root) %{_localstatedir}/run/swift/object-server +%{_bindir}/swift-object-auditor +%{_bindir}/swift-object-info +%{_bindir}/swift-object-replicator +%{_bindir}/swift-object-relinker +%{_bindir}/swift-object-server +%{_bindir}/swift-object-updater +%{_bindir}/swift-object-reconstructor + +%files proxy +%defattr(-,root,root,-) +%{_mandir}/man5/object-expirer.conf.5* +%{_mandir}/man5/proxy-server.conf.5* +%{_mandir}/man5/container-reconciler.conf.5* +%{_mandir}/man1/swift-container-reconciler.1* +%{_mandir}/man1/swift-object-expirer.1* +%{_mandir}/man1/swift-proxy-server.1* +%{_mandir}/man1/swift-reconciler-enqueue.1* +%{_mandir}/man1/swift-object-relinker.1* +%{_unitdir}/%{name}-container-reconciler.service +%{_unitdir}/%{name}-object-expirer.service +%{_unitdir}/%{name}-proxy.service +%dir %{_sysconfdir}/swift/proxy-server +%config(noreplace) %attr(640, root, swift) %{_sysconfdir}/swift/container-reconciler.conf +%config(noreplace) %attr(640, root, swift) %{_sysconfdir}/swift/proxy-server.conf +%config(noreplace) %attr(640, root, swift) %{_sysconfdir}/swift/object-expirer.conf +%dir %attr(0755, swift, root) %{_localstatedir}/run/swift/proxy-server +%{_bindir}/swift-container-reconciler +%{_bindir}/swift-object-expirer +%{_bindir}/swift-proxy-server + +%files common +%defattr(-,root,root,-) +%license LICENSE +%doc README.rst +%doc etc/*-sample +%{_mandir}/man5/dispersion.conf.5* +%{_mandir}/man1/swift-account-audit.1* +%{_mandir}/man1/swift-ring-builder-analyzer.1* +%{_mandir}/man1/swift-config.1* +%{_mandir}/man1/swift-dispersion-populate.1* +%{_mandir}/man1/swift-dispersion-report.1* +%{_mandir}/man1/swift-drive-audit.1* +%{_mandir}/man1/swift-form-signature.1* +%{_mandir}/man1/swift-get-nodes.1* +%{_mandir}/man1/swift-init.1* +%{_mandir}/man1/swift-oldies.1.* +%{_mandir}/man1/swift-orphans.1* +%{_mandir}/man1/swift-recon.1* +%{_mandir}/man1/swift-recon-cron.1* +%{_mandir}/man1/swift-ring-builder.1* +%{_mandir}/man1/swift-ring-composer.1* +%{_mandir}/man5/swift.conf.5* +%{_mandir}/man5/container-sync-realms.conf.5* +%{_tmpfilesdir}/openstack-swift.conf +%dir %attr(0755, swift, swift)%{_sysconfdir}/swift +%config(noreplace) %attr(640, root, swift) %{_sysconfdir}/swift/swift.conf +%config(noreplace) %{_sysconfdir}/rsyslog.d/openstack-swift.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-swift +%dir %{_localstatedir}/log/swift +%dir %attr(0755, swift, root) %{_localstatedir}/run/swift +%dir %attr(0755, swift, swift) %{_localstatedir}/cache/swift +%dir %attr(0755, swift, root) %{_sharedstatedir}/swift +%dir %{python3_sitelib}/swift +%{_bindir}/swift-account-audit +%{_bindir}/swift-config +%{_bindir}/swift-dispersion-populate +%{_bindir}/swift-dispersion-report +%{_bindir}/swift-drive-audit +%{_bindir}/swift-form-signature +%{_bindir}/swift-get-nodes +%{_bindir}/swift-init +%{_bindir}/swift-manage-shard-ranges +%{_bindir}/swift-oldies +%{_bindir}/swift-orphans +%{_bindir}/swift-recon +%{_bindir}/swift-recon-cron +%{_bindir}/swift-reconciler-enqueue +%{_bindir}/swift-ring-builder +%{_bindir}/swift-ring-builder-analyzer +%{_bindir}/swift-ring-composer + +%files -n python3-swift -f swift.lang +%defattr(-,root,root,-) +%license LICENSE +%{python3_sitelib}/swift +%{python3_sitelib}/swift-%{upstream_version}-py?.*.egg-info +%exclude %{python3_sitelib}/swift/test + +%files -n python3-swift-tests +%license LICENSE +%{python3_sitelib}/swift/test + +%if 0%{?with_doc} +%files doc +%defattr(-,root,root,-) +%doc doc/build/html +%license LICENSE +%endif + +%changelog +* Thu Apr 18 2024 Dongxing Wang - 2.31.1-1 +- Upgrade with version 2.31.1 to support OpenStack-Antelope + +* Thu Jun 16 2022 OpenStack_SIG - 2.29.1-1 +- Upgrade version for openstack yoga + +* Mon Aug 30 2021 wangixyuan - 2.27.0-5 +- Update swift service config file content. + +* Tue Aug 24 2021 wangxiyuan - 2.27.0-4 +- Nit Fix + +* Tue Aug 24 2021 wangxiyuan - 2.27.0-3 +- Correct rpm package structure + +* Sat Jul 31 2021 OpenStack_SIG - 2.27.0-2 +- Delete the epoch + +* Sat Jul 31 2021 OpenStack_SIG - 2.27.0-1 +- openEuler build release diff --git a/openstack-swift.tmpfs b/openstack-swift.tmpfs new file mode 100644 index 0000000000000000000000000000000000000000..27b7d503b1141751cffd51f20ca1d473801eae1b --- /dev/null +++ b/openstack-swift.tmpfs @@ -0,0 +1,6 @@ +# swift needs a couple of directories in /run +d /run/swift 0755 swift root +d /run/swift/account-server 0755 swift root +d /run/swift/container-server 0755 swift root +d /run/swift/object-server 0755 swift root +d /run/swift/proxy-server 0755 swift root diff --git a/proxy-server.conf b/proxy-server.conf new file mode 100644 index 0000000000000000000000000000000000000000..1085cab05607c5c7636b3e9adb93c6dcf0732b40 --- /dev/null +++ b/proxy-server.conf @@ -0,0 +1,70 @@ +[DEFAULT] +bind_port = 8080 +workers = 2 +user = swift +swift_dir = /etc/swift + +[pipeline:main] +pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk ratelimit authtoken keystoneauth container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-server + +[app:proxy-server] +use = egg:swift#proxy +account_autocreate = True + +[filter:catch_errors] +use = egg:swift#catch_errors + +[filter:gatekeeper] +use = egg:swift#gatekeeper + +[filter:healthcheck] +use = egg:swift#healthcheck + +[filter:proxy-logging] +use = egg:swift#proxy_logging + +[filter:cache] +use = egg:swift#memcache +memcache_servers = controller:11211 + +[filter:container_sync] +use = egg:swift#container_sync + +[filter:bulk] +use = egg:swift#bulk + +[filter:ratelimit] +use = egg:swift#ratelimit + +[filter:authtoken] +paste.filter_factory = keystonemiddleware.auth_token:filter_factory +www_authenticate_uri = http://controller:5000 +auth_url = http://controller:5000 +memcached_servers = controller:11211 +auth_type = password +project_domain_id = default +user_domain_id = default +project_name = service +username = swift +# 根据用户创建的keystoneswift用户,自行修改密码 +password = swift +delay_auth_decision = True + +[filter:keystoneauth] +use = egg:swift#keystoneauth +operator_roles = admin,user + +[filter:container-quotas] +use = egg:swift#container_quotas + +[filter:account-quotas] +use = egg:swift#account_quotas + +[filter:slo] +use = egg:swift#slo + +[filter:dlo] +use = egg:swift#dlo + +[filter:versioned_writes] +use = egg:swift#versioned_writes diff --git a/swift-2.31.1.tar.gz b/swift-2.31.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..54e45f9d8e8773b66ee4e2f678a7a2c9c523604c Binary files /dev/null and b/swift-2.31.1.tar.gz differ diff --git a/swift.conf b/swift.conf new file mode 100644 index 0000000000000000000000000000000000000000..e84efd61626e35d8aefe36ab928d60b7a30f6564 --- /dev/null +++ b/swift.conf @@ -0,0 +1,7 @@ +[swift-hash] +swift_hash_path_suffix = test-hash +swift_hash_path_prefix = test-hash + +[storage-policy:0] +name = Policy-0 +default = yes