Terra is a suite of tools for the purpose of quickly and easily standing up web apps with Docker.
It is designed to be as simple as possible for developers, while being powerful enough to use in production at scale.
With Terra, all you care about is your site's code. Stop wasting time setting up environments. Let terra and docker do all the work for you.
Your .terra.yml file gives you tons of power.
Check out a sample .terra.yml file and put one in your app's source code.
Please join the chat on Gitter. We want as much feedback as possible!
Read the Docs or help improve the docs.
Issues and Story Boarding
Terra was created as a proof of concept. Symfony CLI had proven itself worthy with projects like
- https://github.com/pantheon-systems/terminus
- https://github.com/platformsh/platformsh-cli
- https://github.com/ericduran/flo
- https://github.com/jonpugh/director
The creator of Terra, Jon Pugh, is also the creator of OpenDevShop. He was brought on as a maintainer of the Aegir Project by Christopher Gervais.
Jon wanted to create a new CLI that could replace the Provision project, and service as the backbone of products like Aegir and DevShop.
The goal is to be more than just a simple CLI, more than a great local dev tool, but to also attempt to solve the bigger problems of scaling, testing, deploying, and monitoring web software.
To make having a website as easy as possible throughout it's entire lifetime, from localhost through large scale production, through entirely open source software.
Terra is a human interface for working on, deploying, testing, and scaling web software projects.
Terra makes it quick and painless to manage your projects and environments.
Push a button to get a testing infrastructure.
An "App" is your website. It is the source code for your project. Terra knows the git URL and (will) know the available branches and tags. Terra will help you update your app from it's upstream repository using git.
The Environment is all of the systems needed to run the source code.
The "EnvironmentFactory" class will be pluggable. Out of the box it provides a working docker cluster, but we can extend it to work with a "multiple apache vhost" model or with a different container provider.
Users will be able to use terra to control environments hosted by multiple hosting providers, including localhost all through the same interface.
We wish to make this tool work for everyone. We wish to get feedback from all parties interested in solving these problems in order to prioritize what to work on.
Please join us in the Issue Queues on GitHub and the chat rooms on gitter.
We wanted to start from scalable. Terra's purpose is to make scaling a push button affair.
Currently Terra uses Docker and Docker compose to stand up and scale websites.
This makes it easy to get environments running quickly on hosted servers or on local computers for development.
See https://huboard.com/terra-ops/terra-cli/ for the user story board.
I am going to direct planning in an agile way as much as possible. Please post as much feedback as you can in the issue queues.
- docker
- docker-compose
List all apps on this system.
Add a new app to the system.
Currently only Drupal sites are supported.
Remove an app from the system
Add an environment for an app.
Remove an environment.
Runs docker-compose up
to initiate an environment.
Runs docker-compose stop
to disable an environment.
Looks in your app's .terra.yml file for rebuild_source: @drushalias
. Syncs the database, copies the files, then runs the rebuild hooks.
Provides status information about an environment, including path and URL.
Set the number of "app" containers. This command is a wrapper for docker compose app=5
.
There is a Vagrantfile in the repo that can be used to fire up a linux server with Terra installed.
Use the Vagrant plugin "vagrant-hostsupdater" to automatically set your /etc/hosts file for the VM:
$ vagrant plugin install vagrant-hostsupdater
Since the beginning we knew we had to let users tweak the stack.
We also wanted it to just work, out of the box, so we created "Default" docker-compose stack that you can see here: https://raw.githubusercontent.com/terra-ops/terra-cli/master/docs/docker-compose-example.yml
We allow your app's source code to change its docker-compose.yml
stack right now:
# Specific settings for docker compose go here
docker_compose:
# Overrides will replace any item in the entire docker-compose array.
overrides:
app:
image: wordpress
links:
- storage
environment:
WORDPRESS_DB_HOST: database
WORDPRESS_DB_USER: drupal
WORDPRESS_DB_NAME: drupal
WORDPRESS_DB_PASSWORD: drupal
storage:
image: mongo
This snippet, if put in your apps .terra.yml
file, will replace the drupal container with wordpress, and add & link a MongoDB container.
Anything under "docker_compose: overrides:" is merged with the stock stack, which you can see here: https://raw.githubusercontent.com/terra-ops/terra-cli/master/docs/docker-compose-example.yml
https://github.com/terra-ops/example-drupal
https://github.com/terra-ops/example-drush-make
https://github.com/terra-ops/example-drupal8
Replaces the terra/drupal
docker image with wordpress
https://github.com/terra-ops/example-wordpress
Simply prints the IP address to test scaling.
https://github.com/terra-ops/example-scale
Symfony Terra API is a symfony app. Use it as an example. https://github.com/terra-ops/terra-api
As a symfony app, we are following PSR-2 Coding Standards.
Use 4 spaces for indentation, and follow all the other rules specified at http://www.php-fig.org/psr/psr-2/
NuCivic submitted a working prototype for the 18F Agile BPA.
We used Terra as the recommended method for recreating the site on another server.
See the instructions on setting up http://openfda.nucivic.build on another server using Terra.
Each app you run with terra should have a .terra.yml
file in the root.
To see an example file, see https://github.com/terra-ops/terra-cli/blob/master/docs/.terra.yml
The "Terra API" project serves as a web based interface for Terra. It is built on Drupal 8.
See the terra-api GitHub repo for more information.
Some of the R&D for Terra happened in a project called "director": https://github.com/jonpugh/director-drupal
Director is now deprecated.
There is a striking similarity to this project and Kalabox.
We love Kalabox and the Kalamuna team, but there are a few key differences:
- Terra is designed for all things: local development, testing, and production.
- Terra is written in PHP & Symfony: Kalabox is written in Node JS
- Terra is a proposed platform to power the future of Aegir & Devshop. We hope to recruit a large community from those tools.
- Terra currently extends the kalabox/drush container to offer a container to SSH into.
We hope to collaborate with them on as much as possible.