Skip to content

Commit 3d5cbe0

Browse files
author
nikitadugar
committed
initial commit
0 parents  commit 3d5cbe0

File tree

14 files changed

+384
-0
lines changed

14 files changed

+384
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ignored files
2+
.idea
3+
*.iml
4+
*.zip
5+
molecule

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
repos:
3+
4+
- repo: https://github.com/pre-commit/pre-commit-hooks.git
5+
rev: v2.2.3
6+
hooks:
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
- id: mixed-line-ending
10+
- id: check-byte-order-marker
11+
- id: check-executables-have-shebangs
12+
- id: check-merge-conflict
13+
- id: debug-statements
14+
- id: check-yaml
15+
- id: check-added-large-files
16+
17+
- repo: https://github.com/ansible/ansible-lint.git
18+
rev: v4.1.0
19+
hooks:
20+
- id: ansible-lint
21+
files: \.(yaml|yml)$

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Cloud Drove
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export GENIE_PATH ?= $(shell 'pwd')/../../../genie
2+
3+
include $(GENIE_PATH)/Makefile

README.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<!-- This file was automatically generated by the `geine`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. -->
2+
3+
4+
<p align="center"> <img src="https://user-images.githubusercontent.com/50652676/62451340-ba925480-b78b-11e9-99f0-13a8a9cc0afa.png" width="100" height="100"></p>
5+
6+
<h1 align="center">
7+
Ansible Role Docker MySQL Node Exporter
8+
9+
10+
</h1>
11+
12+
<p align="center" style="font-size: 1.2rem;">
13+
This ansible role is used to setup MySQL node exporter with docker.
14+
</p>
15+
16+
<p align="center">
17+
18+
<a href="https://www.ansible.com">
19+
<img src="https://img.shields.io/badge/Ansible-2.8-green?style=flat&logo=ansible" alt="Ansible">
20+
</a>
21+
<a href="LICENSE.md">
22+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="Licence">
23+
</a>
24+
<a href="https://ubuntu.com/">
25+
<img src="https://img.shields.io/badge/ubuntu-16.x-orange?style=flat&logo=ubuntu" alt="Distribution">
26+
</a>
27+
<a href="https://ubuntu.com/">
28+
<img src="https://img.shields.io/badge/ubuntu-18.x-orange?style=flat&logo=ubuntu" alt="Distribution">
29+
</a>
30+
31+
32+
</p>
33+
<p align="center">
34+
35+
<a href='https://facebook.com/sharer/sharer.php?u=https://github.com/clouddrove/ansible-role-docker-mysql-node-exporter'>
36+
<img title="Share on Facebook" src="https://user-images.githubusercontent.com/50652676/62817743-4f64cb80-bb59-11e9-90c7-b057252ded50.png" />
37+
</a>
38+
<a href='https://www.linkedin.com/shareArticle?mini=true&title=Ansible+Role+Docker+MySQL+Node+Exporter&url=https://github.com/clouddrove/ansible-role-docker-mysql-node-exporter'>
39+
<img title="Share on LinkedIn" src="https://user-images.githubusercontent.com/50652676/62817742-4e339e80-bb59-11e9-87b9-a1f68cae1049.png" />
40+
</a>
41+
<a href='https://twitter.com/intent/tweet/?text=Ansible+Role+Docker+MySQL+Node+Exporter&url=https://github.com/clouddrove/ansible-role-docker-mysql-node-exporter'>
42+
<img title="Share on Twitter" src="https://user-images.githubusercontent.com/50652676/62817740-4c69db00-bb59-11e9-8a79-3580fbbf6d5c.png" />
43+
</a>
44+
45+
</p>
46+
<hr>
47+
48+
49+
50+
We eat, drink, sleep and most importantly love **DevOps**. DevOps always promotes automation and standardisation. While setting up various environments like local, dev, testing, production, etc. it is critical to maintain the same environment across. This can easily be achieved using automating the environment setup & installation with the help of ansible-playbooks.
51+
52+
Smaller roles are created for each environment elements; which also include tasks & tests. These roles can then be grouped together in [ansible-playbook](https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html) to achieve the desired yet consistent results.
53+
54+
55+
56+
## Prerequisites
57+
58+
This module has a few dependencies:
59+
60+
- [Ansible2.8](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
61+
- [Python](https://www.python.org/downloads)
62+
- [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu)
63+
- [MySQL](https://github.com/clouddrove/ansible-role-docker-mysql)
64+
65+
66+
67+
68+
## What Includes
69+
70+
Followiing things includes in this role:
71+
72+
- mysql-node-exporter
73+
74+
75+
76+
77+
78+
79+
80+
## Example Playbook
81+
82+
**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/clouddrove/ansible-role-docker-mysql-node-exporter/releases).
83+
84+
85+
```yaml
86+
- hosts: localhost
87+
remote_user: ubuntu
88+
become: true
89+
roles:
90+
- clouddrove.ansible_role_docker_mysql_node_exporter
91+
```
92+
93+
94+
## Variables
95+
96+
```yaml
97+
mysql_exporter_server_port: 9104
98+
mysql_exporter_server_bind: 0.0.0.0
99+
mysql_exporter_server_password: fals
100+
mysql_exporter_version: latest
101+
mysql_port: 3306
102+
mysql_ip: "{{ PrivateIp }}"
103+
mysql_user: ""
104+
mysql_pass: ""
105+
mysql_exporter_Datasource: "{{ mysql_user }}:{{ mysql_pass }}@({{ mysql_ip }}:{{ mysql_port }})/"
106+
```
107+
108+
109+
## Installation
110+
111+
```console
112+
$ ansible-galaxy install clouddrove.ansible_role_docker_mysql_node_exporter
113+
```
114+
115+
116+
117+
118+
119+
120+
## Feedback
121+
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/ansible-role-docker-mysql-node-exporter/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]).
122+
123+
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/ansible-role-docker-mysql-node-exporter)!
124+
125+
## About us
126+
127+
At [CloudDrove][website], we offer expert guidance, implementation support and services to help organisations accelerate their journey to the cloud. Our services include docker and container orchestration, cloud migration and adoption, infrastructure automation, application modernisation and remediation, and performance engineering.
128+
129+
<p align="center">We are <b> The Cloud Experts!</b></p>
130+
<hr />
131+
<p align="center">We ❤️ <a href="https://github.com/clouddrove">Open Source</a> and you can check out <a href="https://github.com/clouddrove">our other modules</a> to get help with your new Cloud ideas.</p>
132+
133+
[website]: https://clouddrove.com
134+
[github]: https://github.com/clouddrove
135+
[linkedin]: https://cpco.io/linkedin
136+
[twitter]: https://twitter.com/clouddrove/
137+
[email]: https://clouddrove.com/contact-us.html
138+
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=

README.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
#
3+
# This is the canonical configuration for the `README.md`
4+
# Run `make readme` to rebuild the `README.md`
5+
#
6+
7+
# Name of this project
8+
name: Ansible Role Docker MySQL Node Exporter
9+
10+
# License of this project
11+
license: "MIT"
12+
13+
# Canonical GitHub repo
14+
github_repo: clouddrove/ansible-role-docker-mysql-node-exporter
15+
16+
# Badges to display
17+
badges:
18+
- name: "Ansible"
19+
image: "https://img.shields.io/badge/Ansible-2.8-green?style=flat&logo=ansible"
20+
url: "https://www.ansible.com"
21+
- name: "Licence"
22+
image: "https://img.shields.io/badge/License-MIT-blue.svg"
23+
url: "LICENSE.md"
24+
- name: "Distribution"
25+
image: "https://img.shields.io/badge/ubuntu-16.x-orange?style=flat&logo=ubuntu"
26+
url: "https://ubuntu.com/"
27+
- name: "Distribution"
28+
image: "https://img.shields.io/badge/ubuntu-18.x-orange?style=flat&logo=ubuntu"
29+
url: "https://ubuntu.com/"
30+
31+
# Prerequesties to display
32+
# yamllint disable
33+
prerequesties:
34+
- name: "Ansible2.8"
35+
url: "https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html"
36+
- name: "Python"
37+
url: "https://www.python.org/downloads"
38+
- name: "Docker"
39+
url: "https://docs.docker.com/install/linux/docker-ce/ubuntu"
40+
- name: "MySQL"
41+
url: "https://github.com/clouddrove/ansible-role-docker-mysql"
42+
# yamllint enable
43+
# What Includes to display
44+
what_includes:
45+
- name: "mysql-node-exporter"
46+
47+
48+
# description of this project
49+
description: |-
50+
This ansible role is used to setup MySQL node exporter with docker.
51+
52+
# How to use this project
53+
usage: |-
54+
```yaml
55+
- hosts: localhost
56+
remote_user: ubuntu
57+
become: true
58+
roles:
59+
- clouddrove.ansible_role_docker_mysql_node_exporter
60+
```
61+
# Variables use in the project
62+
variables: |-
63+
```yaml
64+
mysql_exporter_server_port: 9104
65+
mysql_exporter_server_bind: 0.0.0.0
66+
mysql_exporter_server_password: fals
67+
mysql_exporter_version: latest
68+
mysql_port: 3306
69+
mysql_ip: "{{ PrivateIp }}"
70+
mysql_user: ""
71+
mysql_pass: ""
72+
mysql_exporter_Datasource: "{{ mysql_user }}:{{ mysql_pass }}@({{ mysql_ip }}:{{ mysql_port }})/"
73+
```
74+
75+
# How to install project
76+
installation: |-
77+
```console
78+
$ ansible-galaxy install clouddrove.ansible_role_docker_mysql_node_exporter
79+
```

defaults/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
# Networking/connection options
3+
mysql_exporter_server_port: 9104
4+
mysql_exporter_server_bind: 0.0.0.0
5+
mysql_exporter_server_password: false
6+
7+
mysql_exporter_version: latest
8+
9+
mysql_port: 3306
10+
mysql_ip: "{{ PrivateIp }}"
11+
mysql_user: ""
12+
mysql_pass: ""
13+
mysql_exporter_Datasource: "{{ mysql_user }}:{{ mysql_pass }}@({{ mysql_ip }}:{{ mysql_port }})/"

handlers/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
# handlers for ansible-role-docker-mysql_exporter
3+
4+
- name: restart mysql_exporter
5+
service:
6+
name: mysql_exporter
7+
state: restarted
8+
enabled: true
9+
10+
- name: start mysql_exporter
11+
service:
12+
name: mysql_exporter
13+
state: started
14+
enabled: true
15+
16+
- name: reload mysql_exporter
17+
service:
18+
name: mysql_exporter
19+
state: reloaded
20+
enabled: true

meta/.galaxy_install_info

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install_date: Wed Feb 26 05:39:42 2020
2+
version: ''

meta/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
3+
dependencies: []
4+
5+
galaxy_info:
6+
author: clouddrove
7+
description: This ansible role is used to install Redis server into Docker.
8+
company: "CloudDrove, LLC"
9+
license: "license (BSD, MIT)"
10+
min_ansible_version: 2.4
11+
platforms:
12+
- name: Debian
13+
versions:
14+
- jessie
15+
- stretch
16+
- name: Ubuntu
17+
versions:
18+
- trusty
19+
- xenial
20+
- bionic
21+
galaxy_tags:
22+
- redis
23+
- docker
24+
- redis
25+
- ubuntu

0 commit comments

Comments
 (0)