Hosting with Ansible
All components of Drutopia hosting are public as free/libre open source software as part of our commitment to LibreSaaS.
But you don’t need to know about any of this to have a site on the Drutopia platform.
Nor do you need to use this approach to hosting your own Drutopia site(s), but you can!
As befitting techincal documentation, the main resource is the Drutopia Host README
For a truly custom site, as part of Drutopia’s platform as a service or on your own server, you could have your site’s repository available as a
drutopia_version within the host definition.
Here is the documentation for Drutopia’s private repository. This is for example only (or Drutopia maintainers) as the private hosting list of sites is indeed private.
In order to run builds for the official server(s):
If not already, clone
Clone this project into a subfolder of
Also clone the
build_artifactssite under the
The above can be done with these commands:
git clone email@example.com:drutopia-platform/drutopia_host.git
git clone firstname.lastname@example.org:drutopia-platform/hosting_private.git
git clone email@example.com:drutopia-platform/build_artifacts.git
The contents of
drutopia_host should look like this:
You will have a deploy.log created automatically in the current folder. You may wish to occasionally move this out of the way as it will get rather large.
The commands here assume hosting_private is the current working folder.
Ensure you have connectivity and correctly configured your vault key, etc with:
ansible -i inventory_live -m ping all
Update the entire system (base software, all builds, all sites!). Diff is optional, but I like having it:
ansible-playbook -i inventory ../provision.yml --diff
Update a single member, using whatever builds already exist on the server:
ansible-playbook -i inventory_live ../provision.yml --diff -e "target_member=family_home_test" --tags=members
Individual builds can be updated and pushed to the server. Any builds marked not active will not build, but an individual one can also be targeted (i.e. skip all others) just like target_member:
ansible-playbook -i inventory_live ../provision.yml --diff -e "target_build=stable" --tags="build,push"
Configuration checks are performed prior to import. If a configuration was changed on the server, the site update will stop. To force it to continue, either config_import_force the option for the site, or force ALL sites to import config (recommed to use only when combined with target_member).
ansible-playbook -i inventory_live ../provision.yml --diff -e "config_import_force_all=true,target_member=family_home_test" --tags=members