Update README
This commit is contained in:
parent
9b9a0e5545
commit
49bb55087d
1 changed files with 12 additions and 18 deletions
30
README.md
30
README.md
|
@ -1,15 +1,15 @@
|
|||
# vps
|
||||
|
||||
This repository contains all the files I use to manage services hosted on [viyurz.fr](https://viyurz.fr).
|
||||
This repository contains all the files I use to manage my services hosted on [viyurz.fr](https://viyurz.fr).
|
||||
|
||||
## Requirements
|
||||
|
||||
### Ansible
|
||||
### Initial setup
|
||||
|
||||
Install Ansible:
|
||||
Run the setup script:
|
||||
|
||||
```
|
||||
sudo apt install -y ansible
|
||||
```sh
|
||||
./setup.sh
|
||||
```
|
||||
|
||||
### SSL certificates
|
||||
|
@ -34,6 +34,10 @@ sudo zerossl-bot certonly --nginx -m viyurz@viyurz.fr -d turn.viyurz.fr
|
|||
sudo certbot certonly --nginx -d mail.viyurz.fr
|
||||
```
|
||||
|
||||
### Secrets
|
||||
|
||||
Copy the existing `secrets.yml.example` file to `secrets.yml` and fill the variables.
|
||||
|
||||
### Storagebox
|
||||
|
||||
Add credential:
|
||||
|
@ -45,22 +49,12 @@ username=MYUSERNAME
|
|||
password=MYPASSWORD
|
||||
```
|
||||
|
||||
Copy & edit file `fstab`.
|
||||
|
||||
## Secrets
|
||||
|
||||
Copy the existing `secrets.yml.example` to `secrets.yml`, run `ansible-vault encrypt secrets.yml` to encrypt the file with a password, and finally edit the newly encrypted file with `ansible-vault edit secrets.yml`.
|
||||
|
||||
If you want to change the vault password run `ansible-vault rekey secrets.yml`.
|
||||
Copy the file `fstab` and edit it accordingly (username and potentially uids/gids).
|
||||
|
||||
## Backups
|
||||
|
||||
Run the `backup-services.yml` playbook once to setup the passphrase file.
|
||||
|
||||
After that, you can create a root cronjob to run this playbook without requiring interactivity:
|
||||
Create a cronjob to periodically backup all projects:
|
||||
|
||||
```
|
||||
0 4 * * * export ANSIBLE_ROLES_PATH=/home/viyurz/vps/roles/; /usr/bin/ansible-playbook /home/viyurz/vps/playbooks/backup-services.yml -e include_secrets=false -e selected_projects=''
|
||||
0 4 * * * /home/viyurz/vps/manage.py backup ''
|
||||
```
|
||||
|
||||
Here we leave `selected_projects` empty to backup all projects.
|
||||
|
|
Loading…
Reference in a new issue