SlideShare uma empresa Scribd logo
1 de 30
OpenStack Storage Tutorial:Installing Swift-All-In-One
Me: 			Joshua McKenty Twitter: 	@jmckenty Email: 		joshua@piston.cc Former Chief Architect, NASA Nebula Founding Member, OpenStack OpenStack Project Policy Board
> curl http://www.openstack.org
SWIFT – What it is, in one slide
Today’s Menu One Virtual Machine Four Swift Nodes Loopback device for storage Self-signed SSL Certificate
Before we begin… VMWare Fusion https://www.vmware.com/tryvmware/?p=vmware-fusion31&lp=1 Ubuntu Disk Image http://releases.ubuntu.com/lucid/ubuntu-10.04.2-server-amd64.iso Swift Administrator’s Guide http://docs.openstack.org/cactus/openstack-compute/admin/os-compute-adminguide-cactus.pdf Cyberduck (for testing) http://cyberduck.ch/Cyberduck-4.0.2.zip
Step One:
Step Two: Get Remote <log in> sudosu – apt-get install –y openssh-server ifconfig #get your ip address <ssh to this ip>
Step Three: Apt Packages sudosu - apt-get -y install python-software-properties add-apt-repository ppa:swift-core/ppa apt-get update apt-get -y install curl gccbzrmemcached python-configobj python-coverage python-dev python-nose python-setuptools python-simplejson python-xattr sqlite3 xfsprogs python-webob python-eventlet python-greenlet python-pastedeploy python-netifaces screen vim
Step Four: Storage Environment adduserswiftdemo adduserswiftdemoadmin mkdir/srv dd if=/dev/zero of=/srv/swift-disk bs=1024 count=0 seek=1000000 mkfs.xfs -i size=1024 /srv/swift-disk echo "/srv/swift-disk /mnt/sdb1 xfsloop,noatime,nodiratime,nobarrier,logbufs=8 0 0" >> /etc/fstab mkdir /mnt/sdb1 mount /mnt/sdb1 mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4 chown -R swiftdemo:swiftdemo /mnt/sdb1 for x in {1..4}; do ln -s /mnt/sdb1/$x /srv/$x; done mkdir -p /etc/swift/object-server /etc/swift/container-server /etc/swift/account-server  mkdir -p /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4  mkdir -p /var/run/swift chown -R swiftdemo:swiftdemo /etc/swift /mnt/sdb1 /srv/[1-4]/ /var/run/swift sed -e "s/exit 0/mkdir varrunswiftchownswiftdemo:swiftdemo varrunswiftexit 0/g" /etc/rc.local -i
Step Five: RSYNC cat << EOF > /etc/rsyncd.conf uid = swiftdemo gid = swiftdemo log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid address = 127.0.0.1 EOF
Step Five: RSYNC cat << EOF >> /etc/rsyncd.conf [account6012] max connections = 25 path = /srv/1/node/ read only = false lock file = /var/lock/account6012.lock [account6022] max connections = 25 path = /srv/2/node/ read only = false lock file = /var/lock/account6022.lock [account6032] max connections = 25 path = /srv/3/node/ read only = false lock file = /var/lock/account6032.lock [account6042] max connections = 25 path = /srv/4/node/ read only = false lock file = /var/lock/account6042.lock EOF
Step Five: RSYNC cat << EOF >> /etc/rsyncd.conf [container6011] max connections = 25 path = /srv/1/node/ read only = false lock file = /var/lock/container6011.lock [container6021] max connections = 25 path = /srv/2/node/ read only = false lock file = /var/lock/container6021.lock [container6031] max connections = 25 path = /srv/3/node/ read only = false lock file = /var/lock/container6031.lock [container6041] max connections = 25 path = /srv/4/node/ read only = false lock file = /var/lock/container6041.lock EOF
Step Five: RSYNC cat << EOF >> /etc/rsyncd.conf [object6010] max connections = 25 path = /srv/1/node/ read only = false lock file = /var/lock/object6010.lock [object6020] max connections = 25 path = /srv/2/node/ read only = false lock file = /var/lock/object6020.lock [object6030] max connections = 25 path = /srv/3/node/ read only = false lock file = /var/lock/object6030.lock [object6040] max connections = 25 path = /srv/4/node/ read only = false lock file = /var/lock/object6040.lock EOF sed -e "s/RSYNC_ENABLE=false/RSYNC_ENABLE=true/g" /etc/default/rsync  -i
Step Six: Install Swift su– swiftdemo mkdir ~/bin bzrinit-repo swift cd ~/swift; bzr branch lp:swift trunk cd ~/swift/trunk; sudo python setup.py develop cat << EOF >> ~/.bashrc export SWIFT_TEST_CONFIG_FILE=/etc/swift/func_test.conf export PATH=${PATH}:~/bin EOF . ~/.bashrc
Step Seven: SSL Certificates cd /etc/swift opensslreq -new -x509 -nodes -out cert.crt -keyoutcert.key # USE IP for COMMON NAME
Step Eight: Configurations sudosu- export SWIFT_IP=172.16.81.129 cat << EOF >> /etc/swift/proxy-server.conf [DEFAULT] bind_port = 443 bind_ip = $SWIFT_IP cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key user = swiftdemo log_facility = LOG_LOCAL1 [pipeline:main] pipeline = healthcheck cache swauth proxy-server [app:proxy-server] use = egg:swift#proxy allow_account_management = true [filter:swauth] use = egg:swift#swauth super_admin_key= swauthkey default_swift_cluster = local#https://$SWIFT_IP:443/v1 [filter:healthcheck] use = egg:swift#healthcheck [filter:cache] use = egg:swift#memcache EOF
Step Eight: Configurations cat << EOF >> /etc/swift/swift.conf [swift-hash] # random unique string that can never change (DO NOT LOSE) swift_hash_path_suffix = msst-swift-tutorial EOF
Step Eight: Account Server Configs cd /etc/swift/account-server cat << EOF > 1.conf [DEFAULT] devices = /srv/1/node mount_check = false bind_port = 6012 user = swiftdemo log_facility = LOG_LOCAL2 [pipeline:main] pipeline = account-server [app:account-server] use = egg:swift#account [account-replicator] vm_test_mode = yes [account-auditor] [account-reaper] EOF sed -e "s/srv1/srv2/" -e "s/6012/6022/" -e "s/LOG_LOCAL2/LOG_LOCAL3/" 1.conf > 2.conf sed -e "s/srv1/srv3/" -e "s/6012/6032/" -e "s/LOG_LOCAL2/LOG_LOCAL4/"  1.conf > 3.conf sed -e "s/srv1/srv4/" -e "s/6012/6042/" -e "s/LOG_LOCAL2/LOG_LOCAL5/"  1.conf > 4.conf
Step Eight: Container Server Configs cd /etc/swift/container-server cat << EOF > 1.conf [DEFAULT] devices = /srv/1/node mount_check = false bind_port = 6011 user = swiftdemo log_facility = LOG_LOCAL2 [pipeline:main] pipeline = container-server [app:container-server] use = egg:swift#container [container-replicator] vm_test_mode = yes [container-updater] [container-auditor] EOF sed -e "s/srv1/srv2/" -e "s/601/602/" -e "s/LOG_LOCAL2/LOG_LOCAL3/" 1.conf > 2.conf sed -e "s/srv1/srv3/" -e "s/601/603/" -e "s/LOG_LOCAL2/LOG_LOCAL4/"  1.conf > 3.conf sed -e "s/srv1/srv4/" -e "s/601/604/" -e "s/LOG_LOCAL2/LOG_LOCAL5/"  1.conf > 4.conf
Step Eight: Object Server Configs cd /etc/swift/object-server cat << EOF > 1.conf [DEFAULT] devices = /srv/1/node mount_check = false bind_port = 6010 user = swiftdemo log_facility = LOG_LOCAL2 [pipeline:main] pipeline = object-server [app:object-server] use = egg:swift#object [object-replicator] vm_test_mode = yes [object-updater] [object-auditor] EOF sed -e "s/srv1/srv2/" -e "s/601/602/" -e "s/LOG_LOCAL2/LOG_LOCAL3/" 1.conf > 2.conf sed -e "s/srv1/srv3/" -e "s/601/603/" -e "s/LOG_LOCAL2/LOG_LOCAL4/"  1.conf > 3.conf sed -e "s/srv1/srv4/" -e "s/601/604/" -e "s/LOG_LOCAL2/LOG_LOCAL5/"  1.conf > 4.conf
Step Nine: Binaries su - swiftdemo cat << EOF > ~/bin/resetswift #!/bin/bash swift-init all stop # find /var/log/swift -type f -exec rm -f {}  sudoumount /mnt/sdb1 sudomkfs.xfs -f -i size=1024 /srv/swift-disk sudo mount /mnt/sdb1 sudomkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4 sudochownswiftdemo:swiftdemo /mnt/sdb1/* mkdir -p /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4 sudochownswiftdemo:swiftdemo /mnt/sdb1/* sudorm -f /var/log/debug /var/log/messages /var/log/rsyncd.log /var/log/syslog sudo service rsyslog restart sudo service memcached restart EOF
Step Nine: Binaries export SWIFT_IP=172.16.81.129 cat << EOF > ~/bin/remakerings #!/bin/bash cd /etc/swift rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz swift-ring-builder object.builder create 18 3 1 swift-ring-builder object.builder add z1-$SWIFT_IP:6010/sdb1 1 swift-ring-builder object.builder add z2-$SWIFT_IP:6020/sdb2 1 swift-ring-builder object.builder add z3-$SWIFT_IP:6030/sdb3 1 swift-ring-builder object.builder add z4-$SWIFT_IP:6040/sdb4 1 swift-ring-builder object.builder rebalance swift-ring-builder container.builder create 18 3 1 swift-ring-builder container.builder add z1-$SWIFT_IP:6011/sdb1 1 swift-ring-builder container.builder add z2-$SWIFT_IP:6021/sdb2 1 swift-ring-builder container.builder add z3-$SWIFT_IP:6031/sdb3 1 swift-ring-builder container.builder add z4-$SWIFT_IP:6041/sdb4 1 swift-ring-builder container.builder rebalance swift-ring-builder account.builder create 18 3 1 swift-ring-builder account.builder add z1-$SWIFT_IP:6012/sdb1 1 swift-ring-builder account.builder add z2-$SWIFT_IP:6022/sdb2 1 swift-ring-builder account.builder add z3-$SWIFT_IP:6032/sdb3 1 swift-ring-builder account.builder add z4-$SWIFT_IP:6042/sdb4 1 swift-ring-builder account.builder rebalance EOF
Step Nine: Binaries cat << EOF > ~/bin/startmain #!/bin/bash swift-init main start EOF cat << EOF > ~/bin/recreateaccounts #!/bin/bash # Replace swauthkey with whatever your super_admin key is (recorded in # /etc/swift/proxy-server.conf). swauth-prep -K swauthkey -A https://$SWIFT_IP:443/auth/ swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ -a test tester testing swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ -a test2 tester2 testing2 swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ test tester3 testing3 swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ -a -r reseller reseller reseller EOF
Step Nine: Binaries cat << EOF > ~/bin/startrest #!/bin/bash swift-init rest start EOF chmod +x ~/bin/*
Step Ten: Running It . ~/.bashrc remakerings cd ~/swift/trunk; ./.unittests sudo bin/startmain recreateaccounts
Fire up Cyberduck! defaults write ch.sudo.cyberduckcf.authentication.context /auth/v1.0
Questions and Answers
Me: Joshua McKenty Twitter: @jmckenty Email: joshua@piston.cc Cell: 650-283-6846

Mais conteúdo relacionado

Mais procurados

Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册
Yiwei Ma
 
Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册
Yiwei Ma
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
Yiwei Ma
 
ByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalivedByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalived
redhat9
 
Openstack kilo installation using rdo
Openstack kilo installation using rdoOpenstack kilo installation using rdo
Openstack kilo installation using rdo
Narasimha sreeram
 

Mais procurados (20)

Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册
 
Zookeper
ZookeperZookeper
Zookeper
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloud
 
使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppet
 
Docker 基本概念與指令操作
Docker  基本概念與指令操作Docker  基本概念與指令操作
Docker 基本概念與指令操作
 
Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 
Install and Configure Ubuntu for Hadoop Installation for beginners
Install and Configure Ubuntu for Hadoop Installation for beginners Install and Configure Ubuntu for Hadoop Installation for beginners
Install and Configure Ubuntu for Hadoop Installation for beginners
 
ByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalivedByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalived
 
[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
My name is Trinidad
My name is TrinidadMy name is Trinidad
My name is Trinidad
 
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
 
Solaris_quickref.pdf
Solaris_quickref.pdfSolaris_quickref.pdf
Solaris_quickref.pdf
 
Network
NetworkNetwork
Network
 
Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編
 
Openstack kilo installation using rdo
Openstack kilo installation using rdoOpenstack kilo installation using rdo
Openstack kilo installation using rdo
 
Source Code of Building Linux IPv6 DNS Server (Complete Sourcecode)
Source Code of Building Linux IPv6 DNS Server (Complete Sourcecode)Source Code of Building Linux IPv6 DNS Server (Complete Sourcecode)
Source Code of Building Linux IPv6 DNS Server (Complete Sourcecode)
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
 

Destaque

Destaque (7)

Community - Software Defined Storage. Non Solo VSAN.
Community - Software Defined Storage. Non Solo VSAN.Community - Software Defined Storage. Non Solo VSAN.
Community - Software Defined Storage. Non Solo VSAN.
 
HP software defined storage
HP software defined storageHP software defined storage
HP software defined storage
 
최음제 『 W3.ow.to 』 톡 w2015 ♡ 최음제판매, 최음제 효과,최음제 정품구입,최음제부작용,최음제지속시간
최음제 『 W3.ow.to  』 톡 w2015 ♡ 최음제판매, 최음제 효과,최음제 정품구입,최음제부작용,최음제지속시간최음제 『 W3.ow.to  』 톡 w2015 ♡ 최음제판매, 최음제 효과,최음제 정품구입,최음제부작용,최음제지속시간
최음제 『 W3.ow.to 』 톡 w2015 ♡ 최음제판매, 최음제 효과,최음제 정품구입,최음제부작용,최음제지속시간
 
1° Sessione - Tecnologie hyperconvergenti e di virtualizzazione storage: VMwa...
1° Sessione - Tecnologie hyperconvergenti e di virtualizzazione storage: VMwa...1° Sessione - Tecnologie hyperconvergenti e di virtualizzazione storage: VMwa...
1° Sessione - Tecnologie hyperconvergenti e di virtualizzazione storage: VMwa...
 
What is Object storage ?
What is Object storage ?What is Object storage ?
What is Object storage ?
 
EMC Vmax3 tech-deck deep dive
EMC Vmax3 tech-deck deep diveEMC Vmax3 tech-deck deep dive
EMC Vmax3 tech-deck deep dive
 
Emc vnx2 technical deep dive workshop
Emc vnx2 technical deep dive workshopEmc vnx2 technical deep dive workshop
Emc vnx2 technical deep dive workshop
 

Semelhante a OpenStack Swift - MSST 2011 Tutorial Day

Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)
Conrad Cruz
 
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringAeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering
Conrad Cruz
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
archwisp
 

Semelhante a OpenStack Swift - MSST 2011 Tutorial Day (20)

Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)
 
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringAeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering
 
/etc/rc.d配下とかのリーディング勉強会
/etc/rc.d配下とかのリーディング勉強会/etc/rc.d配下とかのリーディング勉強会
/etc/rc.d配下とかのリーディング勉強会
 
A journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementA journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service management
 
Ubic
UbicUbic
Ubic
 
Ubic-public
Ubic-publicUbic-public
Ubic-public
 
Monit - NHRuby May 2009
Monit - NHRuby May 2009Monit - NHRuby May 2009
Monit - NHRuby May 2009
 
Linux Du Jour
Linux Du JourLinux Du Jour
Linux Du Jour
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
Null bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web ApplicationNull bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web Application
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swift
 
Continuous testing In PHP
Continuous testing In PHPContinuous testing In PHP
Continuous testing In PHP
 
Threat Con 2021: What's Hitting my Honeypots
Threat Con 2021: What's Hitting my HoneypotsThreat Con 2021: What's Hitting my Honeypots
Threat Con 2021: What's Hitting my Honeypots
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
 
Dev ops
Dev opsDev ops
Dev ops
 
Php version 5
Php version 5Php version 5
Php version 5
 
Debian 5 Hardening Tips
Debian 5 Hardening TipsDebian 5 Hardening Tips
Debian 5 Hardening Tips
 
Supporting Debian machines for friends and family
Supporting Debian machines for friends and familySupporting Debian machines for friends and family
Supporting Debian machines for friends and family
 
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments
 
Hacking the swisscom modem
Hacking the swisscom modemHacking the swisscom modem
Hacking the swisscom modem
 

Mais de Joshua McKenty

OpenStackDC and Cloud Foundry Meetup -
OpenStackDC and Cloud Foundry Meetup -OpenStackDC and Cloud Foundry Meetup -
OpenStackDC and Cloud Foundry Meetup -
Joshua McKenty
 
MSST-2013 Openstack in the Land of Guilder
MSST-2013 Openstack in the Land of GuilderMSST-2013 Openstack in the Land of Guilder
MSST-2013 Openstack in the Land of Guilder
Joshua McKenty
 
vGeek 2013 Tech Talk: Openstack-101
vGeek 2013 Tech Talk: Openstack-101vGeek 2013 Tech Talk: Openstack-101
vGeek 2013 Tech Talk: Openstack-101
Joshua McKenty
 
OpenStack: The evolution of computing (Credit Suisse Technology Summit)
OpenStack: The evolution of computing (Credit Suisse Technology Summit)OpenStack: The evolution of computing (Credit Suisse Technology Summit)
OpenStack: The evolution of computing (Credit Suisse Technology Summit)
Joshua McKenty
 
WSTA Breakfast Seminar
WSTA Breakfast SeminarWSTA Breakfast Seminar
WSTA Breakfast Seminar
Joshua McKenty
 
Wall-Street Technology Association (WSTA) Feb-2012
Wall-Street Technology Association (WSTA) Feb-2012Wall-Street Technology Association (WSTA) Feb-2012
Wall-Street Technology Association (WSTA) Feb-2012
Joshua McKenty
 
The Power of the Cloud, and Global Risk Modelling in the Open
The Power of the Cloud, and Global Risk Modelling in the OpenThe Power of the Cloud, and Global Risk Modelling in the Open
The Power of the Cloud, and Global Risk Modelling in the Open
Joshua McKenty
 
Open stack security emea launch
Open stack security   emea launchOpen stack security   emea launch
Open stack security emea launch
Joshua McKenty
 
OpenStack: Cloud's Big Tent
OpenStack: Cloud's Big TentOpenStack: Cloud's Big Tent
OpenStack: Cloud's Big Tent
Joshua McKenty
 
Cloud Security - GSFC Presentation, Sept 23 2009
Cloud Security - GSFC Presentation, Sept 23 2009Cloud Security - GSFC Presentation, Sept 23 2009
Cloud Security - GSFC Presentation, Sept 23 2009
Joshua McKenty
 

Mais de Joshua McKenty (19)

Open stack + Cloud Foundry: Palo Alto Meetup February 2015
Open stack + Cloud Foundry: Palo Alto Meetup February 2015Open stack + Cloud Foundry: Palo Alto Meetup February 2015
Open stack + Cloud Foundry: Palo Alto Meetup February 2015
 
OpenStackDC and Cloud Foundry Meetup -
OpenStackDC and Cloud Foundry Meetup -OpenStackDC and Cloud Foundry Meetup -
OpenStackDC and Cloud Foundry Meetup -
 
OpenStack Foundation Transparency Committee Update - January 2014
OpenStack Foundation Transparency Committee Update - January 2014OpenStack Foundation Transparency Committee Update - January 2014
OpenStack Foundation Transparency Committee Update - January 2014
 
But What About Docker?
But What About Docker?But What About Docker?
But What About Docker?
 
Scale-out Community: Lessons from OpenStack
Scale-out Community: Lessons from OpenStackScale-out Community: Lessons from OpenStack
Scale-out Community: Lessons from OpenStack
 
Cloud Power - The Early OpenStack Architecture
Cloud Power - The Early OpenStack ArchitectureCloud Power - The Early OpenStack Architecture
Cloud Power - The Early OpenStack Architecture
 
MSST-2013 Openstack in the Land of Guilder
MSST-2013 Openstack in the Land of GuilderMSST-2013 Openstack in the Land of Guilder
MSST-2013 Openstack in the Land of Guilder
 
vGeek 2013 Tech Talk: Openstack-101
vGeek 2013 Tech Talk: Openstack-101vGeek 2013 Tech Talk: Openstack-101
vGeek 2013 Tech Talk: Openstack-101
 
OpenStack: The evolution of computing (Credit Suisse Technology Summit)
OpenStack: The evolution of computing (Credit Suisse Technology Summit)OpenStack: The evolution of computing (Credit Suisse Technology Summit)
OpenStack: The evolution of computing (Credit Suisse Technology Summit)
 
WSTA Breakfast Seminar
WSTA Breakfast SeminarWSTA Breakfast Seminar
WSTA Breakfast Seminar
 
Arista Piston Webinar
Arista Piston WebinarArista Piston Webinar
Arista Piston Webinar
 
Open Stack DC
Open Stack DCOpen Stack DC
Open Stack DC
 
Wall-Street Technology Association (WSTA) Feb-2012
Wall-Street Technology Association (WSTA) Feb-2012Wall-Street Technology Association (WSTA) Feb-2012
Wall-Street Technology Association (WSTA) Feb-2012
 
OpenStack DC - Kickoff Keynote
OpenStack DC - Kickoff KeynoteOpenStack DC - Kickoff Keynote
OpenStack DC - Kickoff Keynote
 
The Power of the Cloud, and Global Risk Modelling in the Open
The Power of the Cloud, and Global Risk Modelling in the OpenThe Power of the Cloud, and Global Risk Modelling in the Open
The Power of the Cloud, and Global Risk Modelling in the Open
 
Open stack security emea launch
Open stack security   emea launchOpen stack security   emea launch
Open stack security emea launch
 
OpenStack: Cloud's Big Tent
OpenStack: Cloud's Big TentOpenStack: Cloud's Big Tent
OpenStack: Cloud's Big Tent
 
The Space Penguin Odyssey
The Space Penguin OdysseyThe Space Penguin Odyssey
The Space Penguin Odyssey
 
Cloud Security - GSFC Presentation, Sept 23 2009
Cloud Security - GSFC Presentation, Sept 23 2009Cloud Security - GSFC Presentation, Sept 23 2009
Cloud Security - GSFC Presentation, Sept 23 2009
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

OpenStack Swift - MSST 2011 Tutorial Day

  • 2. Me: Joshua McKenty Twitter: @jmckenty Email: joshua@piston.cc Former Chief Architect, NASA Nebula Founding Member, OpenStack OpenStack Project Policy Board
  • 4. SWIFT – What it is, in one slide
  • 5. Today’s Menu One Virtual Machine Four Swift Nodes Loopback device for storage Self-signed SSL Certificate
  • 6. Before we begin… VMWare Fusion https://www.vmware.com/tryvmware/?p=vmware-fusion31&lp=1 Ubuntu Disk Image http://releases.ubuntu.com/lucid/ubuntu-10.04.2-server-amd64.iso Swift Administrator’s Guide http://docs.openstack.org/cactus/openstack-compute/admin/os-compute-adminguide-cactus.pdf Cyberduck (for testing) http://cyberduck.ch/Cyberduck-4.0.2.zip
  • 8. Step Two: Get Remote <log in> sudosu – apt-get install –y openssh-server ifconfig #get your ip address <ssh to this ip>
  • 9. Step Three: Apt Packages sudosu - apt-get -y install python-software-properties add-apt-repository ppa:swift-core/ppa apt-get update apt-get -y install curl gccbzrmemcached python-configobj python-coverage python-dev python-nose python-setuptools python-simplejson python-xattr sqlite3 xfsprogs python-webob python-eventlet python-greenlet python-pastedeploy python-netifaces screen vim
  • 10. Step Four: Storage Environment adduserswiftdemo adduserswiftdemoadmin mkdir/srv dd if=/dev/zero of=/srv/swift-disk bs=1024 count=0 seek=1000000 mkfs.xfs -i size=1024 /srv/swift-disk echo "/srv/swift-disk /mnt/sdb1 xfsloop,noatime,nodiratime,nobarrier,logbufs=8 0 0" >> /etc/fstab mkdir /mnt/sdb1 mount /mnt/sdb1 mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4 chown -R swiftdemo:swiftdemo /mnt/sdb1 for x in {1..4}; do ln -s /mnt/sdb1/$x /srv/$x; done mkdir -p /etc/swift/object-server /etc/swift/container-server /etc/swift/account-server mkdir -p /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4 mkdir -p /var/run/swift chown -R swiftdemo:swiftdemo /etc/swift /mnt/sdb1 /srv/[1-4]/ /var/run/swift sed -e "s/exit 0/mkdir varrunswiftchownswiftdemo:swiftdemo varrunswiftexit 0/g" /etc/rc.local -i
  • 11. Step Five: RSYNC cat << EOF > /etc/rsyncd.conf uid = swiftdemo gid = swiftdemo log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid address = 127.0.0.1 EOF
  • 12. Step Five: RSYNC cat << EOF >> /etc/rsyncd.conf [account6012] max connections = 25 path = /srv/1/node/ read only = false lock file = /var/lock/account6012.lock [account6022] max connections = 25 path = /srv/2/node/ read only = false lock file = /var/lock/account6022.lock [account6032] max connections = 25 path = /srv/3/node/ read only = false lock file = /var/lock/account6032.lock [account6042] max connections = 25 path = /srv/4/node/ read only = false lock file = /var/lock/account6042.lock EOF
  • 13. Step Five: RSYNC cat << EOF >> /etc/rsyncd.conf [container6011] max connections = 25 path = /srv/1/node/ read only = false lock file = /var/lock/container6011.lock [container6021] max connections = 25 path = /srv/2/node/ read only = false lock file = /var/lock/container6021.lock [container6031] max connections = 25 path = /srv/3/node/ read only = false lock file = /var/lock/container6031.lock [container6041] max connections = 25 path = /srv/4/node/ read only = false lock file = /var/lock/container6041.lock EOF
  • 14. Step Five: RSYNC cat << EOF >> /etc/rsyncd.conf [object6010] max connections = 25 path = /srv/1/node/ read only = false lock file = /var/lock/object6010.lock [object6020] max connections = 25 path = /srv/2/node/ read only = false lock file = /var/lock/object6020.lock [object6030] max connections = 25 path = /srv/3/node/ read only = false lock file = /var/lock/object6030.lock [object6040] max connections = 25 path = /srv/4/node/ read only = false lock file = /var/lock/object6040.lock EOF sed -e "s/RSYNC_ENABLE=false/RSYNC_ENABLE=true/g" /etc/default/rsync -i
  • 15. Step Six: Install Swift su– swiftdemo mkdir ~/bin bzrinit-repo swift cd ~/swift; bzr branch lp:swift trunk cd ~/swift/trunk; sudo python setup.py develop cat << EOF >> ~/.bashrc export SWIFT_TEST_CONFIG_FILE=/etc/swift/func_test.conf export PATH=${PATH}:~/bin EOF . ~/.bashrc
  • 16. Step Seven: SSL Certificates cd /etc/swift opensslreq -new -x509 -nodes -out cert.crt -keyoutcert.key # USE IP for COMMON NAME
  • 17. Step Eight: Configurations sudosu- export SWIFT_IP=172.16.81.129 cat << EOF >> /etc/swift/proxy-server.conf [DEFAULT] bind_port = 443 bind_ip = $SWIFT_IP cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key user = swiftdemo log_facility = LOG_LOCAL1 [pipeline:main] pipeline = healthcheck cache swauth proxy-server [app:proxy-server] use = egg:swift#proxy allow_account_management = true [filter:swauth] use = egg:swift#swauth super_admin_key= swauthkey default_swift_cluster = local#https://$SWIFT_IP:443/v1 [filter:healthcheck] use = egg:swift#healthcheck [filter:cache] use = egg:swift#memcache EOF
  • 18. Step Eight: Configurations cat << EOF >> /etc/swift/swift.conf [swift-hash] # random unique string that can never change (DO NOT LOSE) swift_hash_path_suffix = msst-swift-tutorial EOF
  • 19. Step Eight: Account Server Configs cd /etc/swift/account-server cat << EOF > 1.conf [DEFAULT] devices = /srv/1/node mount_check = false bind_port = 6012 user = swiftdemo log_facility = LOG_LOCAL2 [pipeline:main] pipeline = account-server [app:account-server] use = egg:swift#account [account-replicator] vm_test_mode = yes [account-auditor] [account-reaper] EOF sed -e "s/srv1/srv2/" -e "s/6012/6022/" -e "s/LOG_LOCAL2/LOG_LOCAL3/" 1.conf > 2.conf sed -e "s/srv1/srv3/" -e "s/6012/6032/" -e "s/LOG_LOCAL2/LOG_LOCAL4/" 1.conf > 3.conf sed -e "s/srv1/srv4/" -e "s/6012/6042/" -e "s/LOG_LOCAL2/LOG_LOCAL5/" 1.conf > 4.conf
  • 20. Step Eight: Container Server Configs cd /etc/swift/container-server cat << EOF > 1.conf [DEFAULT] devices = /srv/1/node mount_check = false bind_port = 6011 user = swiftdemo log_facility = LOG_LOCAL2 [pipeline:main] pipeline = container-server [app:container-server] use = egg:swift#container [container-replicator] vm_test_mode = yes [container-updater] [container-auditor] EOF sed -e "s/srv1/srv2/" -e "s/601/602/" -e "s/LOG_LOCAL2/LOG_LOCAL3/" 1.conf > 2.conf sed -e "s/srv1/srv3/" -e "s/601/603/" -e "s/LOG_LOCAL2/LOG_LOCAL4/" 1.conf > 3.conf sed -e "s/srv1/srv4/" -e "s/601/604/" -e "s/LOG_LOCAL2/LOG_LOCAL5/" 1.conf > 4.conf
  • 21. Step Eight: Object Server Configs cd /etc/swift/object-server cat << EOF > 1.conf [DEFAULT] devices = /srv/1/node mount_check = false bind_port = 6010 user = swiftdemo log_facility = LOG_LOCAL2 [pipeline:main] pipeline = object-server [app:object-server] use = egg:swift#object [object-replicator] vm_test_mode = yes [object-updater] [object-auditor] EOF sed -e "s/srv1/srv2/" -e "s/601/602/" -e "s/LOG_LOCAL2/LOG_LOCAL3/" 1.conf > 2.conf sed -e "s/srv1/srv3/" -e "s/601/603/" -e "s/LOG_LOCAL2/LOG_LOCAL4/" 1.conf > 3.conf sed -e "s/srv1/srv4/" -e "s/601/604/" -e "s/LOG_LOCAL2/LOG_LOCAL5/" 1.conf > 4.conf
  • 22. Step Nine: Binaries su - swiftdemo cat << EOF > ~/bin/resetswift #!/bin/bash swift-init all stop # find /var/log/swift -type f -exec rm -f {} sudoumount /mnt/sdb1 sudomkfs.xfs -f -i size=1024 /srv/swift-disk sudo mount /mnt/sdb1 sudomkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4 sudochownswiftdemo:swiftdemo /mnt/sdb1/* mkdir -p /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4 sudochownswiftdemo:swiftdemo /mnt/sdb1/* sudorm -f /var/log/debug /var/log/messages /var/log/rsyncd.log /var/log/syslog sudo service rsyslog restart sudo service memcached restart EOF
  • 23. Step Nine: Binaries export SWIFT_IP=172.16.81.129 cat << EOF > ~/bin/remakerings #!/bin/bash cd /etc/swift rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz swift-ring-builder object.builder create 18 3 1 swift-ring-builder object.builder add z1-$SWIFT_IP:6010/sdb1 1 swift-ring-builder object.builder add z2-$SWIFT_IP:6020/sdb2 1 swift-ring-builder object.builder add z3-$SWIFT_IP:6030/sdb3 1 swift-ring-builder object.builder add z4-$SWIFT_IP:6040/sdb4 1 swift-ring-builder object.builder rebalance swift-ring-builder container.builder create 18 3 1 swift-ring-builder container.builder add z1-$SWIFT_IP:6011/sdb1 1 swift-ring-builder container.builder add z2-$SWIFT_IP:6021/sdb2 1 swift-ring-builder container.builder add z3-$SWIFT_IP:6031/sdb3 1 swift-ring-builder container.builder add z4-$SWIFT_IP:6041/sdb4 1 swift-ring-builder container.builder rebalance swift-ring-builder account.builder create 18 3 1 swift-ring-builder account.builder add z1-$SWIFT_IP:6012/sdb1 1 swift-ring-builder account.builder add z2-$SWIFT_IP:6022/sdb2 1 swift-ring-builder account.builder add z3-$SWIFT_IP:6032/sdb3 1 swift-ring-builder account.builder add z4-$SWIFT_IP:6042/sdb4 1 swift-ring-builder account.builder rebalance EOF
  • 24. Step Nine: Binaries cat << EOF > ~/bin/startmain #!/bin/bash swift-init main start EOF cat << EOF > ~/bin/recreateaccounts #!/bin/bash # Replace swauthkey with whatever your super_admin key is (recorded in # /etc/swift/proxy-server.conf). swauth-prep -K swauthkey -A https://$SWIFT_IP:443/auth/ swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ -a test tester testing swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ -a test2 tester2 testing2 swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ test tester3 testing3 swauth-add-user -K swauthkey -A https://$SWIFT_IP:443/auth/ -a -r reseller reseller reseller EOF
  • 25. Step Nine: Binaries cat << EOF > ~/bin/startrest #!/bin/bash swift-init rest start EOF chmod +x ~/bin/*
  • 26. Step Ten: Running It . ~/.bashrc remakerings cd ~/swift/trunk; ./.unittests sudo bin/startmain recreateaccounts
  • 27. Fire up Cyberduck! defaults write ch.sudo.cyberduckcf.authentication.context /auth/v1.0
  • 29. Me: Joshua McKenty Twitter: @jmckenty Email: joshua@piston.cc Cell: 650-283-6846
  • 30.
  • 31. HealthCheck Middleware Patch Edit swift/common/wsgi.py Add: from swift.common.middleware import healthcheck, memcache, swauth

Notas do Editor

  1. We’re all clouds
  2. “NASA Nebula project drops Eucalyptus like a rock, moves to developing their own: http://novacc.org/ #thud” - http://twitter.com/#!/wattersjames/status/15393716881
  3. http://zisz.webnode.cn/news/odd-errors-importerror-no-module-named-middleware-healthcheck/