Date: Sun, 18 Nov 2012 15:11:38 +0000 (UTC) From: Mark Linimon <linimon@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r40068 - head/en_US.ISO8859-1/articles/portbuild Message-ID: <201211181511.qAIFBcOl050829@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: linimon Date: Sun Nov 18 15:11:38 2012 New Revision: 40068 URL: http://svnweb.freebsd.org/changeset/doc/40068 Log: Completely overhaul the "new head node" section, based on an install from scratch done here in Austin. I am aware that there are various sins in the markup and whitespace. These will be fixed with subsequent commits. Modified: head/en_US.ISO8859-1/articles/portbuild/article.xml Modified: head/en_US.ISO8859-1/articles/portbuild/article.xml ============================================================================== --- head/en_US.ISO8859-1/articles/portbuild/article.xml Sun Nov 18 15:09:04 2012 (r40067) +++ head/en_US.ISO8859-1/articles/portbuild/article.xml Sun Nov 18 15:11:38 2012 (r40068) @@ -2771,39 +2771,72 @@ ln -s ../<replaceable>arch</replaceable> </step> <step> - <para>For each supported arch, add a - <literal>ports-<replaceable>${arch}</replaceable></literal> - user and group. Add them to the <literal>wheel</literal> - group. They should have the <literal>'*'</literal> password. - Also, similarly, create the <literal>ports</literal> and - <literal>portmgr</literal> users.</para> + <para>Create a user to own the <application>portbuild</application> + repository, such as <literal>portmgr</literal>, and add it + to the <literal>wheel</literal> group. It should have the + <literal>'*'</literal> password.</para> </step> <step> - <para>For each supported arch, create - <filename>/home/ports-<replaceable>${arch}/.ssh/</replaceable></filename> - and populate <filename>authorized_keys</filename>. </para> + <para>Add the following to <filename>/boot/loader.conf</filename>:<screen> +console="vidconsole,comconsole"</screen> + </para> </step> -<!-- NOTYET <step> - <para>Also add the following users:<screen> -squid:*:100:100::0:0:User &:/usr/local/squid:/bin/sh -ganglia:*:102:102::0:0:User &:/usr/local/ganglia:/bin/sh</screen> + <para>We run the cluster on UTC. If you have not set the clock + to UTC: + <screen>cp /usr/share/zoneinfo/Etc/UTC etc/localtime</screen> </para> - <para>Add them to <filename>/etc/group</filename> as well.</para> </step> ---> <step> - <para>Create the appropriate files in - <filename>/etc/.ssh/</filename>.</para> + <para>Create the appropriate + <filename>etc/rc.conf</filename>.</para> + + <para>Required entries:<screen> +hostname="<replaceable>${hostname}</replaceable>" +sshd_enable="YES" +</screen> + + <para>Recommended entries:<screen> +background_fsck="NO" +clear_tmp_enable="YES" +dumpdev="AUTO" +fsck_y_enable="YES" + +apache22_enable="YES" +apache_flags="" +apache_pidfile="/var/run/httpd.pid" +gmetad_enable="YES" +gmond_enable="YES" +inetd_enable="YES" +# XXX MCL these don't work! +#inetd_flags="-R 10000 -lw" +mountd_enable="YES" +nfs_server_enable="YES" +nfs_server_flags="-u -t -n 12" +nfs_remote_port_only="YES" +ntpd_enable="YES" +ntpdate_enable="YES" +ntpdate_flags="north-america.pool.ntp.org" +rpcbind_enable="YES" +rpc_lockd_enable="NO" +rpc_statd_enable="YES" +sendmail_enable="NONE" +smartd_enable="YES" +</screen> + </para> </step> <step> - <para>Add the following to <filename>/boot/loader.conf</filename>:<screen> -console="vidconsole,comconsole"</screen> - </para> + <para>Create <filename>etc/resolv.conf</filename>, if + necessary.</para> + </step> + + <step> + <para>Create the appropriate files in + <filename>/etc/ssh/</filename>.</para> </step> <step> @@ -2820,9 +2853,6 @@ ttyu0 "/usr/libexec/getty std.9600" </para> </step> - <step> - <para>TBA</para> - </step> </procedure> </sect2> @@ -2835,22 +2865,33 @@ ttyu0 "/usr/libexec/getty std.9600" <step> <para>Create a <application>zfs</application> volume named <filename>a</filename> and mount it on - <filename>/a</filename>:<screen> -# zpool create a mirror da1 da2 mirror da3 da4 mirror da5 da6 mirror da7 da8</screen> + <filename>/a</filename>. An example:<screen> +&prompt.root; zpool create a mirror da1 da2 mirror da3 da4 mirror da5 da6 mirror da7 da8</screen> </para> </step> <step> - <para>Set up the base portbuild directory:<screen> -# mkdir -p /a/portbuild -# cd /a/portbuild -# chown portmgr:portmgr . -# chmod 775 .</screen> + <para>Create the portbuild directory:<screen> +&prompt.root; mkdir -p /a/portbuild +</screen> </para> </step> <step> - <para>TBA</para> + <para>Create and mount a new <application>zfs</application> + filesystem on it: + <screen>zfs create -o mountpoint=/a/portbuild a/portbuild</screen> + </para> + </step> + + <step> + <para>Set up the portbuild directory:<screen> +&prompt.root; cd /a/portbuild +&prompt.root; chown portmgr:portmgr . +&prompt.root; chmod 775 . +&prompt.root; ln -sf /a/portbuild /var/portbuild +</screen> + </para> </step> </procedure> @@ -2876,8 +2917,8 @@ ttyu0 "/usr/libexec/getty std.9600" <procedure> <step> <para>The following ports (or their latest successors) are required:<screen> -databases/py-pysqlite23 -databases/py-sqlalchemy +databases/py-sqlite3 +databases/py-sqlalchemy (only SQLITE is needed) devel/git (WITH_SVN) devel/py-configobj devel/py-setuptools @@ -2886,13 +2927,13 @@ net/nc net/rsync sysutils/ganglia-monitor-core (with GMETAD off) sysutils/ganglia-webfrontend (WITHOUT_X11) -www/apache22 (with EXT_FILTER and THREADS)</screen> +www/apache22 (with EXT_FILTER)</screen> </para> - <para>Expect those to bring in:<screen> + <para>Expect those to bring in, among others:<screen> databases/sqlite3 -lang/perl-5.12 -lang/python27</screen> +lang/perl-5.14 (or successor) +lang/python27 (or sucessor)</screen> </para> <para>The following ports (or their latest successors) are strongly suggested:<screen> @@ -2900,7 +2941,7 @@ benchmarks/bonnie++ devel/ccache mail/postfix net/isc-dhcp41-server -ports-mgmt/pkg_cutleaves +ports-mgmt/pkg ports-mgmt/pkg_tree ports-mgmt/portaudit ports-mgmt/portmaster @@ -2913,26 +2954,242 @@ sysutils/smartmontools</screen> </step> <step> - <para>Configure mail by doing the following: TBA. + <para>If not already created, add the following users:<screen> +squid:*:100:100::0:0:User &:/usr/local/squid:/bin/sh +ganglia:*:102:102::0:0:User &:/usr/local/ganglia:/bin/sh</screen> </para> + + <para>Add them to <filename>/etc/group</filename> as well.</para> </step> + + <step> + <para>Configure mail by doing the following:</para> + + <para>TBA.</para> + </step> + </procedure> </sect2> - <sect2 id="pointyhat-other"> - <title>Other</title> + <sect2 id="pointyhat-repo"> + <title>Setting up and configuring the portbuild repository</title> <procedure> <step> - <para>TBA</para> + <para>Set up an account with subversion config files + installed. Again, we generally use + <replaceable>portmgr</replaceable>.</para> + </step> + + <step> + <para>As that user, set up the repository:<screen> +&prompt.user; svn checkout svn://svn.freebsd.org/base/projects/portbuild /a/portbuild +</screen> + </para> + </step> + + <step> + <para>Configure how build slaves will talk to your server + by making the following changes to + <filename>/var/portbuild/conf/client.conf</filename>:</para> + + <itemizedlist> + + <listitem> + <para>Set <makevar>CLIENT_NFS_MASTER</makevar> to wherever + your build slaves will PXE boot from. (Possibly, the + hostname of your server.)</para> + </listitem> + + <listitem> + <para>Set <makevar>CLIENT_BACKUP_FTP_SITE</makevar> + to a backup site for FTP fetches; again, possibly + the hostname of your server.</para> + </listitem> + + <listitem> + <para>Set <makevar>CLIENT_UPLOAD_HOST</makevar> to + where completed packages will be uploaded.</para> + </listitem> + + </itemizedlist> + + <para>Most of the other default values should be fine.</para> + </step> + + <step> + <para>Most of the default values in + <filename>/var/portbuild/conf/common.conf</filename> + should be fine. This file holds definitions used by + both the server and all its clients.</para> + </step> + + <step> + <para><filename>/var/portbuild/conf/make.conf</filename> + is most likely obsolete.</para> + </step> + + <step> + <para>Configure the server by making the following changes to + <filename>/var/portbuild/conf/server.conf</filename>:</para> + + <itemizedlist> + + <listitem> + <para>Set <makevar>SUPPORTED_ARCHS</makevar> to the + list of architectures you wish to build packages for.</para> + </listitem> + + <listitem> + <para>For each source branch you will be building for, set + <makevar>SRC_BRANCHES</makevar> and + <makevar>SRC_BRANCH_<replaceable>branch</replaceable>_TAG</makevar> + as detailed in <xref linkend=NEW-BRANCH-PRE-QMANAGER>. + You should not need to change + <makevar>SRC_BRANCHES_PATTERN</makevar>.</para> + </listitem> + + <listitem> + <para>Set <makevar>UPLOAD_DIRECTORY</makevar>, + <makevar>UPLOAD_TARGET</makevar>, and + <makevar>UPLOAD_USER</makevar> as approprite + for your site.</para> + </listitem> + + <listitem> + <para>Set <makevar>MASTER_URL</makevar> to the http + URL of your server. This will be stamped into the + package build logs and the indices thereof.</para> + </listitem> + + </itemizedlist> + + <para>Most of the other default values should be fine.</para> + </step> + + </procedure> + + </sect2> + + <sect2 id="pointyhat-pre-qmanager"> + <title>pre-<application>qmanager</application></title> + + <procedure> + + <step> + <para>For each architecture, follow the steps in + <xref linkend=NEW-ARCH-PRE-QMANAGER>.</para> + </step> + + </procedure> + + </sect2> + + <sect2 id="pointyhat-qmanager"> + <title><application>qmanager</application></title> + + <procedure> + + <step> + <para>Copy the following files from + <filename>/var/portbuild/conf/etc/rc.d</filename> to + <filename>/usr/local/etc/rc.d</filename>:<screen> +buildproxy.sh +pollmachine.sh +qmanager.sh</screen> + </para> + + <para>As root, start each one of them. You may find it handy + to start each under <application>screen</application> for + debugging purposes.</para> + </step> + + <step> + <para>Initialize the <application>qmanager</application> + database's acl list:<screen> +&prompt.root; python /var/portbuild/qmanager/qclient add_acl name=deny_all uidlist= gidlist= sense=0 +</screen></para> + </step> + + </procedure> + + </sect2> + + <sect2 id="pointyhat-src-ports-repos"> + <title>Creating src and ports repositories</title> + + <procedure> + + <step> + <para>Run the following commands manually to create the + <literal>src</literal> and <literal>ports</literal> + repositories, respectively:<screen> +&prompt.user; sudo /var/portbuild/scripts/updatesnap.ports +&prompt.user; sudo /var/portbuild/scripts/updatesnap +</screen></para> + + <para>These will be periodically run from the root + <filename>crontab</filename>, which you will + install below.</para> </step> </procedure> </sect2> + <sect2 id="pointyhat-other-services"> + <title>Other services</title> + + <procedure> + + <step> + <para>Configure + <filename>/usr/local/etc/apache22/httpd.conf</filename> + as appropriate for your site.</para> + </step> + + <step> + <para>Copy <filename>/var/portbuild/conf/apache.conf</filename> + to the appropriate <filename>Includes</filename> subdirectory, e.g., + <filename>/usr/local/etc/apache22/Includes/apache.conf</filename>. + Configure it as appropriate for your site.</para> + </step> + + <step> + <para>Set up <filename>/var/portbuild/crontab/root</filename> as + the root crontab via <command>crontab -e</command>. If you do + not support all the archs listed there, make sure to comment out + the appropriate <application>dologs</application> entries.</para> + </step> + + <step> + <para>If your build slaves will be pxebooted, make sure to + enable the <application>tftp</application> entries in + <filename>/etc/inetd.conf</filename>.</para> + </step> + + </procedure> + + </sect2> + + <sect2 id="pointyhat-finishing-up"> + <title>Finishing up</title> + + <procedure> + + <step> + <para>For each architecture, follow the steps in + <xref linkend=NEW-ARCH-POST-QMANAGER>.</para> + </step> + + </procedure> + + <para>You should now be ready to build packages.</para> + + </sect2> + </sect1> <sect1 id="disk-failure">
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211181511.qAIFBcOl050829>