- SIMP Enterprise Edition in Vagrant
You need to have the following installed:
- Vagrant
- A virtualization provider for Vagrant such as VirtualBox
- Bolt
Set the environment variable SIMP_LICENSE_KEY
to the contents of a valid SIMP
EE license key.
For example, if your license key is in the file license.key
, the following
command can be used:
export SIMP_LICENSE_KEY=$( cat license.key )
NOTE: Without this environment variable set, the Bolt plan will set up SIMP Community Edition on the SIMP server and will skip the Console/Scanner setup.
Set the SIMP_AGENTS
environment variable to a space-separated list of agent
nodes to manage with Vagrant.
The following agent types are defined:
- win2012r2
- win2016
- win2019
- centos7
- centos8
- oel7
- oel8
- rhel7
- rhel8
(The full list can be seen (or modified) in Vagrantfile.)
For example, to start a Windows 2019 agent and a CentOS 7 agent, use the following command:
export SIMP_AGENTS='win2019 centos7'
NOTE: Without this environment variable set, Vagrant will start all defined agents. This will require a large amount of RAM, and many of the agent types have not been tested and likely will not work.
The following environment variables can be set if the defaults are not desirable:
VAGRANT_IP_SUBNET
: The private IP subnet used to communicate between the VMs. Defaults to10.10.16
.VAGRANT_DOMAIN
: The DNS domain name used by the VMs. Defaults tosimp-ee.test
.BOLT_VERBOSE
: Enable verbose output in the Bolt plan.BOLT_TRACE
: Enable error stack traces from the Bolt plan.BOLT_STREAM
: Enable streaming output from Bolt scripts and commands.SIMP_RELEASE
: Override/etc/yum/vars/simprelease
on the SIMP server.SIMP_RELEASETYPE
: Override/etc/yum/vars/simpreleasetype
on the SIMP server.SIMP_EE_RELEASE
: Override/etc/yum/vars/ee_simprelease
on the SIMP server.SIMP_EE_RELEASETYPE
: Override/etc/yum/vars/ee_simpreleasetype
on the SIMP server.SIMP_RHSM_USER
: Username for registering RHEL nodes with subscription management.SIMP_RHSM_PASS
: Password for registering RHEL nodes with subscription management.
Finally:
vagrant up
The process takes nearly 30 minutes on a fast system with only 2 agents defined, so be prepared to wait.
Once the Console has started, it will be available at http://localhost:6468/.
The remaining configuration is manual.
- Retrieve the registration token, MSI package URL, and RPM package URL from http://localhost:6468/#infrastructure-client.
- Configure the
simp_scanner
Puppet module.Be sure to substitutebolt plan run simp_ee::scanner -t all \ token='<registration token>' \ msi_pkg='<MSI package URL>' \ rpm_pkg='<RPM package URL>'
console.simp-ee.test
forlocalhost
in the package URLs! - Run
puppet agent -t
on all nodes. - Run
simp-scanner scan
on all nodes.
vagrant destroy -f
will stop all VMs and delete them.
Please note: If you have any Red Hat Enterprise Linux systems, you should run
bolt plan run simp_ee::rhsm_unregister -t 'rhel*'
before running vagrant destroy
. Otherwise you will need to remove the nodes
from https://access.redhat.com/management/systems or your local Red Hat Satellite
manually.
The Bolt plan that is used to build out the environment in Vagrant should work with real systems, although this has not been tested.
- Set the
SIMP_LICENSE_KEY
as described above. - On the SIMP server, set the
role
fact topuppet
. This can be done with the following commands:If the name of the SIMP server starts withmkdir -pv /etc/facter/facts.d echo role=puppet > /etc/facter/facts.d/role.txt
puppet
, this step can be skipped. - On the SIMP Console server, set the
role
fact toconsole
. This can be done with the following commands:If the name of the SIMP Console server starts withmkdir -pv /etc/facter/facts.d echo role=console > /etc/facter/facts.d/role.txt
console
, this step can be skipped. - Run the Bolt plan with the targets specified on the command line:
bolt plan run simp_ee -t simpserver,consoleserver,agent1,agent2
Windows agents will not work with the Fedora-supplied vagrant
package. The
required winrm
gem is not available and some of its dependencies will not
resolve with vagrant plugin install
.
Either omit the Windows agents from the SIMP_AGENTS
environment variable or
switch to Hashicorp's vagrant
package.
CentOS 8 agents seem to hang when running under VirtualBox.
Either omit centos8
agents from the SIMP_AGENTS
environment variable or
switch to another virtualization provider.