2020-08-08 02:58:16 +00:00
# Deploying Drutopia updates
2020-07-22 13:16:34 +00:00
2021-05-28 16:04:40 +00:00
## Prerequsites
2022-02-21 16:46:27 +00:00
A bit more PHP than you need, but this will definitely get you ready for composer and friends:
2021-05-28 16:04:40 +00:00
```bash
sudo apt-get install ansible rsync php7.4 php7.4-gd php7.4-mysql php7.4-xml php7.4-curl php7.4-fpm php7.4-sqlite3 php7.4-cli
```
2022-02-21 16:46:27 +00:00
Then follow the commands from:
2021-05-28 16:04:40 +00:00
2022-02-21 16:46:27 +00:00
[getcomposer.org/download ](https://getcomposer.org/download/ )
2021-05-28 16:04:40 +00:00
And then:
```bash
sudo mv composer.phar /usr/local/bin/composer
```
2022-02-21 16:46:27 +00:00
To make working with [Drutopia Platform's recommended Ansible setup ](https://gitlab.com/drutopia-platform/drutopia_host#introduction ) easier (and for the following instructions to work), install Ahoy per its instructions:
[github.com/ahoy-cli/ahoy ](https://github.com/ahoy-cli/ahoy )
Finally, [clone needed Drutopia repositories locally according to the recommended setup ](creating-new-drutopia-site#overall-setup ).
Now you are ready for deploying Drutopia updates on a regular basis.
## Ensure you are up-to-date
2020-07-22 13:16:34 +00:00
```bash
cd ~/Projects/drutopia-platform/drutopia_host/hosting_private
ahoy git-pull-all
```
2021-05-29 08:48:09 +00:00
2022-02-21 16:46:27 +00:00
```
ahoy new-site example
```
And, following the instructions that provides, copy the
```
ansible-vault edit host_vars/elizabeth.mayfirst.org/vault.yml
```
## Prepare appropriate base
```
ahoy deploy-build next
```
## Deploy your site
```
ahoy deploy-site example_test
```
2022-04-01 20:58:18 +00:00
## Putting it all together
```bash
cd ~/Projects/drutopia-platform/drutopia_host/hosting_private
ahoy git-pull-all
ahoy deploy-build next
ahoy deploy-site example_live
```
## If you need to override site configuration:
```bash
ahoy deploy-site-force example_test
```
2022-02-21 16:46:27 +00:00
2021-05-29 08:48:09 +00:00
## Bonus: Keep Drutopia builds with similar available modules
To try to keep various Drutopia-based distributions from diverging too much, at least insofar as available modules, even if they aren't installed, we can use the **meld** (`sudo apt-get install meld`) diff tool to compare and share when posssible.
```bash
meld ~/Projects/agaric/sites/crla/crla-org/composer.json ~/Projects/agaric/sites/geo/composer.json ~/Projects/drutopia-platform/build_source/composer.json ~/Projects/agaric/sites/agaric-com/composer.json
```
When these align in not needing special patches or versions, we can consider dropping a custom build in favor of collaborating on a single one.