DevOps For PHP Developers by David Mjomba

by David Mjomba · Views: 150 · Format: EPUB · Language: English (en)

Cover of DevOps For PHP Developers by David Mjomba — Free EPUB on AnyEbooksEPUB

of the task. We can group our tasks by following any structure we prefer. Since we are setting up a LEMP server, we can have php, mysql, nginx, common and acl groups. In ansible these groups are referred to as roles. The good thing with roles is that they are self-contained thus, easily sharable between playbooks. We’re good to go! In the ~/devops directory, add a new site.yml file. This will be our play definition file. Next we need a directory to store all our roles; create the roles directory. We will then use ansible-galaxy to create our 5 roles. $ touch site.yml $ mkdir roles $ cd roles $ ansible-galaxy init php $ ansible-galaxy init mysql $ ansible-galaxy init nginx $ ansible-galaxy init common $ ansible-galaxy init acl First, let's give Ansible the list of hosts to use. Define your Ansible Inventory in the format you prefer. I prefer using the INI format: 32 123.45.6.78 ansible_user=root Notice: Since we are using the root account in our server, we will have to explicitly instruct ansible by adding the ansible_user=root parameter; failure to which, it will try to connect using the local user account and fail. Next, open site.yml using your favourite editor. I prefer Visual Studio Code with the YAML and Ansible extensions. Notice: Each playbook consists of a list of plays and each play executed against a list or servers (hosts). The first directive we shall give is a list of hosts that the play should be executed on; all should do for now. --- - hosts: all Next we’ll de

★★★★★

Rate this eBook

File Name:5421cacc7d644ff32c8ed153841328f1.epub
Original Title:DevOps For PHP Developers
Creator / Author:David Mjomba
Language:English (en)
Identifier:ASIN:397238
Publisher:David Mjomba Publishing
Category:Non-fiction
Format:📗 EPUB eBook
File Size:3.5 MB

Community Reviews

Loading verified community reviews...
✍️
Verified Author
View All Books by Author →

Related Non-fiction Titles