Skip to content

Generate your Ansible provisioning for Symfony2, Laravel and Node.js projects

Notifications You must be signed in to change notification settings

fansible/ansible-provisioning-tywin

Repository files navigation

Ansible provisioning for Symfony, Laravel and Node.js

Your application within 1 hour in production with this tool: Tywin

Create easily your Ansible provisioning for Symfony, Laravel and Node.js projects.

Ansible Symfony Laravel Nodejs

Requirements

This have been tested with the Ubuntu OS. It should work with many other various Debian distribution. Feel free to share your advice for the other OS.. This is what you will need to install if you haven't done yet:

  • Python 2.7
  • Ansible (>2.0)
  • Vagrant I advise to download it from their website to have the last version.
  • VirtualBox.
  • nfs sudo apt-get install nfs-kernel-server
  • PyYAML and Jinja2 for python

How to use it

  1. Installation.

    git clone [email protected]:fansible/tywin.git ~/tywin

  2. Generate the default conf

You can generate the default conf by running in the root directory of your project:

python ~/tywin/generate.py

You can now find your provisioning in the devops directory

  1. Create the VM You can create the VM with vagrant up.

  2. Log in your vagrant with vagrant ssh and put your ssh key in the .ssh/authorized_keys file. Log out and try to log in again using ssh ubuntu@IP_OF_YOUR_VAGRANT (MAYBE 10.0.0.10 check your Vagrantfile)

If it's OK you can provision the VM

  1. Provision the VM

Provision it with ansible-playbook -i devops/provisioning/hosts/vagrant devops/provisioning/playbook.yml. If something goes wrong you can go inside your vagrant and try to execute manually in your shell the Ansible task that is failing.

After that, your VM is now ready! You can see your project in your browser at the IP's adress (10.0.0.10 if you haven't changed anything) =)

  1. Now you can do the same for your staging/production environment. Update the file in devops/provisioning/hosts/staging and add the IP or domain of your server.

Database configuration

Change the value of the database configuration in devops/provisioning/group_vars/vagrant

Go further: customize your provisioning

What you can do:

  1. Add your roles in the devops/provisioning/roles directory.

  2. Modify the playbook to call your roles.

  3. Overide vars (in devops/provisioning/vars).

If you want to have more information on the use of Ansible/Vagrant for you development environment, I wrote a blog post about it.

Stay in touch

If you have any question ask me on Twitter !

About

Generate your Ansible provisioning for Symfony2, Laravel and Node.js projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published