See https://github.com/fansible/tywin for the newer version.
#symfony-ansible
This repo will provide you an easy set-up for your symfony project. It provide the Vagrantfile to create your Ubuntu Trusty 64bits VM and it uses Ansible to provision it. You can also use Ansible to provision your remote server. I have also added a sample configuration for Capifony; a tool to deploy your code on your server.
TL;DR Ansible to configure your servers/VMs and Capifony to deploy the code on your servers.
I have made a basic Ansible provisioning that will be sufficient to run symfony but you need to customize it a bit more. If so you should have a look at the list of our best roles.
Have a look at the vagrant's documentation for more information.
You can modify the app_dev.php to be able to access it. You are done.
You can decrypt my sample encrypted file with the "test" password:
ansible-vault decrypt vars/encrypted-vars.yml
To run your ansible script you'll need to add the --ask-vault-pass
tag.
So it becomes something like: ansible-playbook -i provisioning/hosts/prod provisioning/playbook.yml -u root --ask-vault-pass
More information on the official ansible's doc.
To start the VM : vagrant up
To provision the VM : vagrant provision
To log in the VM : vagrant ssh
To stop the VM : vagrant halt
To delete the VM : vagrant destroy
If your deployment fails, you can use bundle exec cap prod deploy --debug
to enter a step by step mode.
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ source ./hacking/env-setup
Many thanks to kosssi for his many advices.