developerworks/Cloud

우분투에 델타클라우드 설치..

수상한 김토끼 2013. 3. 21. 14:37

우분투에 델타클라우드, 오픈스택을 설치하는 과정을 정리한다.

시간이 지나면 잊어버리니까..


우선.. 우분투 12.04 64bit 버전을 받아서 설치했다.. 

비교적 설치가 쉬운 델타클라우드부터 설치를 해 보자.


sudo apt-get install ruby1.9.1-full

sudo apt-get install ruby-dev

sudo apt-get install rubygems

sudo apt-get install build-essential (instead of gcc-c++)

sudo apt-get install libxml2

sudo apt-get install libxml2-dev (instead of libxml2-devel)

sudo apt-get install libxslt-dev (instead of libxslt and libxslt-devel)

sudo gem install rake

여기까지는 문제 없이 설치가 된다.


이제 델타클라우드를 설치해 보자.

sudo gem install deltacloud-core

.

..

...

....

.....     시간이 오래 걸린다.. 참고 기다린다..


첫번째 실패

$ sudo gem install deltacloud-core

Fetching: tilt-1.3.3.gem (100%)

Fetching: haml-4.0.1.gem (100%)


HEADS UP! Haml 4.0 has many improvements, but also has changes that may break

your application:


* Support for Ruby 1.8.6 dropped

* Support for Rails 2 dropped

* Sass filter now always outputs <style> tags

* Data attributes are now hyphenated, not underscored

* html2haml utility moved to the html2haml gem

* Textile and Maruku filters moved to the haml-contrib gem


For more info see:


http://rubydoc.info/github/haml/haml/file/CHANGELOG.md


Fetching: rack-1.5.2.gem (100%)

Fetching: rack-protection-1.5.0.gem (100%)

Fetching: sinatra-1.3.5.gem (100%)

Fetching: sinatra-rabbit-1.1.6.gem (100%)

Fetching: rack-accept-0.4.5.gem (100%)

Fetching: json_pure-1.7.7.gem (100%)

Fetching: net-ssh-2.6.6.gem (100%)

Fetching: nokogiri-1.5.8.gem (100%)

Building native extensions.  This could take a while...

Fetching: sequel-3.42.0.gem (100%)

Fetching: sqlite3-1.3.7.gem (100%)

Building native extensions.  This could take a while...

ERROR:  Error installing deltacloud-core:

        ERROR: Failed to build gem native extension.


        /usr/bin/ruby1.8 extconf.rb

checking for sqlite3.h... no

sqlite3.h is missing. Try 'port install sqlite3 +universal'

or 'yum install sqlite-devel' and check your shared library search path (the

location where your sqlite3 shared library is located).

*** extconf.rb failed ***

Could not create Makefile due to some reason, probably lack of

necessary libraries and/or headers.  Check the mkmf.log file for more

details.  You may need configuration options.


Provided configuration options:

        --with-opt-dir

        --without-opt-dir

        --with-opt-include

        --without-opt-include=${opt-dir}/include

        --with-opt-lib

        --without-opt-lib=${opt-dir}/lib

        --with-make-prog

        --without-make-prog

        --srcdir=.

        --curdir

        --ruby=/usr/bin/ruby1.8

        --with-sqlite3-dir

        --without-sqlite3-dir

        --with-sqlite3-include

        --without-sqlite3-include=${sqlite3-dir}/include

        --with-sqlite3-lib

        --without-sqlite3-lib=${sqlite3-dir}/lib

        --enable-local

        --disable-local



Gem files will remain installed in /var/lib/gems/1.8/gems/sqlite3-1.3.7 for inspection.

Results logged to /var/lib/gems/1.8/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out


쭉 읽어보니 sqlite3 라는 녀석이 문제가 되고 있네.. 그럼 저 녀석도 설치..
sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev
그리고 다시  sudo gem install deltacloud-core 
.
..
...
....
..... 이번에도 오래 걸린다.. 또 기다린다..
두번째 실패
$ sudo gem install deltacloud-core
Building native extensions.  This could take a while...
Fetching: eventmachine-1.0.3.gem (100%)
Building native extensions.  This could take a while...
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.5.1.gem (100%)
Building native extensions.  This could take a while...
Fetching: mime-types-1.21.gem (100%)
Fetching: rest-client-1.6.7.gem (100%)
Fetching: rbovirt-0.0.18.gem (100%)
Fetching: uuidtools-2.1.3.gem (100%)
Fetching: http_connection-1.4.4.gem (100%)
Fetching: xml-simple-1.1.2.gem (100%)
Fetching: aws-2.8.0.gem (100%)
Fetching: ruby-hmac-0.4.0.gem (100%)
Fetching: waz-storage-1.3.3.gem (100%)
Fetching: json-1.7.7.gem (100%)
Building native extensions.  This could take a while...
Fetching: cloudservers-0.4.2.gem (100%)
Fetching: cloudfiles-1.5.0.1.gem (100%)
Fetching: builder-3.2.0.gem (100%)
Fetching: excon-0.16.10.gem (100%)
Fetching: formatador-0.2.4.gem (100%)
Fetching: multi_json-1.7.1.gem (100%)
Fetching: net-scp-1.1.0.gem (100%)
Fetching: fog-1.10.0.gem (100%)
Fetching: openstack-1.0.9.gem (100%)
Fetching: nori-2.0.4.gem (100%)
Fetching: httpi-2.0.2.gem (100%)
Fetching: wasabi-3.0.0.gem (100%)
Fetching: gyoku-1.0.0.gem (100%)
Fetching: akami-1.2.0.gem (100%)
Fetching: savon-2.1.0.gem (100%)
Fetching: trollop-2.0.gem (100%)
Fetching: rbvmomi-1.6.0.gem (100%)
Fetching: deltacloud-core-1.1.2.gem (100%)
Successfully installed sqlite3-1.3.7
Successfully installed eventmachine-1.0.3
Successfully installed daemons-1.1.9
Successfully installed thin-1.5.1
Successfully installed mime-types-1.21
Successfully installed rest-client-1.6.7
Successfully installed rbovirt-0.0.18
Successfully installed uuidtools-2.1.3
Successfully installed http_connection-1.4.4
Successfully installed xml-simple-1.1.2
Successfully installed aws-2.8.0
Successfully installed ruby-hmac-0.4.0
Successfully installed waz-storage-1.3.3
Successfully installed json-1.7.7
Successfully installed cloudservers-0.4.2
Successfully installed cloudfiles-1.5.0.1
Successfully installed builder-3.2.0
Successfully installed excon-0.16.10
Successfully installed formatador-0.2.4
Successfully installed multi_json-1.7.1
Successfully installed net-scp-1.1.0
Successfully installed fog-1.10.0
Successfully installed openstack-1.0.9
Successfully installed nori-2.0.4
Successfully installed httpi-2.0.2
Successfully installed wasabi-3.0.0
Successfully installed gyoku-1.0.0
Successfully installed akami-1.2.0
Successfully installed savon-2.1.0
Successfully installed trollop-2.0
Successfully installed rbvmomi-1.6.0
Successfully installed deltacloud-core-1.1.2
32 gems installed
Installing ri documentation for sqlite3-1.3.7...

No definition for libversion

Enclosing class/module 'mSqlite3' for class Statement not known
Installing ri documentation for eventmachine-1.0.3...
Installing ri documentation for daemons-1.1.9...
Installing ri documentation for thin-1.5.1...
Installing ri documentation for mime-types-1.21...
Installing ri documentation for rest-client-1.6.7...
Installing ri documentation for rbovirt-0.0.18...
Installing ri documentation for uuidtools-2.1.3...
Installing ri documentation for http_connection-1.4.4...
Installing ri documentation for xml-simple-1.1.2...
Installing ri documentation for aws-2.8.0...
Installing ri documentation for ruby-hmac-0.4.0...
Installing ri documentation for waz-storage-1.3.3...
Installing ri documentation for json-1.7.7...
Installing ri documentation for cloudservers-0.4.2...
Installing ri documentation for cloudfiles-1.5.0.1...
Installing ri documentation for builder-3.2.0...
ERROR:  While generating documentation for builder-3.2.0
... MESSAGE:   Unhandled special: Special: type=17, text="<!-- HI -->"
... RDOC args: --ri --op /var/lib/gems/1.8/doc/builder-3.2.0/ri --title Builder -- Easy    XML Building --main README.rdoc --line-numbers lib --title builder-3.2.0 Documentation    --quiet

documentation을 설치하다가 에러가 났다고 하네..
해당 부분을 구글에서 찾아서.. 
sudo gem install rubygems-update
sudo apt-get install libopenssl-ruby

그리고 또 sudo gem install deltacloud-core
.
..
...
....
..... 이번에는 더 오래 걸리는 듯..

세번만에 성공..
$ sudo gem install deltacloud-core
Successfully installed deltacloud-core-1.1.2
1 gem installed
Installing ri documentation for deltacloud-core-1.1.2...
Installing RDoc documentation for deltacloud-core-1.1.2...

deltacloudd -l 명령으로 사용가능한 드라이버 목록을 찾아보자..
$ sudo deltacloudd -l
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- require_relative (LoadError)
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from /var/lib/gems/1.8/gems/deltacloud-core-1.1.2/lib/deltacloud/api.rb:19
        from /var/lib/gems/1.8/gems/deltacloud-core-1.1.2/bin/deltacloudd:132:in `load'
        from /var/lib/gems/1.8/gems/deltacloud-core-1.1.2/bin/deltacloudd:132
        from /usr/local/bin/deltacloudd:19:in `load'
        from /usr/local/bin/deltacloudd:19

다시 실패.. 찾아보니.. gem에서 require_relative가 없다고 그러네..

sudo gem install require_relative

$ sudo gem install require_relative
Fetching: require_relative-1.0.3.gem (100%)
Successfully installed require_relative-1.0.3
1 gem installed
Installing ri documentation for require_relative-1.0.3...
Installing RDoc documentation for require_relative-1.0.3...

다행히.. 한큐에 설치가 된듯 하니.. deltacloudd -l

$ deltacloudd -l
Available drivers:

rhevm
gogrid
google
rimuhosting
terremark
eucalyptus
azure
sbc
condor
openstack
digitalocean
opennebula
arubacloud
vsphere
rackspace
mock
ec2
fgcp

델타 클라우드에서 제공하는 드라이버 목록이 잘 보이는 것을 확인..

글이 너무 길어지니.. 델타클라우드에서 한번 자르고.. 오픈스택은 다른 글에 정리..