Aeolus on Fedora 17 / Ruby 1.9.3

Mo Morsi mmorsi at redhat.com
Wed Feb 8 17:34:33 UTC 2012


deltacloud is working as is and needs no further changes
imagefactory and iwhd need to be rebulit against the updated dependencies
imagefactory-console, aeolus-image, and conductor codebases need some tweaks and needs to be rebuilt against updated dependencies

the following needs to be udpated in rawhide for things to work properly:
rubygem-rails_warden - update to 0.5.6
rubygem-capybara - update to 1.1.2
rubygem-ruby-net-ldap / rubygem-factory_girl / rubygem-factory_girl_rails - updates slated to go in, just haven't been pushed yet

aeolus-conductor - to contain changes included in patchset
rubygem-aeolus-image - build against ruby 1.9, update to new standards
rubygem-imagefactory-console - build against ruby 1.9, update to new standards


Steps to get deltacloud up and running
1. startup a fresh F16 vm & yum update
2. install the ruby 1.9.3 repo, currently based on rawhide / F17 + updates to ruby related packages to work against 1.9.3. Create a file /etc/yum.repos.d/ruby.repo with the following:
[ruby]
name=ruby
baseurl=http://kojipkgs.fedoraproject.org/repos/f17-ruby/latest/x86_64/
enabled=0
gpgcheck=0

3. sudo yum remove groff # due to newly introduced conflicting package groff-base in rawhide
4. sudo yum install deltacloud-core --enablerepo=ruby
5. start / use deltacloud as normal:  sudo deltacloudd -i mock ;   navigrate to http://localhost:3001/api


Install dependencies to build other packages:

6. Prep the system for additional F17 changes as described here: http://fedoraproject.org/wiki/Upgrading_Fedora_using_yum#Fedora_16_-.3E_Fedora_17
7. sudo yum install --enablerepo=ruby git # to checkout sources
7. sudo yum install --enablerepo=ruby autoconf automake bison flex patch gperf gettext-devel gcc-c++ libcurl-devel jansson-devel libmicrohttpd-devel libuuid-deve1 liboauth-devell hail-devel libxml2-devel libgc-devel mongodb-devel help2man rpm-build mongodb-server # for iwhd
8. sudo yum install --enablerepo=ruby python-setuptools  # for imagefactory
9. sudo yum install --enablerepo=ruby rubygem-rspec-core # for aeolus-image, imagefactory-console
10. sudo yum install --enablerepo=ruby rubygem-rspec-rails rubygem-factory_girl_rails rubygem-timecop rubygem-cucumber rubygem-database_cleaner # for conductor

Steps to get iwhd up and running:

12. git clone git://git.fedorahosted.org/iwhd.git && cd iwhd
12. At this point, I commented out the 'make -s check' in iwhd.spec.in as problems interfacing / launching mongodb caused error when running the test suite (this will need to be looked into)
13. ./autogen.sh
14. ./configure
15. make rpm
16. At this point, install and start iwhd:
sudo yum install --enablerepo=ruby --nogpgcheck ~/rpmbuild/RPMS/x86_64/iwhd-1.2.11.642c.dirty-1.fc16.x86_64.rpm
sudo service mongod start
sudo service iwhd start


Steps to get imagefactory up and running:
17. git clone git://github.com/aeolusproject/imagefactory && cd imagefactory
18. make rpm
19. You will need updated libguestfs and python-libguestfs installation (as required by libvirt as required by imagefactory) as these have been updated in rawhide to resolve various issues but have not hit the repos yet. You may d/l and install them from here: 
http://mo.morsi.org/files/rpms/libguestfs-1.17.4-6.aeolus.fc16.x86_64.rpm
http://mo.morsi.org/files/rpms/python-libguestfs-1.17.4-6.aeolus.fc16.x86_64.rpm 
src: http://mo.morsi.org/files/rpms/libguestfs-1.17.4-6.aeolus.fc16.src.rpm

20. sudo yum install --enablerepo=ruby ~/rpmbuild/RPMS/noarch/imagefactory-1.0.0rc4-1.fc16.noarch.rpm
21. sudo service imagefactory start


Steps to rebuild imagefactory-console & aeolus-image
22. git clone git://github.com/aeolusproject/imagefactory-console
23. git am the respective patch in this thread
24 sudo rake rpms
25. sudo yum install --enablerepo=ruby --nogpgcheck ~/rpmbuild/RPMS/noarch/rubygem-imagefactory-console-...rpm
26. repeat the previous steps for  git://github.com/aeolusproject/aeolus-image-rubygem



Steps to get conductor up and running:

27. git clone git://github.com/aeolusproject/conductor
28. git am conductor patch in this email thread
29.  make rpms
30. You will need the rubygem-net-ldap dependency which replaces rubygem-ruby-net-ldap and has been approved for Fedora but has yet to be pushed. You may d/l and install it from here:
http://mo.morsi.org/files/rpms/rubygem-net-ldap-0.2.2-1.fc16.noarch.rpm  / src:  http://mo.morsi.org/files/rpms/rubygem-net-ldap-0.2.2-1.fc16.src.rpm

31. You will also need updated rubygem-rails_warden and rubygem-capybara rpms, which you may d/l and install from here:
http://mo.morsi.org/files/rpms/rubygem-rails_warden-0.5.6-1.fc16.noarch.rpm  /  src: http://mo.morsi.org/files/rpms/rubygem-rails_warden-0.5.6-1.fc16.src.rpm
http://mo.morsi.org/files/rpms/rubygem-capybara-1.1.2-1.fc16.noarch.rpm      /  src: http://mo.morsi.org/files/rpms/rubygem-capybara-1.1.2-1.fc16.src.rpm

32. sudo yum install --nogpgcheck --enablerepo=ruby   <conductor rpms>


At this point I manually verified the app,

33. cd /usr/share/aeolus-conductor
34. sudo cp config/database.sqlite config/database.yml
35. sudo RAILS_ENV='production' rake db:create
36.  sudo RAILS_ENV='production' rake db:migrate
37. sudo RAILS_ENV='production' rake db:seed
38. sudo RAILS_ENV='production' rake "dc:create_user[admin, password, root at localhost.localdomain, admin, istrator]"
39. sudo rake dc:oauth_keys
40. Create a /usr/share/aeolus-configure/config/initializers/secret_token.rb with the following contents:
Conductor::Application.config.secret_token = '<rails_token/>'   # where rails_token is generated by running sudo rake dc:secret
41. Fix permissions on db file:
sudo chown -R aeolus.aeolus /usr/share/aeolus-configure/db
42. sudo setenforce 0
43. sudo service aeolus-conductor start
44. sudo service httpd start
45. verified I could log into conductor at http://localhost/conductor


Attached is the patchset required to get things working. It is based on the latest upstream HEAD.  Things have been parameterized such that these patches should work in both the ruby 1.8 and 1.9 environments.

  -Mo



More information about the aeolus-devel mailing list