Skip to content

How to set up an ansible environment on a single machine

License

Notifications You must be signed in to change notification settings

hobby65/lab_in_a_box

Repository files navigation

Lab in a Box

Introduction

This documentation will explain how to setup a lab environment for ansible development
on a single computer with Oracle virtualbox as host for the complete environment.
In this documentation we discuss an environment that matches an Enterprise environment
as close as possible.

My goal with this setup was to be fully self contained, no need for external connections
to develop, test and deploy a linux platform. Its your choice to use an external git, like
GitHub or a corporate GIT implementation, but your will be dependant of a network connection
for this. I wanted to be able to work during commutes, where there is no internet connection
availlable.

As a deployment with ansible enviroment depends heavily on DNS, we give one og our machines a doubble function as DNS server. We selected the reposerver for this. Feel free to allocate a seprate VM for this, but if memory is an issue, just folow us.

I am assuming here, that you have some knowledge of linux and the distribution you want to
use. Not everything will be explained 'to the bone'....
For more detail, RTFM... its in the links page

You should be comfortable working with a git implementation.

Be aware that most of the components discussed here are licensed, for most of these there are
free alternatives, which we will mention, but not discuss, except for the repository server
which can act as an alternative for satellite.
If You want to use those alternatives, there is lots of documentation out there...
Links Page

Hardware requirements (minimum):

Creating a Redhat Enterpise environment in a box is resource intensive, so expect to spent
some money in buying hardware for this.

Your system needs to meet the following requirements:

  • 64GB memory (more is better)
  • 1 TB SSD dedicated disk (again, more is better)
  • 4 core CPU
  • virtualization support

Software requirements:

In this documentation we will run on Windows, but this can be setup on Linux as well.

Required software:

  • Windows 10 (Home) or better
  • Oracle VirtualBox 7.0.6 or better
  • Oracle Virtualbox Extension Pack v7.0.6 or better (equal to Virtualbox)
  • HashiCorp Vagrant 2.3.4 or better

Next Steps:

Based on the assumption that your system meets the above requirements, the next steps will be:

Project deployment ansible code

Included in this repository, the code needed to automaticly deploy machines is added.
Look for the labfiles.tgz file, it is a tar archive with 4 git repositries, one play
three roles...
An additional play is also included to configure gitea on a host.
Download link

This code can deploy your VM's on your host using vagrant and the inventory.

Results after configuration and playtime

Here ars a few screenshots of my lab environment that I created
Screenshots

License

TBD

Author

Wilco Folkers

About

How to set up an ansible environment on a single machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published