https://github.com/skorupcia/digitalocean_highly_available
DigitalOcean Highly Available Infrastructure with Centos-7
https://github.com/skorupcia/digitalocean_highly_available
ansible centos digitalocean highly-available
Last synced: 11 months ago
JSON representation
DigitalOcean Highly Available Infrastructure with Centos-7
- Host: GitHub
- URL: https://github.com/skorupcia/digitalocean_highly_available
- Owner: skorupcia
- Created: 2024-01-08T20:44:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-25T15:29:19.000Z (over 2 years ago)
- Last Synced: 2025-03-30T23:13:34.331Z (over 1 year ago)
- Topics: ansible, centos, digitalocean, highly-available
- Language: Jinja
- Homepage: https://github.com/geerlingguy/ansible-for-devops
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DigitalOcean Highly Available Infrastructure Centos-7
[](https://github.com/skorupcia/DigitalOcean_Highly_Available/actions/workflows/ci.yml)
## Specifications
macOS: Sonoma 14.2.1
Centos: centos-7-x64
Compared to Geerlingguy files i have decided to create a script that writes ip's and assign them to groups. Unfortunately it leads to additional commands to execute. (Since I wasn't able to get hosts to inventory groups)
## INSTRUCTIONS
1. Add your machine SSH to DigitalOcean account
2. Create API token and add to your DigitalOcean project
3. Update vars files to your personal preferences
a) Update u_token in keys.yml (api_token)
b) Update u_ssh in keys.yml (ssh fingerprint)
c) Update 'api_token' in the end of the generate_hosts.py script
d) Update file location of 'generate_hosts.py' in provisioners/digitalocean.yml
## RUN INSTRUCTIONS
1. Run required roles:
ansible-galaxy install -r requirements.yml
2. Run digitalocean.yml to create droplets and run generate_hosts.py:
ansible-playbook provisioners/digitalocean.yml
#### When vault password applied:
ansible-playbook provisioners/digitalocean.yml --ask-vault-pass
4. Run playbooks with provision.yml file:
ansible-playbook -i hosts.ini provision.yml
5. Check if infrastructure is working simply connecting to varnish ip server:
http://your_varnish_ip
6. For additional safety of your ssh and api key run:
ansible-vault encrypt provisioners/keys.yml
## Droplet Delete
If you would like to delete droplets, simply switch state of "Provision Digitalocean droplets" from PRESENT to ABSENT and run playbook.
## TroubleShooting
1. MacOS - INSTALL CERTIFICATES if your Geerlingguy roles end up with certificate error:
Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/':