Status: Work in Progress
About
rBuilder and the rPath Lifecycle Management Platform automate the creation, configuration, management and maintenance of application images for virtualized and cloud computing environments. By producing application images that are optimized for any hypervisor, rPath frees the application from the underlying hardware, and enables a more efficient, lower cost model for development, deployment and support. rPath’s end-to-end technology simplifies the entire range of lifecycle management activities for application images, while promoting scalability in response to dynamic demand.
Scope
My goal is to go through the developer tutorial and experiment with the platform to get my own LAMP appliance built and published.
Reference
Setup
Assumptions:
- Platform: Mac OS X (will work on other platforms with minor modifications/substitutions)
Download:
- VMware Fusion: http://www.vmware.com/products/fusion/
- VMware Appliance: http://www.rpath.org/project/devimage/
Setup:
- Load VM Image into Fusion and set networking to NAT (via Settings)
- Start VM Image
- Follow Quick Start Guide to create a devuser account.
- Open Terminal and ssh to VM with: ssh -l devuser <IP>
Tutorial
http://wiki.rpath.com/wiki/Application_to_Appliance
As devuser:
cd ~
mkdir conary
mkdir conary/example
mkdir conary/example/example-1-devel
cd conary/example/example-1-devel
cvc context example-1-devel
cvc co group-phptestapp2-appliance
cd group-phptestapp2-appliance
loadSuperClass('group-appliance=conary.rpath.com@rpl:2')
class GroupPhptestapp2Appliance(ApplianceGroupRecipe):
name = 'group-phptestapp2-appliance'
version = '1'
rapaLabel = 'raa.rpath.org@rpath:rapa-3'
def addPackages(r):
r.add('man')
rmake build group-phptestapp2-appliance.recipe[vmware]
My rPath Linux 2 based product compiles, one based on CentOS 5 does not.
rmake commit 1 --message="First appliance build."
Generate installable image
NOTE: Do not set the free disk space to more than 10GB. The rBuilder build seems to crash otherwise.
Other Notes
Adding Packages to Recipe
Use the devimage to modify the product and commit the changes.
-> Modify recipe files
rmake build group-phptestapp2-appliance.recipe[vmware]
rmake commit 1 --message="First appliance build."
Use the rPath Appliance Platform Agent on the product image to update it. Your product must be public for this to work.
Creating New Packages
cd ~/conary/example-1-devel
cvc newpkg php
cd php
Create php.recipe
class Php(RedirectRecipe):
name = 'php'
version = '0'
def setup(r):
r.addRedirect('php5')
Commit it
cvc add php.recipe
cvc ci --message="Added php package"
Also see: http://wiki.rpath.com/wiki/Conary:New_Package_Tutorial
Shadowing
You can shadow (Tutorial) a trove when you want to make changes to an existing package. Once shadowed you can track and merge changes from the source.
cvc shadow phptestapp2.rpath.org@dorn:phptestapp2-1.0-devel /
httpd:source=conary.rpath.com@rpl:devel
NOTE: If you shadow anything from rpl:1 you need to add conary.rpath.com@rpl:1 to the installLabel path in .conaryrc.
cvc co httpd:source
cd httpd
rmake build httpd.recipe[vmware]
rmake commit 2 --message="Built httpd package"
Adding packages manually
You can add packages to a server manually (via conary update) if you don't want to make them part of the rBuilder appliance:
sudo conary update --resolve git
Recipe Macros
Links
Useful Packages
http://www.rpath.org/repos/rpl-devel/browse
r.add('openssh')
r.add('openssh-server')
r.add('openssh-client')
r.add('sudo')
r.add('emacs')
r.add('which')
r.add('man')
r.add('httpd')
r.add('git')
r.add('subversion')
r.add('cvs')
r.add('php5')
r.add('php5-pear')
rPath Wishlist
- http://www.rpath.org/
- Nicer URL's when browsing packages that are easy to read. No need to have such complex URL's.
- Any conary version strings should be displayed with a more advanced javascript widget that explains all parts of the version string and has more shortcuts to go to different repository versions etc...
- Provide an efficient source repository browser for all *:source packages. It would help a lot during recipe development. It should be browsable like an SVN or GIT repository.