Deploy Magento 2 Like A BOSS
How do you deploy changes to production environment? There are many articles about continuous deployment you may read about. Some of articles are over-detailed with technical details. Rather than going to a point on how to setup or build deployment for your project you become PHD.
It is great to know everything in theory, however reality and complexity of projects are different.
76% of all websites are deployed manually by connecting via SSH and performing necessary "magic" commands. Any TYPO or incorrect command might lead to production downtime or even worth - complete disaster.
Magento 2 deployment requires full attention to details when performing update manually. You have to remember to pull latest changes from your repository, clear outdated files, compile new files, deploy static content, clear cache. Don't forget to clear Varnish cache, especially if you are running multi-node environment with more than one Varnish server.
I am one of these guys who love to automate as much as possible (maybe I am a developer). Of course it requires lots of time and resources to plan automation, find appropriate tools and systems to fit your expectations. That is why I started playing with deployment tools available on the market. Few years ago there were just few of them (e.g. Bamboo, Jenkins etc). Currently there are much more available for us to use.
Recently I successfully deployed my Magento 2 Blog with DeployHQ. I was kind of afraid to start digging into any deployment tools before I met DeployHQ. Maybe because I saw only Bamboo and have no idea where to start. This is not a marketing post or something paid from DeployHQ guys. I am happy to say it took me 15 minutes to figure out and set up my first deploy from BitBucket to DigitalOcean server.
It takes way less effort to update my production environments with simple "Deploy" button click. Maybe I even consider scheduling updates on weekly basis. But definitely it is a way to go.
Question of the Week
Do you use any tools for code deployment? Or Infrastructure deployment? How do you automate your daily work routine?
Send me your answer to email@example.com or in the comments below I will be happy to read.