Here are the steps to get up and running with Trellis.
For further information, please visit the Trellis documentation or visit the roots discourse – https://discourse.roots.io/
Local development setup
Create a directory on your local computer,
mkdir yoursite.com && cd yoursite.com
Make sure you have write permissions to the folder then grab a copy of Trellis from the git repository.
git clone --depth=1 firstname.lastname@example.org:roots/trellis.git && rm -rf trellis/.git
Do the same for Bedrock
git clone --depth=1 email@example.com:roots/bedrock.git site && rm -rf site/.git
Edit the development sites file
In this file, replace any reference to “example” with the correct name of your site.
Edit the development vault file
Again, change example to the correct site name and change any of the development passwords if required.
Change to the trellis directory in your terminal
then run the vagrant up command
Enter your administrator password when requested. Then sit back and allow the magic to happen. Your dev site will be ready in between 0-10 time units. How does that even work? Well, I’m not going to go into it here, but it does! Most times. Unless you have permission issues or other minor tweaks that need to be made. A bit of googling will normally get things flowing, but drop me a comment if you get any weird errors 🙂
Staging / Production
Today is V-Day. I think my next sentence contains the most Vs in any sentence in the history of the English language.
In this post I examine Vagrant, Varying Vagrant Vagrants and Variable VVV and how they can be used to simplify development environment setup.
Yes, really, those are their real names.
Virtualisation is a key component of DevOps for local development environments. Virtualising your dev setup provides a number of benefits including ease of replication and an increased ability to automate repetitive tasks.
These three tools, used together, provide an automated process for quickly and simply creating local virtual development environments for WordPress.
Vagrant is an open source software tool to create and manage local development environments. Vagrant is used in conjunction with other virtualisation software such as VirtualBox or VMware.
Varying Vagrant Vagrants
Varying Vagrant Vagrants is an open source vagrant configuration tailored for WordPress development. VVV includes required software for WordPress development including NGINX as the webserver, MariaDB for the database and PHP.
Variable VVV builds on top of Varying Vagrant Vagrants to further improve and automate the setup process.
Set up a local dev environment using Variable VVV.
Install all the required software:
Once all the requirements are installed, setting up a development WordPress site is as easy as browsing to the local vagrant directory directory, in my case:
Variable VVV will then ask a series of questions about your WordPress install and, all things going well, set up a working WordPress development environment for you.
In this series I examine a number of options for setting up working DevOps processes in a WordPress development context. Through a number of examples I demonstrate how DevOps can be utilised to improve our development practice by promoting a professional, structured approach to managing WordPress development.
But first, a quick introduction. What is DevOps other than a pretty cool sounding name reminiscent of SpecOps?
DevOps is a term covering a wide range of tools, technologies and processes. Expanding the word helps to understand its meaning. DevOps stands for Development Operations and revolves around the tasks necessary to efficiently manage the development process. A particular focus of DevOps is the automation of regular activities.
DevOps can provide benefits to processes throughout the entire development infrastructure. From setting up a local development environment to managing releases to the production environment.
There are many reasons to include DevOps in your WordPress development workflow. These benefits include:
- Increased speed and consistency of development
- Increased efficiency and reliability of deployment
- Improved quality of final product
- Increased speed of delivering final product
The main areas I focus on are:
DevOps is not a quick fix. It requires careful planning and preparation with a particular motivation to develop and deploy in a structured and organised manner. If your aim is to quickly set up a one-off website which will require little or no maintenance then spending time on a DevOps set up will likely be overkill. However, if you need a repeatable and professional practice for consistently developing quality websites then it is going to be time well spent.
While the initial setup and configuration will take some thought and time, the benefits will soon make themselves apparent.
I will examine and demonstrate a number of tools available for DevOps processes. These will include:
* Really? Variable Varying Vagrant Vagrants?!