Re: bootstrap as a host operation

Will Partain <[email protected]> Wed, 02 Oct 2002 21:49:59 +0100
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
Joel S responds to my bootstrapping-with-constraints
handwaving with:

> ... Instead of specifying this for a host, perhaps it
> should be specified for a host prototype like
> sparc-solaris8.

Yes, *absolutely*.  (Anything you can get into a prototype,
even if just a team-specific one, is forward progress.)

Here's a chance to show both an ARK infelicity and a
compensating idiom...  (Wake up, you there on the back
row...)

What would be *best* is to have bootstrappy things in just
the right prototypes.  So, for sidai/host/ALL.xml (i.e. for
all sidai-style hosts on the planet):

  <bootstrap>
    <constraint><dependency type="normal" name="ark-prereq-utils" /></constraint>
    <constraint><dependency type="normal" name="arkbase" /></constraint>
  </bootstrap>

And, as that is the "ultimate" prototype, the code would go
in there, too:

  <bootstrap><code>echo "bootstrap done"</code></bootstrap>

Beyond that, what gets bootstrapped is really a per-site
thing.  (Who am I to tell you that you must build/install
GCC?)

As you say, you'd want to common this up for all hosts of a
particular type; so, in myteam/host/sparc-solaris.xml, you
might have:

  <bootstrap>
    <constraint><dependency type="normal" name="gcc" /></constraint>
    <constraint><dependency type="normal" name="gnumake" /></constraint>
  </bootstrap>

and then maybe on one specific host you want cyrus-imapd
built as part of "bootstrapping" (arbitrary example); so
in myteam/host/host94.xml :

  <bootstrap>
    <constraint><dependency type="normal" name="cyrus-imapd" /></constraint>
  </bootstrap>

So far: lovely.  But if you hook together the usual
prototype tree for host94...

  <prototypes>
    <prototype team="."     name="sparc-solaris8" />
    <prototype team="sidai" name="ALL" />
  </prototypes>

  <bootstrap>
    <constraint><dependency type="normal" name="cyrus-imapd" /></constraint>
  </bootstrap>

and run 'ark host bootstrap host94', then... *it will do the
bootstrapping in the _wrong_ order*!  It will do...

   cyrus-imapd
   gcc
   gnumake
   ark-prereq-utils
   ark-base

i.e. nearly backwards :-)  However, if you were to write:

in myteam/host/host94.xml :

  <prototypes>
    <prototype team="."     name="sparc-solaris8" />
    <prototype team="sidai" name="ALL" />
  </prototypes>

  <bootstrap-host>
    <constraint><dependency type="normal" name="cyrus-imapd" /></constraint>
  </bootstrap-host>

in myteam/host/sparc-solaris8.xml:

  <bootstrap-platform>
    <constraint><dependency type="normal" name="gcc" /></constraint>
    <constraint><dependency type="normal" name="gnumake" /></constraint>
  </bootstrap-platform>

in sidai/host/ALL.xml:

  <bootstrap>
    <constraint><dependency type="normal" name="ark-prereq-utils" /></constraint>
    <constraint><dependency type="normal" name="arkbase" /></constraint>

    <constraint><dependency type="normal"
           what="host" name="." on-method="bootstrap-platform" /></constraint>
    <constraint><dependency type="normal"
           what="host" name="." on-method="bootstrap-host" /></constraint>
  </bootstrap>

  <bootstrap><code>echo "bootstrap done"</code></bootstrap>
  <bootstrap-platform><code lang="none" /></bootstrap-platform>
  <bootstrap-host><code lang="none" /></bootstrap-host>

Right things in the right order -- neat, huh?

Will

PS: Looking in the ARK/arkbase code, I think some of the
above may be *unimplemented* ; not a big problem though.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf