Simple translation of Vagrantfile into YAML configuration file. The goal is to set up the environment with VirtualBox and Vagrant, quickly and easily using the YAML markup facility.
- Ensure VirtualBox and Vagrant is installed;
- Ensure that the Vagrant plugin Landrush installed;
- Clone this repository;
- Edit the environment.yaml with machines you need; and
- Run 'vagrant up' to up all machines of the environment;
The Vagrantfile read the environment.yaml to up all machines of the environment. Following the example configuration file:
global:
linked_clone: true
landrush: true
domain: lab.com.br
network_prefix: 192.168.200
memory: 1024
cpus: 1
box: centos/7
hosts:
- hostname: infra01
box: centos/7
memory: 512
cpus: 1
provision: ansible
playbook: provision/ansible/infra.yaml
- hostname: infra02
box: centos/7
memory: 512
cpus: 1
- hostname: master01
box: centos/7
hostname: master01.4linux.com.br
memory: 1024
cpus: 1
- hostname: master02
box: centos/7
hostname: master02.4linux.com.br
memory: 1024
cpus: 1
- hostname: node01
box: centos/7
memory: 512
cpus: 1
- hostname: node02
box: centos/7
memory: 512
cpus: 1
- hostname: node03
box: centos/7
memory: 512
cpus: 1Basically this configuration provision seven machines with operating system CentOS 7. Inside in this directory enough run 'vagrant up'. The following directives is possible:
- linked_clone: if linked clone is activated;
- landrush: if landrush plugin is activated;
- domain: the domain name of environment;
- network_prefix: the prefix to private network. Internaly is set a sequence 10 + 1;
- memory: the size of memory RAM for all machines, if not set in local hosts configuration; and
- cpus: the number of cores CPU for all machines, if not set in local host configuration;
- box: the operating system for all machines, if not set in local host configuration;
- hostname: the name of machine in virtualbox;
- box: the operating system how vagrant box to download;
- memory: the size of memory RAM of machine;
- cpus: the number of cores CPU;
- provision: the provisioner (only ansible for a while); and
- playbook: if provisioner is ansible, specify the path of playbook;
- Provision with Puppet and Shell;