"A re-usable Ansible role to deploy projects".
Ansible is a provisioning tool rapidly growing in popularity, mainly due to it’s simplicity. But it’s capable of more than just provisioning! In this talk, I’ll walk you through an Ansible role that can be used to deploy your projects. Those familiar with Capistrano wil recognize the method, but I’ll explain it step by step and in the end I’ll show a real-world example from a Symfony2 project: the SweetlakePHP website. (this talk assumes some knowledge of how Ansible works)
9. THE PROBLEM
• Continuous deployment
• Easy maintenance of the deploy procedure.
• Small learning curve.
9
10. THE PROBLEM
• Continuous deployment
• Easy maintenance of the deploy procedure.
• Small learning curve.
• Reuse between projects with little effort.
10
11. WHAT IS A DEPLOY?
Directory structure:
.
!"" releases
| !"" 20140415234508
| #"" 20140415235146
!"" shared
| !"" sessions
| !"" source
| #"" uploads
#"" current -> releases/20140415235146
11
12. WHAT IS A DEPLOY?
Directory structure:
.
!"" releases
| !"" 20140415234508
| #"" 20140415235146
!"" shared
| !"" sessions
| !"" source
| #"" uploads
#"" current -> releases/20140415235146
12
13. WHAT IS A DEPLOY?
1. Update the codebase + configuration
13
14. WHAT IS A DEPLOY?
1. Update the codebase + configuration
2. Install dependencies
14
15. WHAT IS A DEPLOY?
1. Update the codebase + configuration
2. Install dependencies
3. Preserve shared resources
15
16. WHAT IS A DEPLOY?
1. Update the codebase + configuration
2. Install dependencies
3. Preserve shared resources
4. Build tasks
16
17. WHAT IS A DEPLOY?
1. Update the codebase + configuration
2. Install dependencies
3. Preserve shared resources
4. Build tasks
5. Finalize
17