This projects helps manage a CentOS instance on DigitalOcean. After the setup, the CentOS will have:
- Installed and running Docker including
docker-compose
- Installed and running Traefik
We assume that a Droplet with CentOS 7.5+ is already running. We further assume, the CentOS machine can already be accessed with SSH as 'root':
ssh root@<ip>
should work, otherwise we cannot perform the setup successfully!
Make sure to have Python 3.6.3 (or higher)
installed before running ./bootstrap.sh
.
Run ./bootstrap.sh
on your local machine to install all dependencies
locally. Managing the CentOS setup is done by
Fabric. All local dependencies are installed via
Pipenv so your system's Python will not be
touched.
pipenv run fab -l
Prepare the machine initially. NOTE: Please run the command with --help
before actually executing it. This is a one time command and running it
multiple times may produce unexpected results!
pipenv run fab -H root@<ip> bootstrap.centos --help
pipenv run fab -H <ip> bootstrap.docker --help
Upload the docker-compose.yml
with the basic setup of Traefik
pipenv run fab -H <ip> infra.setup --help
Use one of the following commands to manage the docker compose stack
pipenv run fab -H <ip> infra.up --help
pipenv run fab -H <ip> infra.down --help
pipenv run fab -H <ip> infra.ps --help
If you are not yet using DigitalOcean, get a jump start by using our referral link. Setting up your own account using our referral link will give you $100 to use over the next 60 days. Pretty cool of them, isn't it?