https://github.com/naramsim/docker-mysql-prom
https://github.com/naramsim/docker-mysql-prom
ansible coding-challenge docker mysql prometheus sysbench
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/naramsim/docker-mysql-prom
- Owner: Naramsim
- Created: 2020-05-14T21:50:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T19:50:41.000Z (almost 6 years ago)
- Last Synced: 2025-05-15T23:13:02.629Z (10 months ago)
- Topics: ansible, coding-challenge, docker, mysql, prometheus, sysbench
- Language: Shell
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-mysql-prom
> This project is just a coding challenge I was asked to do.
- Create a Linux server with Docker installed
- Deploy a MySql DB on Docker
- Deploy a Prom that monitors the DB on Docker
- Deploy a Docker service that reads/writes the DB
- Expose Prom to the Internet
## Architecture
Please look at the code
## Config
There is currently no IaaS code so you have to create on GCP a CentOS machine with a `disk-1` disk attached. Then change the fixed IP you find in the `hosts.yml`.
Before running ansible you should make a copy of the `compose/.env.sample` and change the password written in there.
```sh
cp .env.sample .env
nano .env
```
You should also change the user and public_key in `ansible/roles/identities/`.
## Init
```sh
cd ansible
ansible-playbook -e 'ansible_user=' -i hosts.yml init.yml
```
This will create the user `ansible` on the machine which will be then used by ansible.
To run ansible:
```sh
ansible-playbook -i hosts.yml playbook.yml
```
## Run
I decided not to start the docker containers with Ansible, so you have to login into the instance and:
```sh
bash /opt/application/scripts/bootstrap.sh
```
Open ``
## Improvements