Configuring Account Server
Container Servers contain Object Servers seen in our OpenStack storage environment. The configuration of this is similar to configuring Account Server. Account Server lists the available containers on our node. As we are creating a setup where we have four virtual devices available under the one hood, each having their own list of available containers, but running on different ports. These represent the rsync account numbers seen previously, for example, port 6012 is represented by [account6012] within rsync.
Assure that you are logged in to your swift virtual machine. To accomplish this, run:
vagrant ssh swift
How to achieve it…
In this section, we’re creating four different Account Server configuration files that differ only in the port that the service will run on and the path on our single disk that corresponds to that service on that particular port.
- We begin by creating an initial Account Server configuration file for our first node. Edit /etc/swift/account-server/1.conf with the following contents:
devices = /srv/1/node mount_check = false bind_port = 6012
user = swift
log_facility = LOG_LOCAL2
pipeline = account-server
[app: account-server] use = egg:swift#account
[account-replicator] vm_test_mode = yes
- We then use this file to create the remaining three virtual nodes, each with their appropriate unique values as follows:
sed -e “s/srv\/1/srv\/2/” -e “s/601/602/” -e “s/LOG_LOCAL2/LOG_LOCAL3/” 1.conf | sudo tee -a 2.conf
sed -e “s/srv\/1/srv\/3/” -e “s/601/603/” -e “s/LOG_LOCAL2/LOG_LOCAL4/” 1.conf | sudo tee -a 3.conf
sed -e “s/srv\/1/srv\/4/” -e “s/601/604/” -e “s/LOG_LOCAL2/LOG_LOCAL5/” 1.conf | sudo tee -a 4.conf
How it works…
What we have accomplished is to create the first Account Server device node, which we named 1. conf, under the /etc/swift/swift-account directory. This defines our Account Server for node 1, which will run on port 6012.
We then took this file and made the subsequent Account Servers run on their respective ports, with a search and replace, using sed.
We ended up with four files, under our swift-account configuration directory, which defined the following services:
account-server 1: Port 6012, device /srv/1/node, Log Level LOCAL2 account-server 2: Port 6022, device /srv/2/node, Log Level LOCAL3 account-server 3: Port 6032, device /srv/3/node, Log Level LOCAL4 account-server 4: Port 6042, device /srv/4/node, Log Level LOCAL5
Enroll for Instructor Led Live OpenStack Training