This repo is designed to make it easier to develop aegir and related tools.
Clone this repo and run the prepare.sh
script to setup all of the required
source code.
The included docker-compose.yml
file will launch a running Aegir instance
with the aegir-home
directory mapped to /var/aegir
in the container.
Got feedback? Suggested changes? Visit the repo at http://github.com/aegir-project/development.
Install pre-requisites:
Clone this repo and enter the 'aegir-development' folder:
git clone http://github.com/aegir-project/development aegir-development
cd aegir-development
Run the prepare.sh
script.
bash prepare.sh
This script does the following:
/var/aegir
in the container.Run docker-compose up -d && docker-compose logs -f
:
This will download and launch mysql and aegir containers, detach from the process so it will keep running, and then follows the logs output from the hostmaster container.
You will have to wait a bit for hostmaster to install. Watch the logs for the "Congratulations" message and the one-time-login link.
Once running, you can edit the files in ./aegir/hostmaster-7.x-3.x and get live when loading the site at http://aegir.local.computer
NOTE: The docker-compose.yml
is set to utilize port 80, so you will get an error
if you have any other web server running locally on port 80.
If you do not want this, simply change the docker-compose.yml
file ports to
something else:
ports:
- 8080:80
Using local.computer: The domain name http://local.computer is registered to Aegir contributor and set to resolve to 127.0.0.1, otherwise known as localhost.
There is also a wildcard domain, so any subdomain on local.computer resolves to localhost. This development environment uses the hostname http://aegir.local.computer. When you are creating sites in aegir, if you want to access them without messing with DNS or Hosts file, you can use http://sitename.local.computer as the domain name.
Get into the container:
To get into the server as the aegir user using the terminal, run the command:
docker exec -ti aegir_hostmaster_1 bash
You will be dropped into a bash terminal as the aegir user, in the root folder,
so change to your home directory with cd
if you need to.
aegir@aegir:/$ cd
aegir@aegir:$ drush @hostmaster uli
Remember, the home directory for the aegir
user is mapped to aegir-home
on the docker host (your computer). Feel free to download or edit anything
into that folder.
Running Tests
We have behat tests you should run if you start to work on Aegir.
Drop into bash, cd into the tests folder, run composer install
docker exec -ti aegir_hostmaster_1 bash
aegir@aegir:/$ cd
aegir@aegir:~$ cd tests
aegir@aegir:~/tests$ composer install
Then bin/behat to run the tests:
aegir@aegir:~/tests$ bin/behat
When working on the Dockerfile, docker-compose file, and then aegir itself it can get confusing and repetitive to rebuild your containers. You can use the rebuild.sh
script
opendir(/var/aegir/.drush): failed to open dir: Permission denied
If you receive error messages like this, it's likely because you have SELinux setup.
To fix, run the following command:
chcon -Rt svirt_sandbox_file_t aegir-home