On 12/12/14 0:01 , Don Jackson via smartos-discuss wrote: > > I’d like to create my own version of smartos-live that includes ruby, > rubygems, and which has the puppet gem installed. > > I have successfully done something similar with the base64 image, so that vm > instantiations of my revised base image automatically run puppet (via SMF) > for further configuration, and that seems to work great. > > I’ve read the docs on the wiki about how to build smartos-live, and have > run/built a new live image. > > Building SmartOS on SmartOS > <https://wiki.smartos.org/display/DOC/Building+SmartOS+on+SmartOS> > > Extending smartos-live > <https://wiki.smartos.org/display/DOC/Extending+smartos-live> > > The second link above describes how to create a project that will be executed > during the smartos-live build, but I’m having trouble reconciling that > process with what I think I want to do, which is to > somehow install the rubygems200 pkgin and 2014Q3 somewhere within the VM I > use to build smartos-live, and then use the resulting rubygem executable to > install the puppet gem, and then arrange for all of this to then be added to > the live image. > > (I do realize there is a puppet pkgsrc pkg, but those packages seem to lag > the current by several months…so prefer to install the latest gem.) > > So far, I have been unable to install the 2014Q3 packages into the > smartos-live build vm, when I tried to install them in the normal location, > that broke the existing installed packages, and seemed to break the entire vm > for subsequent use, and to date, I have failed to figure how to install an > alternate pkgin installation somewhere else in the filesystem (using chroot, > etc). > > How can I get the ruby gem package and it’s dependencies installed somewhere > in the live build VM? > > And assuming I can do that, how would I arrange to copy essentially the > entire <chroot>/opt/local tree into the compiled/built live image? > > The local package describes building a manifest file, this seems to require > all the files you want to be installed (with no subdirs!) within the local > package root. > > Squashing an entire /opt/local tree into a flat directory and then creating a > manifest that would recreate said hierarchy seems unbelievably painful, > surely there is a better way?
Hi Don, So, first off, let me clarify some bits about the local projects (I wrote that doc, let me know if it isn't clear). The manifest is a single flat file; however, it can describe an entire tree. If you look at the illumos manifest (https://github.com/joyent/illumos-joyent/blob/master/manifest) for example, you'll see that there are lots of directories and sub-directories in it. The general design of the local projects is that it's for software that you're explicitly *building* against the proto area and then installing into that proto are. So while I wouldn't recommend this, here are some things I might suggest you look at. First, take a look at using pkg_add instead of pkgin. It seems to support you doing things like overriding the prefix and the like. So I think you may want to try and do something like specifying the path to the urls, downloading the explicit set of packages you want and using pkg_add to install it. You'll need to figure out what that means in terms of dependencies and the like. Alternatively, others have done this by just including something that happens post-boot. You may find it easier to construct a blob that has everything you need using boot-time modules. Or, depending on the amount of orchestration that you're looking for, open source SDC may be a better route. Robert ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
