This discussion is archived
2 Replies Latest reply: Jan 3, 2013 10:10 AM by 980059 RSS

Distribution Constructor Questions

980059 Newbie
Currently Being Moderated
Has anyone out there successfully incorporated custom scripts into the distribution constructor? What I'd like to to is to be able to incorporate arbitrary files into the image so that any boxes installed with my new image will have these files available at first boot. There is a lot of documentation on including custom scripts into the constructor but no good examples of the scripts themselves.

Edited by: carsonoid on Dec 27, 2012 2:43 PM
  • 1. Re: Distribution Constructor Questions
    Dave Miner Explorer
    Currently Being Moderated
    I agree that we don't have any useful examples of the scripts, but that's in part because we don't have much information on what kinds of customizations people are looking to do. If all you're trying to do is add some files, you may find it easiest to just put them in a small IPS package and include the package in the software listed in the DC manifest; that way you can later update the systems installed with that image just by updating the package in the repository and using "pkg update".
  • 2. Re: Distribution Constructor Questions
    980059 Newbie
    Currently Being Moderated
    Just as an FYI, here is how I managed to accomplish my goal.

    Goal:
    To include some files/packages in a default installation of Solaris 11.1 using only the disk. The custom files and packages should not be dependent on any networked repository.

    Solution:
    1. Create a local (empty) repo on the machine that will be running the distribution constructor
    `pkgrepo create /export/repoSolaris11`
    2. Create a simple IPS package containing the files and publish it to the local repo
    http://docs.oracle.com/cd/E26502_01/html/E21383/pkgcreate.html#scrolltoc
    3. Create a new checkpoint in your distribution constructor xml manifest that points to a custom script.
    4. The custom script should copy the /export/repoSolaris11 folder to the root of the /rpool/dc/ai/build_data/boot_archive/ folder
    5. Run the distribution constructor and build a new .iso
    The iso should have a more or less standard layout except you will have a local filesystem repo available to the installation enviroment.
    6. Create a custom ai_manifest(5) file which includes an additional publisher entry at the top for your local filesystem repo. It should also include the custom packages for your repo:
    Ex:
    <publisher name="PUBNAMEHERE">
    <origin name="file:///repoSolaris11/"/>
    </publisher>

    Package list:
    <software_data action="install">
    <name>pkg:/entire@0.5.11-0.175.1</name>
    <name>pkg:/group/system/solaris-large-server</name>

    <!-- Install custom packages, they should come from the local fileysystem repo -->
    <name>pkg:/tokyocabinet</name>
    <name>pkg:/cfengine</name>
    </software_data>


    That's it! When you do the automated install it will install the custom packages from a repo contained on the iso itself. The instructions aren't 100% but it should help anyone else with this know the right direction.

    One big caveat here is that the entire boot environment is loaded into a ramdisk. So make sure that your server has more ram than the repo's final size.

    Edited by: carsonoid on Jan 3, 2013 10:09 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points