Open jonpugh opened 9 years ago
We should take inspiration from Behat.
In behat, you can specify a behat.yml file to choose what classes are loaded when the tests are run.
You can also add your own "FeatureContext" class to the bootstrap.php file in your site's source code, and it will get picked up automatically.
Lets come up with a class that an App can provide to override the EnvironmentFactory similar to how FeatureContext does it for behat tests.
This story is in progress for Docker, at the moment. We can now add to the docker-compose file using the app's .terra.yml file.
As a system administrator I would like to be able to choose from different stack configurations So that I can adjust my hosting to handle different scenarios.
Terra writes docker-compose files dynamically when creating environments.
Currently the stack for an environment is hard coded in EnvironmentFactory::getDockerComposeArray()
We should create the ability to create different "stacks" that each app and environment can choose from.
The default stack is Docker. Other stacks could interact with other PaaS tools to create the environment.
Let's create a
Stack
class that represents the code needed to stand up an environment. We should move the methods likegetDockerComposeArray
to aDockerStack
class.Once that's done let's add a "stack" property to the
EnvironmentFactory
class.