3.7.1. Environment Preparation

3.7.1.1. Getting Started

Warning

Please use a non-root user for building SIMP!

3.7.1.1.1. Ensure Sufficient Entropy

The SIMP build generates various keys and does quite a bit of package signing. As such, your system must be able to keep its entropy pool full at all times. If you check /proc/sys/kernel/random/entropy_avail and it shows a number below 1024, then you should either make sure that rngd is running and pointed to a hardware source (preferred) or install and use haveged.

$ sudo yum install haveged
$ sudo systemctl start haveged
$ sudo systemctl enable haveged

3.7.1.2. Set Up Ruby

We highly recommend using RVM to make it easy to develop and test against several versions of Ruby at once without damaging your underlying Operating System.

3.7.1.2.1. RVM Installation

The following commands, taken from the RVM Installation Page can be used to install RVM for your user.

$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys \
    409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby=2.1.9
$ source ~/.rvm/scripts/rvm

3.7.1.2.2. Set the Default Ruby

You’ll want to use Ruby 2.1.9 as your default RVM for SIMP development.

$ rvm use --default 2.1.9

Note

Once this is done, you can simply type rvm use 2.1.9.

3.7.1.2.3. Bundler

The next important tool is Bundler. Bundler makes it easy to install Gems and their dependencies. It gets this information from the Gemfile found in the root of each repo. The Gemfile contains all of the gems required for working with the repo. More info on Bundler can be found on the Bundler Rationale Page and more information on Rubygems can be found at Rubygems.org.

$ rvm all do gem install bundler

3.7.1.3. Set Up Docker

Docker is typically provided by an OS repository. You may need to enable that repository depending on your distribution.

$ sudo yum install docker

The Docker package may not provide a dockerroot group. If it does not exist post installation, create it:

$ sudo groupadd dockerroot

Allow your (non-root) user to run docker:

$ sudo usermod -aG dockerroot <user>

When you build your system make sure you set the default size for the docker container or the iso build may not work properly:

in /etc/sysconfig/docker-storage:


DOCKER_STORAGE_OPTIONS= –storage-opt dm.basesize=100G

Note

You may need to log out and log back in before your user is able to run as dockerroot.

As root, edit /etc/docker/daemon.json and change the ownership of the docker daemon socket:

{
  "live-restore": true,
  "group": "dockerroot"
}

Start the docker daemon:

$ sudo systemctl start docker
$ sudo systemctl enable docker