One of our missions is to be Easy to Develop.
This is not just for the core team, but also so others can come in and customize the system to their needs without much difficulty.
The source code for provision is available at github.com/aegir-project/provision. The main branch is
The important files and folders are:
- composer.json - Defines the project and the dependencies.
- bin/provision - Executable. Run this to use provision.
- src/ - All the new classes.
- vendor/ - The new vendor directory. All composer libraries get installed here when you run
- .travis.yml - Automated tests for our new branch.
- README.md - The main documentation file.
NOTE: The entire codebase pre-4.x is still in the repository, so _everything else _is legacy code.
$provision->getConfig()to load the CLI config, optionally loaded from ~/.provision.yml
- ContainerAwareInterface: Uses container.thephpleague.com for dependency injection.
$provision->getLogger()->debug(),easy PSR logging.
- BuilderAwareInterface: Access to the Robo Builder.
- and more... API docs coming soon.
A Context represents an object we are tracking, either a Server, Platform, or Site.
Each context type has different properties, defined in the
$context->save() will save the context properties into a YML file. Run provision status to reveal the path to a context's YML file.
$context->verifyCommand()is triggered when the
provision verify command is run
ServerContext "provide" services, while all others "subscribe" to them.
ServerContext::shell_exec() to easily run commands in the Server's config directory, while hiding output, throwing exception with error messages, and showing output when running with