Orchestrating multi-tier application deployment on KVM VM
Now, let's learn how to install multi-tiered applications. Pushing the definition to its smallest extreme, we are going to install a LAMP server using a simple Ansible playbook.
The tasks that need to be done are simple enough – we need to install Apache, MySQL, and PHP. The L part of LAMP is already installed, so we are not going to go through that again.
The difficult part is the package names: in our demonstration machine, we are using CentOS7 as the operating system and its package names are a little different. Apache is called httpd
and mysql
is replaced with mariaDB
, another engine that is compatible with MySQL. PHP is luckily the same as on other distributions. We also need another package named python2-PyMySQL
(the name is case sensitive) in order to get our playbook to work.
The next thing we are going to do is test the installation by starting all the services and creating the simplest .php
...