-----------------------Controller:---------------------------------
SOURCE admin-openrc.sh
Keystone User-create--name=swift--pass=000000 [email protected]
Keystone User-role-add--user=swift--tenant=service--role=admin
Keystone Role-create--name=swiftoperator
Keystone User-role-add--user=swift--tenant=service--role=swiftoperator
Keystone Service-create--name=swift--type=object-store--description= "OpenStack object Storage"
Keystone Endpoint-create--service-id=$ (Keystone Service-list | awk '/object-store/{print $} ') \
--publicurl= "http://controller:8080/v2/AUTH_% (tenant_id) S" \
--internalurl= "http:/controller:8080/v2/auth_% (tenant_id) S" \
--adminurl= "http://controller:8080/v2/AUTH_% (tenant_id) S"
-----------------------Controller & COMPUTE:---------------------------------
Mkdir-p/etc/swift
echo "[Swift-hash]" >>/etc/swift/swift.conf
echo "Swift_hash_path_suffix = Flibertygibbitz" >>/etc/swift/swift.conf
-----------------------Compute:---------------------------------
Yum-y Install Openstack-swift openstack-swift-account openstack-swift-container openstack-swift-object xfsprogs XINETD rsync
Cat/pro/part
(Here for Sda6, according to their own situation)
Mkfs.xfs-i size=1024-f/dev/sda6
echo "/dev/sda6/srv/node xfs noatime,nodiratime,nobarrier,logbufs=8 0 0" >>/etc/fstab
Mkdir-p/srv/node
Mount/dev/sda6/srv/node
Chown-r Swift:swift/srv/node
Vi/etc/rsyncd.conf
UID = Swift
GID = Swift
Log file =/var/log/rsyncd.log
PID file =/var/run/rsyncd.pid
Address = 127.0.0.1
[Account]
Max connections = 2
Path =/srv/node
Read Only = False
Lock file =/var/lock/account.lock
[Container]
Max connections = 2
Path =/srv/node
Read Only = False
Lock file =/var/lock/container.lock
[Object]
Max connections = 2
Path =/srv/node
Read Only = False
Lock file =/var/lock/object.lock
Vi/etc/xinetd.d/rsync
Disable = no
Flags = IPV4
Service xinetd Start
Chkconfig xinetd on
Mkdir-p/var/swift/recon
Chown-r Swift:swift/var/swift/recon
-----------------------Controller:---------------------------------
Yum Install openstack-swift-proxy memcached python-swiftclient
Openstack-config--set/etc/swift/proxy-server.conf DEFAULT bind_port 8080
Openstack-config--set/etc/swift/proxy-server.conf DEFAULT Workers 8
Openstack-config--set/etc/swift/proxy-server.conf DEFAULT User Swift
Openstack-config--set/etc/swift/proxy-server.conf DEFAULT Log_name Proxy
Openstack-config--set/etc/swift/proxy-server.conf DEFAULT log_level DEBUG
Openstack-config--set/etc/swift/proxy-server.conf DEFAULT log_facility log_local0
Openstack-config--set/etc/swift/proxy-server.conf Pipeline:main Pipeline healthcheck\ cache\ authtoken\ keystone\ Proxy-server
Openstack-config--set/etc/swift/proxy-server.conf app:proxy-server Use Egg:swift#proxy
Openstack-config--set/etc/swift/proxy-server.conf App:proxy-server allow_account_management True
Openstack-config--set/etc/swift/proxy-server.conf App:proxy-server account_autocreate True
Openstack-config--set/etc/swift/proxy-server.conf Filter:cache Use Egg:swift#memcache
Openstack-config--set/etc/swift/proxy-server.conf Filter:cache memcache_servers 127.0.0.1:11211
Openstack-config--set/etc/swift/proxy-server.conf filter:catch_errors Use egg:swift#catch_errors
Openstack-config--set/etc/swift/proxy-server.conf Filter:healthcheck Use Egg:swift#healthcheck
Openstack-config--set/etc/swift/proxy-server.conf Filter:keystone Use Egg:swift#keystoneauth
Openstack-config--set/etc/swift/proxy-server.conf filter:keystone operator_roles admin,\ SwiftOperator,\ _member_
Openstack-config--set/etc/swift/proxy-server.conf Filter:keystone is_admin True
Openstack-config--set/etc/swift/proxy-server.conf Filter:keystone Cache Swift.cache
Openstack-config--set/etc/swift/proxy-server.conf Filter:authtoken paste.filter_factory Keystoneclient.middleware.auth_token:filter_factory
Openstack-config--set/etc/swift/proxy-server.conf Filter:authtoken Signing_dir/tmp/keystone-signing-swift
Openstack-config--set/etc/swift/proxy-server.conf Filter:authtoken Auth_protocol http
Openstack-config--set/etc/swift/proxy-server.conf Filter:authtoken auth_host Controller
Openstack-config--set/etc/swift/proxy-server.conf Filter:authtoken Auth_port 35357
Openstack-config--set/etc/swift/proxy-server.conf filter:authtoken admin_tenant_name Service
Openstack-config--set/etc/swift/proxy-server.conf Filter:authtoken Admin_user Swift
Openstack-config--set/etc/swift/proxy-server.conf Filter:authtoken Admin_password 000000
Cd/etc/swift
Swift-ring-builder Account.builder Create 18 3 1
Swift-ring-builder Container.builder Create 18 3 1
Swift-ring-builder Object.builder Create 18 3 1
Swift-ring-builder account.builder Add Z1-192.168.100.20:6002r192.168.100.20:6005/sda6 100
Swift-ring-builder container.builder Add Z1-192.168.100.20:6001r192.168.100.20:6004/sda6 100
Swift-ring-builder object.builder Add Z1-192.168.100.20:6000r192.168.100.20:6003/sda6 100
Swift-ring-builder Account.builder
Swift-ring-builder Container.builder
Swift-ring-builder Object.builder
Swift-ring-builder Account.builder Rebalance
Swift-ring-builder Container.builder Rebalance
Swift-ring-builder Object.builder Rebalance
Copy the account.ring.gz, container.ring.gz, and object.ring.gz files from the/etc/swift to the storage (compute) node/etc/swift/:
[email protected] swift]# CP *.gz/var/ftp
COMPUTE:
Yum Install FTP
cd/etc/swift/
FTP Controller
Name (controller:root): Anonymous
Password:
Ftp> ls
Ftp> Get account.ring.gz
Ftp> Get container.ring.gz
Ftp> Get object.ring.gz
Ftp> bye
Controller:
Chown-r Swift:swift/etc/swift
Service Openstack-swift-proxy Start
Chkconfig Openstack-swift-proxy on
-----------------------Compute:---------------------------------
Sed-i ' s/^bind_ip.*/#bind_ip =/g '/etc/swift/account-server.conf
Sed-i ' s/^bind_ip.*/#bind_ip =/g '/etc/swift/container-server.conf
Sed-i ' s/^bind_ip.*/#bind_ip =/g '/etc/swift/object-server.conf
Mv/etc/swift/account-server.conf/etc/swift/account-server/1.conf
Mv/etc/swift/container-server.conf/etc/swift/container-server/1.conf
Mv/etc/swift/object-server.conf/etc/swift/object-server/1.conf
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT Bind_port 6002
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT Workers 2
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT User Swift
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT devices/srv/node/
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT Mount_check false
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT log_name swift-account
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT log_facility log_local1
Openstack-config--set/etc/swift/account-server/1.conf DEFAULT log_level DEBUG
Openstack-config--set/etc/swift/account-server/1.conf account-replicator Vm_test_mode No
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT Bind_port 6001
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT Workers 2
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT User Swift
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT devices/srv/node/
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT Mount_check false
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT log_name Swift-container
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT log_facility log_local1
Openstack-config--set/etc/swift/container-server/1.conf DEFAULT log_level DEBUG
Openstack-config--set/etc/swift/container-server/1.conf account-replicator Vm_test_mode No
Openstack-config--set/etc/swift/object-server/1.conf DEFAULT Bind_port 6000
Openstack-config--set/etc/swift/object-server/1.conf DEFAULT Workers 2
Openstack-config--set/etc/swift/object-server/1.conf DEFAULT User Swift
Openstack-config--set/etc/swift/object-server/1.conf DEFAULT devices/srv/node/
Openstack-config--set/etc/swift/object-server/1.conf DEFAULT Mount_check false
Openstack-config--set/etc/swift/object-server/1.conf DEFAULT log_name swift-object
Openstack-config--set/etc/swift/object-server/1.conf account-replicator Vm_test_mode No
echo "local1.*/var/log/swift/storage1.log" >>/etc/rsyslog.d/10-swift.conf
Mkdir-p/var/log/swift
Chown-r Swift:swift/var/log/swift
Service Rsyslog Restart
Chown-r Swift:swift/var/swift
Chown-r Swift:swift/var/cache/swift
Swift-init object-server Start
Swift-init Object-replicator Start
Swift-init Object-updater Start
Swift-init Object-auditor Start
Swift-init container-server Start
Swift-init Container-replicator Start
Swift-init Container-updater Start
Swift-init Container-auditor Start
Swift-init account-server Start
Swift-init Account-replicator Start
Swift-init Account-auditor Start
Vi/etc/rc.local
/usr/bin/swift-init object-server Start
/usr/bin/swift-init Object-replicator Start
/usr/bin/swift-init Object-updater Start
/usr/bin/swift-init Object-auditor Start
/usr/bin/swift-init container-server Start
/usr/bin/swift-init Container-replicator Start
/usr/bin/swift-init Container-updater Start
/usr/bin/swift-init Container-auditor Start
/usr/bin/swift-init account-server Start
/usr/bin/swift-init Account-replicator Start
/usr/bin/swift-init Account-auditor Start
When the Web interface refreshes, you can see
One more storage.
This can be provided for Java EE Android development to do storage
Here, OpenStack's IaaS is basically the case.
If there are many friends or any technical exchange, you can exchange a bit.
This article is from the "Jasmine Love Study" blog, please be sure to keep this source http://molilinzi.blog.51cto.com/8282931/1657740
Remember the Cloud test experiment-openstack-icehouse-Install Swift