This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Tinderbox

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
Resources

Tinderbox is a work-in-progress by Magnus Granberg (Zorry) . This article provides instructions on how to setup the required elements necessary in order to get a cluster up and running.

Instructions may be incomplete!

Installation

Prerequisites

  • Install dev-python/django and a web server of your choice (for the web interface).
  • Install Gentoo on VM's.
  • Setup shared storage.
  • Install, configure, and manage a database (SQL).
  • Host a Git repository.
  • Install and configure net-irc/irker

Dependencies

Host

  • Sql
  • Gentoo tree on git
  • /etc/portage on a git
  • Portage
  • Git
  • Irker

Guest

  • Sql
  • Gentoo tree
  • /etc/portage on a git
  • Portage
  • Git
  • Access to logs, distfiles and bin packages

Web

  • Django
  • Sql
  • Gentoo tree on git
  • /etc/portage on a git
  • Portage
  • Access to logs

Storage

  • Distfiles
  • Bin packages
  • Logs
  • Gentoo tree
  • /etc/portage on a git

Configuration

Setup Gentoo tree

We need to clone the Gentoo git tree from https://github.com/gentoo-mirror/gentoo so it can be used from the host, guest, and web. Set it up somewhere and link it to /usr/portage DON'T use emerge --sync to sync.

Setup /etc/portage

The repo should have support for linking. For the guests repo should dirs be hostname/arch_profile_keyword/etc/portage. packages.* should be dirs and include a 99_autounmask file.

  • packages.use should be added from the start
  • Any file in the packages.* dir should start with 00_
  • Host should have hostname/base/etc/portage.
  • The base is for basic setup to use portage API for the host and web code.
  • Base's make.profile should point to a nice and clean profile.
FILE /etc/portage/make.confExample base
# This is for the base config
CHOST="x86_64-pc-linux-gnu"
ACCEPT_KEYWORDS=""
ARCH="amd64"
FEATURES="-metadata-transfer -news distlocks"
ACCEPT_LICENSE="*"
PORTAGE_TMPDIR=/var/tmp
DISTDIR=/var/cache/portage/distfiles
PORT_LOGDIR="/var/log/portage"
GENTOO_MIRRORS="ftp://ftp.sunet.se/pub/Linux/distributions/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
PORTAGE_TMPFS="/dev/shm"
PORTAGE_ELOG_CLASSES=""
PORTAGE_ELOG_SYSTEM=""
PORTDIR_OVERLAY=""
#source /var/cache/layman/make.conf

For the Guest just set it up as you should for a install. Here we use a separate dir for arch_profile_keyword so we can link and use it on many guest with same setup:

root #ls -lsR
4 drwxr-xr-x 3 zorry zorry 4096 Aug 26  2011 sandra.ume.nu
4 drwxr-xr-x 3 zorry zorry 4096 Apr 21  2015 setups
4 drwxr-xr-x 3 zorry zorry 4096 Nov 17  2014 virtual2.ume.nu
./sandra.ume.nu/base/etc/portage:
total 12
4 -rw-r--r-- 1 zorry zorry  522 Mar 23  2015 make.conf
0 lrwxrwxrwx 1 root  root    38 Aug 28  2011 make.globals -> /usr/share/portage/config/make.globals
0 lrwxrwxrwx 1 zorry zorry   46 Feb 16 21:10 make.profile -> /usr/portage/profiles/default/linux/amd64/13.0
4 drwxr-xr-x 2 zorry zorry 4096 Mar 23  2015 repos.conf
./sandra.ume.nu/base/etc/portage/repos.conf:
total 4
4 -rw-r--r-- 1 zorry zorry 161 Mar 23  2015 gentoo.conf
./setups/amd64_default_unstable/etc/portage:
total 32
4 drwxr-xr-x 2 zorry zorry 4096 May 30  2015 env
4 -rw-r--r-- 1 zorry zorry  155 Apr 21  2015 host.conf
4 -rw-r--r-- 1 zorry zorry 1511 Jan  2 13:48 make.conf
0 lrwxrwxrwx 1 zorry zorry   38 Apr 21  2015 make.globals -> /usr/share/portage/config/make.globals
0 lrwxrwxrwx 1 zorry zorry   46 Apr 21  2015 make.profile -> /usr/portage/profiles/default/linux/amd64/13.0
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.accept_keywords
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.mask
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.unmask
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.use
4 drwxr-xr-x 2 zorry zorry 4096 Mar 21  2015 repos.conf
./setups/amd64_default_unstable/etc/portage/env:
total 4
4 -rw-r--r-- 1 zorry zorry 17 May 30  2015 notest.conf
./setups/amd64_default_unstable/etc/portage/package.accept_keywords:
total 0
0 -rw-r--r-- 1 zorry zorry 0 Nov 17  2014 00_defaul_keywords
./setups/amd64_default_unstable/etc/portage/package.mask:
total 4
4 -rw-r--r-- 1 zorry zorry 66 Jul 24  2015 00_default_mask
./setups/amd64_default_unstable/etc/portage/package.unmask:
total 0
0 -rw-r--r-- 1 zorry zorry 0 Nov 17  2014 00_default_unmask
./setups/amd64_default_unstable/etc/portage/package.use:
total 4
4 -rw-r--r-- 1 zorry zorry 85 Jul 24  2015 00_default_on_useflags
./setups/amd64_default_unstable/etc/portage/repos.conf:
total 4
4 -rw-r--r-- 1 zorry zorry 144 Mar 21  2015 gentoo.conf
./virtual2.ume.nu/amd64_default_unstable/etc/portage:
total 36
0 lrwxrwxrwx 1 zorry zorry   57 May 30  2015 env -> ../../../../setups/amd64_default_unstable/etc/portage/env
4 -rw-r--r-- 1 zorry zorry  153 Apr 21  2015 host.conf
4 lrwxrwxrwx 1 zorry zorry   63 Apr 21  2015 make.conf -> ../../../../setups/amd64_default_unstable/etc/portage/make.conf
4 lrwxrwxrwx 1 zorry zorry   66 Apr 21  2015 make.globals -> ../../../../setups/amd64_default_unstable/etc/portage/make.globals
4 lrwxrwxrwx 1 zorry zorry   66 Apr 21  2015 make.profile -> ../../../../setups/amd64_default_unstable/etc/portage/make.profile
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.accept_keywords
0 -rw-r--r-- 1 zorry zorry    0 May 30  2015 package.env
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.mask
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.unmask
4 drwxr-xr-x 2 zorry zorry 4096 Apr 21  2015 package.use
4 lrwxrwxrwx 1 zorry zorry   64 Apr 21  2015 repos.conf -> ../../../../setups/amd64_default_unstable/etc/portage/repos.conf
./virtual2.ume.nu/amd64_default_unstable/etc/portage/package.accept_keywords:
total 4
4 lrwxrwxrwx 1 zorry zorry 99 Apr 21  2015 00_defaul_keywords -> ../../../../../setups/amd64_default_unstable/etc/portage/package.accept_keywords/00_defaul_keywords
0 -rw-r--r-- 1 zorry zorry  0 Nov 17  2014 99_autounmask
./virtual2.ume.nu/amd64_default_unstable/etc/portage/package.mask:
total 4
4 lrwxrwxrwx 1 zorry zorry 85 Apr 21  2015 00_default_mask -> ../../../../../setups/amd64_default_unstable/etc/portage/package.mask/00_default_mask
0 -rw-r--r-- 1 zorry zorry  0 Nov 17  2014 
./virtual2.ume.nu/amd64_default_unstable/etc/portage/package.unmask:
total 4
4 lrwxrwxrwx 1 zorry zorry 89 Apr 21  2015 00_default_unmask -> ../../../../../setups/amd64_default_unstable/etc/portage/package.unmask/00_default_unmask
0 -rw-r--r-- 1 zorry zorry  0 Apr 21  2015 99_autounmask
./virtual2.ume.nu/amd64_default_unstable/etc/portage/package.use:
total 4
4 lrwxrwxrwx 1 zorry zorry 91 Apr 21  2015 00_default_on_useflags -> ../../../../../setups/amd64_default_unstable/etc/portage/package.use/00_default_on_useflags
0 -rw-r--r-- 1 zorry zorry  0 Nov 17  2014 99_autounmask
FILE /amd64_default_unstable/etc/portage/make.confExample setups
CFLAGS="-O2 -pipe -march=native -fno-diagnostics-color"
CXXFLAGS="-O2 -pipe -march=native -fno-diagnostics-color"
CHOST="x86_64-pc-linux-gnu"
USE="X qt3support"
ACCEPT_KEYWORDS="~amd64 amd64"
ABI_X86="32 64"
CPU_FLAGS_X86=""
ACCEPT_LICENSE="*"
PYTHON_TARGETS="python2_7 python3_4 python3_5"
RUBY_TARGETS="ruby20 ruby21 ruby22"
PORTAGE_TMPDIR=/var/tmp
DISTDIR="/var/cache/portage/distfiles"
GENTOO_MIRRORS="ftp://mirror.mdfnet.se/gentoo ftp://trumpetti.atm.tut.fi/gentoo/ http://distfiles.gentoo.org"
EMERGE_DEFAULT_OPTS="-v --binpkg-respect-use=y --rebuild-if-new-rev=y --rebuilt-binaries=y --binpkg-changed-deps=y --autounmask=y --autounmask-write=y --jobs=3 --load-average=5.0"
MAKEOPTS="-j6"
AUTOCLEAN="yes"
NOCOLOR="true"
GCC_COLORS=""
PORTAGE_TMPFS="/dev/shm"
FEATURES="sandbox distlocks parallel-fetch strict -news test-fail-continue fail-clean"
PORTAGE_ELOG_CLASSES=""
PORTAGE_ELOG_SYSTEM="save"
PORTDIR_OVERLAY="/usr/local/portage"
LINGUAS="en"
INPUT_DEVICES="keyboard mouse synaptics evdev"
VIDEO_CARDS="radeon"
ALSA_CARDS="hda-intel intel8x0 intel8x0m"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
CONFIG_PROTECT_MASK="/etc/portage/package.use/99_autounmask"
GRUB_PLATFORMS="pc"

# is in the host.conf
#PORT_LOGDIR="/var/cache/portage/logs/host/setup"
#PKGDIR="/var/cache/portage/packages/host/setup"
source host.conf

# for layman stuff
#source /var/cache/layman/make.conf
CODE Example setups
#PORT_LOGDIR="/var/cache/portage/logs/virtual2.ume.nu/amd64_default_unstable"
#PKGDIR="/var/cache/portage/packages/virtual2.ume.nu/amd64_default_unstable"

See also