The following steps are performed on the controller node
1, remote access to/etc/swift/swift.conf files:
Https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/newton
2. Modify the/etc/swift/swift.conf configuration file:
[Swift-hash]...swift_hash_path_suffix = Hash_path_suffixswift_hash_path_prefix = Hash_path_prefix
[Storage-policy:0]name = Policy-0default = yes
Note: storage-policy:0 This configuration item retains only the above lines, the other comments are dropped
3. Copy the/etc/swift/swift.conf file from the controller node to each swift node and execute the following command on each swift node:
Chown-r Root:swift/etc/swift
4. Start the service:
The Controller node executes:
Enable Openstack-swift-proxy.service Memcached.service# systemctl Start Openstack-swift-proxy.service Memcached.service
Execute on Swift node:
SystemctlEnable Openstack-swift-account.service Openstack-swift-account-auditor.serviceOpenstack-swift-account-reaper.service Openstack-swift-account-replicator.serviceSystemctl Start Openstack-swift-account.service Openstack-swift-account-auditor.serviceOpenstack-swift-account-reaper.service Openstack-swift-account-replicator.serviceSystemctlEnable Openstack-swift-container.serviceopenstack-swift-container-auditor.service Openstack-swift-container-replicator.service openstack-swift-container-updater.service systemctl start openstack-swift-container.service Openstack-swift-container-auditor.service openstack-swift-container-replicator.service Openstack-swift-container-updater.servicesystemctl enable Openstack-swift-object.service openstack-swift-object-auditor.service systemctl start Openstack-swift-object.service openstack-swift-object-auditor.service
Installation verification:
Assign permissions to nodes first Chcon-r System_u:object_r:swift_data_t:s0/srv/node
The controller node then executes the source/root/demo-openrc.sh, initializing the associated environment variable
Then execute the SWIFT Stat command to see if the information is relevant
Perform OpenStack container create Container1 to see if you can create a directory, and if it fails, you can view the log on the Swift node.
If you are prompted to say that you do not have permission, execute the restorecon-r/srv/node command on the SWIFT node and then restart the service
OpenStack Swift Node Installation manual 3-final installation configuration and verification