<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>DomTool/NonHCoopSetup</title><revhistory><revision><revnumber>12</revnumber><date>2018-08-11 18:48:45</date><authorinitials>ClintonEbadi</authorinitials><revremark>note domtool doesn't need to be installed to test</revremark></revision><revision><revnumber>11</revnumber><date>2018-08-11 18:35:36</date><authorinitials>StephenMichel</authorinitials></revision><revision><revnumber>10</revnumber><date>2018-08-11 18:31:58</date><authorinitials>ClintonEbadi</authorinitials><revremark>domtool user not really required for dev builds</revremark></revision><revision><revnumber>9</revnumber><date>2018-08-11 18:15:24</date><authorinitials>ClintonEbadi</authorinitials></revision><revision><revnumber>8</revnumber><date>2018-08-11 17:53:23</date><authorinitials>ClintonEbadi</authorinitials></revision><revision><revnumber>7</revnumber><date>2018-08-11 17:41:09</date><authorinitials>ClintonEbadi</authorinitials><revremark>try to fix up NonHCoopSetup a bit, very incomplete still</revremark></revision><revision><revnumber>6</revnumber><date>2011-03-06 11:54:13</date><authorinitials>ClintonEbadi</authorinitials></revision><revision><revnumber>5</revnumber><date>2010-10-03 16:32:47</date><authorinitials>DavorOcelic</authorinitials></revision><revision><revnumber>4</revnumber><date>2009-11-26 20:48:52</date><authorinitials>DavorOcelic</authorinitials></revision><revision><revnumber>3</revnumber><date>2009-11-26 20:15:51</date><authorinitials>DavorOcelic</authorinitials></revision><revision><revnumber>2</revnumber><date>2009-11-26 19:59:20</date><authorinitials>DavorOcelic</authorinitials></revision><revision><revnumber>1</revnumber><date>2009-11-26 19:58:08</date><authorinitials>DavorOcelic</authorinitials></revision></revhistory></articleinfo><para><ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool#">DomTool</ulink> source code is, at places, HCoop and OpenAFS-specific. Here's a documented procedure for setting up <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool#">DomTool</ulink> on non-HCoop machines and without using AFS.  </para><para>The instructions on this page are unlikely to produce a working production setup, but should be sufficient to get started with a local development instance. </para><section><title>System Prerequisites</title><para>If you wish to actually publish configuration, there are a few prerequisites. <emphasis role="strong">These are not necessary for a development build.</emphasis> </para><para>You will need to create a user named <code>domtool</code>, <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool#">DomTool</ulink> is currently hard coded to require the user. </para><para>If you wish to actually publish configuration you will also need to grant the <code>domtool</code> user some sudo privileges and use <code>/var/domtool</code> for the <code>localRoot</code>. <ulink url="https://git.hcoop.net/?p=hcoop/domtool2.git;a=blob;f=bootstrap/domtool.sudoers">bootstrap/domtool.sudoers</ulink> in the source tree has an example configuration for sudo. Neither is required for a development setup, domtool can be run without sudo access and with an alternative <code>localRoot</code>, but the publishing scripts are reliant upon both so you will be unable to actually control services. </para></section><section><title>Build DomTool</title><para>You will first need to acquire <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool#">DomTool</ulink>, <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool/Building#">build it</ulink>, and customize the default configuration for your site. </para><para>The minimally required changes are: </para><itemizedlist><listitem><para>Customize <code>config/core/core.sml</code> to override core values </para><itemizedlist><listitem><para><code>sharedRoot</code> should be a directory accessible from all systems that will be part of the domtool cluster. Traditionally this is in afs for a production system. For development it should be something like <code>/home/$USER/domtool/shared</code> </para></listitem><listitem><para><code>localRoot</code> should be <code>/var/domtool</code> for a production installation. For development it should be something like <code>/home/$USER/domtool/local</code>. </para></listitem></itemizedlist></listitem><listitem><para>Create a local <code>config.sml</code>. An example suitable for local development is provided in the source tree at <ulink url="https://git.hcoop.net/?p=hcoop/domtool2.git;a=blob;f=config.example.sml">config.example.sml</ulink>. You will need to customize a few variables: </para><itemizedlist><listitem><para><code>myNode</code> is your machine's short hostname (<code>hostname -s</code> generally) </para></listitem><listitem><para><code>defaultDomain</code> is your machine's domain name (<code>hostname -d</code> generally).  </para></listitem><listitem><para><code>caDir</code> is the location of the domtool certificate authority which must be in a secure location on the domtool dispatcher server only for a production build (writable only by root, and readable but not writable by the domtool user). For a development build. it can be something like <code>/home/$USER/domtool/ca</code>. </para></listitem></itemizedlist></listitem></itemizedlist><para>After you have set up the configuration, build domtool, and it should be able to be bootstrapped. You do not need to install domtool system-wide to test. </para></section><section><title>Bootstrapping Domtool</title><para>There are several <ulink url="https://git.hcoop.net/?p=hcoop/domtool2.git;a=blob;f=bootstrap/README">scripts included with domtool to assist with bootstrapping</ulink>. </para><para>If you are setting up a development environment, the minimal steps are: </para><itemizedlist><listitem><para>Create <code>bootstrap/$defaultDomain.core.ssl.conf</code>, setting <code>ca_dir</code> to the value you used for <code>caDir</code>, and <code>org_domain</code> to <code>$defaultDomain</code>. </para></listitem><listitem><para>Execute <code>cd bootstrap &amp;&amp; ./bootstrap</code> should then create a basic setup. </para></listitem></itemizedlist></section><section><title>Obsolete Notes</title><para>These are included for historical interest / some may be relevant for rewriting the page.  </para><orderedlist><listitem><para>Set up /etc/domtool (or specifically, the SSL CA in there) according to <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool/SslProcedures#">DomTool/SslProcedures</ulink> </para></listitem><listitem><para>Build and install the <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool#">DomTool</ulink> suite as explained in <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool/Building#">DomTool/Building</ulink> and <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/DomTool/Installation#">DomTool/Installation</ulink>. (When creating user 'domtool', you can choose /home/domtool as the home directory) </para></listitem><listitem><para>Edit /etc/init.d/domtool-* to replace shebang line /usr/bin/pagsh.openafs with /bin/sh (or /bin/bash), and replace &quot;/usr/bin/k5start&quot; with &quot;/usr/local/bin/k5start&quot; </para></listitem><listitem><para>Edit /usr/local/bin/domtool-admin-sudo to replace shebang line /usr/bin/pagsh.openafs with /bin/sh (or /bin/bash), and to comment the kinit and aklog lines </para></listitem><listitem><para>Create /usr/local/bin/k5start with the following content and chmod 755 it (remove &quot;\&quot; at the beginning): </para></listitem></orderedlist><screen><![CDATA[\#!/bin/sh
# This counts on BASH_ARGV being a stack (bash v3.0+)
${BASH_ARGV[0]}]]></screen><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="https://wiki.hcoop.net/DomTool/NonHCoopSetup/CategoryNeedsWork#">CategoryNeedsWork</ulink> </para></section></article>