[Openstack] Tutorials of how to install openstack swift into centos 6

Stefano Maffulli stefano at openstack.org
Thu Nov 10 16:32:45 UTC 2011


Hello pf

thanks for sending this. Did you write this down on a wiki page
somewhere, too? I fear that in the mailing list archive this won't get
the visibility it deserves.

Cheers,
stef

On Wed, 2011-11-09 at 17:00 +1100, pf shineyear wrote:
> openstack swift install on centos 6
> 
> 1. proxy install
> 
> 1) check your python version must >= 2.6
> 
> 2) yum install libvirt
> 
> 3) yum install memcached
> 
> 4) yum install xfsprogs
> 
> 5) yum install python-setuptools python-devel python-simplejson
> python-config
> 
> 6) easy_install webob
> 
> 7) easy_install eventlet
> 
> 8) install xattr-0.6.2.tar.gz, python setup.py build, python setup.py
> install
> 
> 9) install coverage-3.5.1.tar.gz, python setup.py build, python
> setup.py install
> 
> 10) wget "http://www.openstack.org/projects/storage/latest-release/"
>                  python setup.py build
>                  python setup.py install
> 
> 11) wget
> "https://github.com/downloads/gholt/swauth/swauth-lucid-build-1.0.2-1.tgz"
> python setup.py build
> python setup.py install
> 
> 12) mkdir /etc/swift
> 
> 13) yum install openssh-server
> 
> 14) yum install git-core
> 
> 15) vi /etc/swift/swift.conf
> 
> [swift-hash]
> # random unique string that can never change (DO NOT LOSE)
> swift_hash_path_suffix = `od -t x8 -N 8 -A n </dev/random`
> 
> 
> 16) goto /etc/swift/
> 
> 17) openssl req -new -x509 -nodes -out cert.crt -keyout cert.key
> 
> 18) service memcached restart, ps -aux | grep mem
> 
> 495      16954  0.0  0.1 330756   816 ?        Ssl  18:19   0:00
> memcached -d -p 11211 -u memcached -m 64 -c 1024
> -P /var/run/memcached/memcached.pid
> 
> 19) easy_install netifaces
> 
> 20) vi /etc/swift/proxy-server.conf
> 
> [DEFAULT]
> cert_file = /etc/swift/cert.crt
> key_file = /etc/swift/cert.key
> bind_port = 8080
> workers = 8
> user = swift
> log_facility = LOG_LOCAL0
> allow_account_management = true
> 
> [pipeline:main]
> pipeline = healthcheck cache swauth proxy-server
> 
> [app:proxy-server]
> use = egg:swift#proxy
> allow_account_management = true
> account_autocreate = true
> log_facility = LOG_LOCAL0
> log_headers = true
> log_level =DEBUG
> 
> [filter:swauth]
> use = egg:swauth#swauth
> #use = egg:swift#swauth
> default_swift_cluster = local#https://10.38.10.127:8080/v1
> # Highly recommended to change this key to something else!
> super_admin_key = swauthkey
> log_facility = LOG_LOCAL1
> log_headers = true
> log_level =DEBUG
> allow_account_management = true
> 
> [filter:healthcheck]
> use = egg:swift#healthcheck
> 
> [filter:cache]
> use = egg:swift#memcache
> memcache_servers = 10.38.10.127:11211
> 
> 
> 21) config /etc/rsyslog.conf
> 
> local0.*                        /var/log/swift/proxy.log
> local1.*                        /var/log/swift/swauth.log
> 
> 
> 
> 
> 
> 21) build the ring, i have 3 node, 1 proxy
> 
>  swift-ring-builder account.builder create 18 3 1
>  swift-ring-builder account.builder add z1-10.38.10.109:6002/sdb1 1
>  swift-ring-builder account.builder add z2-10.38.10.119:6002/sdb1 1
>  swift-ring-builder account.builder add z3-10.38.10.114:6002/sdb1 1
>  swift-ring-builder object.builder rebalance
> 
>  swift-ring-builder account.builder rebalance
>  swift-ring-builder object.builder create 18 3 1
>  swift-ring-builder object.builder add z1-10.38.10.109:6000/sdb1 1
>  swift-ring-builder object.builder add z2-10.38.10.119:6000/sdb1 1
>  swift-ring-builder object.builder add z3-10.38.10.114:6000/sdb1 1
>  swift-ring-builder object.builder rebalance
> 
>  swift-ring-builder container.builder create 18 3 1
>  swift-ring-builder container.builder add z1-10.38.10.109:6001/sdb1 1
>  swift-ring-builder container.builder add z2-10.38.10.119:6001/sdb1 1
>  swift-ring-builder container.builder add z3-10.38.10.114:6001/sdb1 1
>  swift-ring-builder container.builder rebalance
> 
> 
> 22) easy_install configobj
> 
> 23) easy_install nose
> 
> 24) easy_install simplejson
> 
> 25) easy_install xattr
> 
> 26) easy_install eventlet
> 
> 27) easy_install greenlet
> 
> 28) easy_install pastedeploy
> 
> 29) groupadd swift
> 
> 30) useradd -g swift swift
> 
> 31) chown -R swift:swift /etc/swift/
> 
> 32) service rsyslog restart
> 
> 33) swift-init proxy start
> 
> 
> 2. storage node install
> 
> 1) yum install python-setuptools python-devel python-simplejson
> python-configobj python-nose
> 
> 2) yum install openssh-server
> 
> 3) easy_install webob
> 
> 4) yum install curl gcc memcached sqlite xfsprogs
> 
> 
> 
> 5) easy_install eventlet
> 
> 
> 6) wget
> "http://pypi.python.org/packages/source/x/xattr/xattr-0.6.2.tar.gz#md5=5fc899150d03c082558455483fc0f89f"
> 
> 
>  python setup.py build
> 
>  python setup.py install
> 
> 
> 
> 7)  wget
> "http://pypi.python.org/packages/source/c/coverage/coverage-3.5.1.tar.gz#md5=410d4c8155a4dab222f2bc51212d4a24"
> 
> 
>  python setup.py build
> 
>  python setup.py install
> 
> 
> 8) yum install libvirt
> 
> 
> 9) groupadd swift
> 
> 
> 10) useradd -g swift swift
> 
> 
> 11) mkdir -p /etc/swift
> 
> 
> 12) chown -R swift:swift /etc/swift/
> 
> 
> 13) cp swift.conf account.ring.gz container.ring.gz
> object.ring.gz /etc/swift/  (scp from proxy server)
> 
> 
> 14) yum install xfsprogs
> 
> 
> 15) wget "http://www.openstack.org/projects/storage/latest-release/"
> 
> 
> python setup.py build
> 
> 
> python setup.py install
> 
> 
> 16) vi /etc/rsyncd.conf
> 
> 
> # rsyncd.conf
> 
> secrets file = /etc/rsyncd.secrets
> 
> #motd file = /etc/rsyncd.motd
> 
> #read only = yes
> 
> #list = yes
> 
> uid = root
> 
> gid = root
> 
> use chroot = no
> 
> max connections = 5
> 
> log file = /var/log/rsyncd.log
> 
> pid file = /var/run/rsyncd.pid
> 
> lock file = /var/run/rsync.lock
> 
> 
> 
> [domain]
> 
> comment = welcome
> 
> path = /var/www/domain/
> 
> auth users = root
> 
> hosts allow = 10.38.10.114, 127.0.0.1, 10.38.10.119, 10.38.10.109,
> 10.38.10.122
> 
> hosts deny = *
> 
> list = true
> 
> read only = no
> 
> 
> 
> [account]
> 
> max connections = 2
> 
> path = /home/swift/
> 
> read only = false
> 
> lock file = /var/lock/account.lock
> 
> 
> [container]
> 
> max connections = 2
> 
> path = /home/swift/
> 
> read only = false
> 
> lock file = /var/lock/container.lock
> 
> 
> [object]
> 
> max connections = 2
> 
> path = /home/swift/
> 
> read only = false
> 
> lock file = /var/lock/object.lock
> 
> 
> 
> 
> 17) rsync --daemon
> 
> 18) vi /etc/swift/account-server.conf
> 
> [DEFAULT]
> bind_ip = 10.38.10.109
> workers = 2
> mount_check = false
> bind_port = 6002
> log_facility = LOG_LOCAL0
> devices = /srv/1/node
> 
> 
> 
> [pipeline:main]
> pipeline = account-server
> 
> [app:account-server]
> use = egg:swift#account
> 
> [account-replicator]
> log_name = account-replicator
> log_facility = LOG_LOCAL1
> 
> [account-auditor]
> log_name = account-auditor
> log_facility = LOG_LOCAL1
> 
> [account-reaper]
> log_facility = LOG_LOCAL1
> 
> 
> 
> 
> 19) vi /etc/swift/container-server.conf
> 
> [DEFAULT]
> bind_ip = 10.38.10.109
> workers = 2
> mount_check = false
> bind_port = 6001
> log_facility = LOG_LOCAL0
> devices = /srv/1/node
> 
> 
> 
> 
> [pipeline:main]
> pipeline = container-server
> 
> [app:container-server]
> use = egg:swift#container
> 
> [container-replicator]
> 
> [container-updater]
> 
> [container-auditor]
> 
> [container-sync]
> 
> 
> 
> 20) vi /etc/swift/object-server.conf
> 
> [DEFAULT]
> bind_ip = 10.38.10.109
> workers = 2
> mount_check = false
> bind_port = 6000
> log_facility = LOG_LOCAL0
> devices = /srv/1/node
> 
> 
> [pipeline:main]
> pipeline = object-server
> 
> [app:object-server]
> use = egg:swift#object
> 
> [object-replicator]
> 
> [object-updater]
> 
> [object-auditor]
> 
> 
> 
> 21) yum install python-setuptools
> 
> 22) esay_install netifaces
> 
> 23) easy_install pastedeploy
> 
> 24) vi /etc/rsyslog.conf
> 
> local0.*                        /var/log/swift/account.log
> local1.*                        /var/log/swift/account-rest.log
> 
> 
> 25) mkdir /srv
> 
> 26) dd if=/dev/zero of=/srv/swift-disk bs=1024 count=0 seek=1000000
> 
> 27) mkfs.xfs -i size=1024 /srv/swift-disk
> 
> 28) vi /etc/fstab
> 
> /srv/swift-disk /mnt/sdb1 xfs
> loop,noatime,nodiratime,nobarrier,logbufs=8 0 0
> 
> 29) mkdir /mnt/sdb1
> 
> 30) mount /mnt/sdb1
> 
> 31) mkdir /mnt/sdb1/1
> 
> 32) chown swift:swift /mnt/sdb1/*
> 
> 33) ln -s /mnt/sdb1/1 /srv/1
> 
> 34) mkdir
> -p /etc/swift/object-server /etc/swift/container-server /etc/swift/account-server /srv/1/node/sdb1 /var/run/swift
> 
> 35) chown -R swift:swift /etc/swift /srv/1/ /var/run/swift
> 
> 36) swift-init all start
> 
> 
> 
> 
> 
> 
> 
> 3. test
> 
> swauth-prep -A https://10.38.10.127:8080/auth/ -K swauthkey
> 
> 
> refer:
> 
> http://swift.openstack.org/development_saio.html
> 
> http://swift.openstack.org/howto_installmultinode.html
> 
> 
> http://www.openstack.org.cn/bbs/forum.php?mod=viewthread&tid=264
> 
> 
> https://answers.launchpad.net/swift/+question/162957
> 
> 
> http://www.vpsee.com/2011/08/install-openstack-nova-on-centos/
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp






More information about the Openstack mailing list