Simple script that order new droplet on DigitalOcean and deploy OVPN infrastructure in it.
Usage:
- create config.py from example
- "python3 create.py" - for new droplet
- "python3 delete_all.py" - for deleting all existing
Prerequisites:
- python 3 with modules installed
- working account on DigitalOcean
- imported public key in DigitalOcean account
Algo's steps:
- Order new droplet (virtual machine)
- Open SSH connection by using certificate
- Update && upgrade system
- Create new user (default is root usually), add him to sudoers and add public key
- Install requirements & docker-ce
- Start robhaswell/squid-authenticated container (Squid with user/passw auth)
- Create OVPN infrastructure, start server daemon.
- Generates client's certificate and download it through sftp to user