> Dev Tools >

Course Overview

Animated Deployment with Ansistrano

  • 1317 students
  • EN Captions
  • EN Script
  • Certificate of Completion

Your Guides

About this course

While the fundamentals of Ansistrano haven't changed, this tutorial is built using Symfony 3, which has significant differences versus Symfony 4 and later.

What PHP libraries does this tutorial use?

// composer.json
{
    "require": {
        "php": ">=5.5.9",
        "doctrine/doctrine-bundle": "^1.6", // 1.6.8
        "doctrine/orm": "^2.5", // v2.7.2
        "incenteev/composer-parameter-handler": "^2.0", // v2.1.2
        "sensio/distribution-bundle": "^5.0.19", // v5.0.20
        "sensio/framework-extra-bundle": "^3.0.2", // v3.0.26
        "symfony/monolog-bundle": "^3.1.0", // v3.1.0
        "symfony/polyfill-apcu": "^1.0", // v1.4.0
        "symfony/swiftmailer-bundle": "^2.3.10", // v2.6.3
        "symfony/symfony": "3.3.*", // v3.3.5
        "twig/twig": "^1.0||^2.0", // v1.34.4
        "doctrine/doctrine-migrations-bundle": "^1.2", // v1.2.1
        "predis/predis": "^1.1", // v1.1.1
        "composer/package-versions-deprecated": "^1.11" // 1.11.99
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0", // v3.1.6
        "symfony/phpunit-bridge": "^3.0", // v3.3.5
        "doctrine/data-fixtures": "^1.1", // 1.3.3
        "hautelook/alice-bundle": "^1.3" // v1.4.1
    }
}

What Ansible libraries does this tutorial use?

# ansible/requirements.yml
-
    src: DavidWittman.redis
    version: 1.2.4
-
    src: ansistrano.deploy
    version: 2.7.0
-
    src: ansistrano.rollback
    version: 2.0.1

Ok, your app is created and it's time to deploy! But how!?

Sure, there are many tools for deployment... but some are too simple... and others are beasts to setup. Instead, try Ansistrano: a powerful deployment tool built on top of Ansible that can get your site deployed quickly and safely:

  • Up and running with Ansitrano as an Ansible role
  • The Ansistrano workflow and versioned file structure
  • Shared files between releases
  • Executing Composer
  • Symfony deployment specifics: running migrations, fixing permissions, etc
  • Rolling back

Next courses in the Dev Tools: Tools, tools, tools! section of the Dev Tools Track!

9 Comments

Sort By
Login or Register to join the conversation
Default user avatar Patrick van Beck 5 years ago

When will this series be released? I am really looking forward to it :)) Good job!

1 | Reply |

Hey Patrick,

It's on early planning stage and we still have no precise release date yet, but we're working on it right now. I *think* it will be released in 1-2 months.

Thanks for the interest and your patience ;)

Cheers!

| Reply |
Fabrice avatar Fabrice 3 years ago

Hello! A tutorial on how to deploy a Symfony 5 application in sight, with the latest news? I would love to learn Deployer or Ansistrano with you, but the tutorials I find are unfortunately not up to date, or I do not understand them, and I like your way of explaining so much!

| Reply |

Hi Kiuega!

Have you watched this Ansistrano tutorial already? Yes, it's about deploying, but it's not tight to the Symfony too much as you think. Yes, we show this tutorial on a Symfony 3 project, but the concepts it shows are still valid for any Symfony version, and actually for any framework, even if it's not a PHP framework. You can use Ansistrano for whatever framework you have - deploy projects written in JS, Ruby, Python, whatever :) You will just need to adjust the playbook to *your* project. Fairly speaking, even if we're talking about Symfony 3 and you have a project written in Symfony 3 - it won't mean it will fit your needs completely, you will have to adapt the playbook to your project anyway, depends on your project and the server where you deploy

Unfortunately, we don't have any plans to upgrade this tutorial in the nearest future, there's a lot of good things in the queue already, BUT please, feel free to give this course a try for your Symfony 5 project. If you stuck somewhere - please, let us know in the comments below the video and we will help you!

Cheers!

1 | Reply |
Default user avatar highermath 5 years ago

Is this still going to happen?

| Reply |

Hey highermath ,

Yes! And it is *inevitable* because we have already recorded a few chapters! So I think we'll start releasing this course the next week.

Cheers!

| Reply |

Thank you both!
It could be interesting to give some info about the reason we need another tool. What about https://deployer.org?
Maybe just a word about Envoy / Deployer / Ansistrano, strengths and weakness of each and how to choose?
Cheers!

| Reply |

Yo Pad!

Great question! Actually, we may very well cover multiple deployment methods here on KnpU... because there are a lot of great ones! I have limited hands-on knowledge at this point of Deployer and Envoy, but here's what I'll say:

* Ansistrano: great because it leverages Ansible, so you have a lot of built-in features from Ansible (and you can re-use your Ansible knowledge). Infinitely flexible
* Deployer: Is not built on top of a system like Ansible, but is specific to PHP, which is nice. Also, writing your deploy in PHP and getting PHP auto-complete is awesome. For me, that's the #1 reason to use Deployer
* Envoy: I think this makes most sense if you know and like the Blade syntax (I don't know it, and don't really like the way it looks). But, I'm certain this works well, as do most things that Taylor Otwell creates. Envoyer (a SAAS built on Envoy) gives you a really nice GUI to make using Envoy even better.

For me, out of these 3, I like Ansistrano because I know Ansible really well. But, the PHP syntax of Deployer calls to me... :)

Cheers!

1 | Reply |

Hey weaverryan ,

I agree with Ryan. But if you're interested in deploying with PHP, you can take a look at https://github.com/EasyCorp.... It's newer than Deployer, but could be interested in Symfony projects. But one more time, Ansible does its job very well, so Ansistrano is more powerful than those tools, and my favorite feature in Ansible is that I can see what tasks were changed and what were skipped, i.e. did nothing on the server. Idempotency of tasks is really cool to have out of the box.

Cheers!

2 | Reply |

Delete comment?

Share this comment

astronaut with balloons in space

"Houston: no signs of life"
Start the conversation!