Cloud-Init is a portable standard to unify the delivery of pre-configured machines. They can easyly be reused accross cloud service provider specific distributions and are reliable for dependency installation like
The scripted
deployment is close to the SAP Installation Guide For Linux, where the ansible
is more robust transcript. Following the moto Automate what you know to run manually, change are first released to the scripted
deployment method, then capitalized to ansible
.
The scripted method is also easier to containerize using the Dockerfile specification.
The Vagrantfile leverage the ansible_local provisionner to resolve the issue where Vagrant is supported by the Developper workstation but not Ansible, which noticeably the case for Microsoft Windows.
The
ansible_local
has a performance penalty with respect to theansible
(remote) provisionner, because Vagrant will require to synchronise the repository and install the required dependencies to run Ansible locally.
The following benchmark evaluates Vagrant build time between the Official centos box and the one maintained by Hashicorp. The build time has been evaluated 3 time for each box flavor, using the Scripted and Ansible
Bastion
Machine type | box | version | Antivirus | linked clone | Sybase deployment | build time |
---|---|---|---|---|---|---|
Bastion (1 cpu/ 1024MB) | generic/centos7 | 3.1.8 | off | false | scripted | 00:10:00 |
Bastion (1 cpu/ 1024MB) | centos/7 | 3004.1 | off | false | scripted | 00:11:00 |
Bastion (1 cpu/ 1024MB) | generic/centos7 | 3.1.8 | off | false | Ansible | 00:11:30 |
Bastion (1 cpu/ 1024MB) | centos/7 | 3004.1 | off | false | Ansible | 00:12:00 |
filesystem layout (bastion):
Filesystem Size Used Avail Use% Mounted on
devtmpfs 485M 0 485M 0% /dev
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 496M 13M 483M 3% /run
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/mapper/centos_centos7-root 50G 2.2G 48G 5% /
/dev/mapper/centos_centos7-home 75G 876M 75G 2% /home
/dev/sda1 1014M 131M 884M 13% /boot
tmpfs 100M 0 100M 0% /run/user/1000
Filesystem layout (bastion):
Filesystem Size Used Avail Use% Mounted on
devtmpfs 489M 0 489M 0% /dev
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 496M 6.8M 489M 2% /run
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/sda1 40G 6.9G 34G 18% /
tmpfs 100M 0 100M 0% /run/user/0
tmpfs 100M 0 100M 0% /run/user/1000