Ansible playbooks to deploy docker infrastructure on my personal virtual private server as well as some apps I use and develop.
This is a personal project, not intended to be reused. Feel free to copy snippets you find useful though.
Below is a cheat-sheet for myself on what do I have and how things are done, after I revisit the project after a year.
$ cd virtual
$ vagrant up
$ vagrant ssh
virtual:~$ sudo docker ps
Before you run any playbooks, you need a shell with some environment variables set. To load them, typically you do:
$ . .env
In case this file is lost, copy sample.env
to .env
and correct the variable
values.
-
Ping all hosts
$ ansible all -m ping
-
Set up services on single host:
$ ansible-playbook -l virtual playbook-soaring-coupons.yaml
-
Edit ansible vault (where all the secrets go)
$ ansible-vault edit vars/fluent_vault.yaml
-
Shell into running container:
$ docker exec -it fluentd sh
Dokku hosts various apps and databases.
-
List apps:
$ dokku apps:list
-
Connect to running app container:
$ dokku enter soaring-coupons
Fluentd collects and forwards logs to aggregators. Currently these are used:
Static file hosting for openvario opkg repo. Files are hosted from /home/openvario/www
dir and available through http://openvario.lebedev.lt/.
- https://app.freshping.io/ - ping monitoring
- https://www.vhost.lt/ - domain hosting and DNS management
- https://klientams.iv.lt/ - virtual server hosting