Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

James kmom06 #30

Open
wants to merge 252 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
3b565ac
chore: Added git commit template
FalkenDev Nov 6, 2023
1597aa4
build: Docker build for prod the microblog
FalkenDev Nov 6, 2023
5b8991e
build: Script to start the webserver
FalkenDev Nov 6, 2023
6d73b66
style: Using autopep8
FalkenDev Nov 6, 2023
abe9a98
docs: Added Changelog for version history
FalkenDev Nov 6, 2023
22888fd
Create python ci for tests
FalkenDev Nov 6, 2023
255a6cf
Merge pull request #2 from FalkenDev/initial
JamesTTTT Nov 6, 2023
7a45c54
Merge pull request #3 from FalkenDev/python-ci-tests
JamesTTTT Nov 6, 2023
8f7c2ba
ci: Fixed python ci tests
FalkenDev Nov 6, 2023
d7eff29
ci: Changed requiremets.txt to text.txt
FalkenDev Nov 6, 2023
ac35b39
docs: Added badge for Python Ci Tests
FalkenDev Nov 6, 2023
4b4aa3d
chore: Added Template for Pull Requests
FalkenDev Nov 6, 2023
29293a0
Merge pull request #5 from FalkenDev/Github-Configs
Jolpango Nov 6, 2023
5f91077
Merge pull request #4 from FalkenDev/python-ci-tests
Jolpango Nov 6, 2023
12301f2
docs: Updated Changelog with the latest features and fixes
FalkenDev Nov 6, 2023
fd3730a
ci: Added workflow_call for reuse in docker cd
FalkenDev Nov 6, 2023
3344ae4
Merge pull request #6 from FalkenDev/docs
Jolpango Nov 6, 2023
8d8ed03
ci: Added docker cd for publish image when release
FalkenDev Nov 6, 2023
d124789
Merge pull request #7 from FalkenDev/docker-cd
Jolpango Nov 6, 2023
bbccb4c
build: Essential docker setup & configuration
JamesTTTT Nov 6, 2023
92546d5
cd: Changed to use release tag name
FalkenDev Nov 6, 2023
aab31d1
Merge pull request #8 from FalkenDev/docker-cd
Jolpango Nov 6, 2023
18b54e5
cd: Added docker image publish for test and prod
FalkenDev Nov 6, 2023
847931d
Merge branch 'development' into docker_setup
JamesTTTT Nov 6, 2023
ace6261
Merge pull request #9 from FalkenDev/docker_setup
FalkenDev Nov 6, 2023
ad7cae0
cd: Changed name from production (dublicate) to test
FalkenDev Nov 6, 2023
f7932e8
Merge pull request #10 from FalkenDev/docker-cd
Jolpango Nov 6, 2023
c7b8efb
docs: Changelog updated
FalkenDev Nov 6, 2023
056b2ad
Merge pull request #11 from FalkenDev/docs
Jolpango Nov 6, 2023
1c95157
feat: Route for following
JamesTTTT Nov 7, 2023
cf64c68
feat: DB model for followers
JamesTTTT Nov 7, 2023
b855998
feat: follow and unfollow buttons
JamesTTTT Nov 7, 2023
38764c8
refactor: Migration for following
JamesTTTT Nov 7, 2023
49555a2
test: testing following feature
JamesTTTT Nov 7, 2023
01c91f4
docs: Updated changelog to include pr12
JamesTTTT Nov 7, 2023
4b8cdbd
Merge branch 'development' into follow_user
JamesTTTT Nov 7, 2023
2a325ab
Merge pull request #12 from FalkenDev/follow_user
JamesTTTT Nov 7, 2023
db14b78
docs: Changelog updated to reflect the new release [0.2.0] and [1.0.0]
FalkenDev Nov 11, 2023
a81ec89
Merge pull request #13 from FalkenDev/docs
Jolpango Nov 11, 2023
c07e658
Merge pull request #15 from dbwebb-se/master
Jolpango Nov 14, 2023
13ef3c4
Create azure_joel.pub
Jolpango Nov 15, 2023
ddfc8f7
SSH Key kasper
FalkenDev Nov 15, 2023
1379fbe
James SSH nyckel
JamesTTTT Nov 15, 2023
5ee9f9a
Rename to .ssh
FalkenDev Nov 15, 2023
498a081
fix: Moved ssh folder files to 10min folder in files
FalkenDev Nov 15, 2023
8f842a4
Merge pull request #16 from FalkenDev/azure-pub-key
FalkenDev Nov 15, 2023
39c672e
:build Updated to look for azure ssh keys using users_users var for the
FalkenDev Nov 15, 2023
8759fe0
build: Added users_users var with the ssh keys
FalkenDev Nov 15, 2023
cd27204
build: Fixed python interpreter .venv to use just venv
FalkenDev Nov 15, 2023
3df4493
build: Added password to root
FalkenDev Nov 15, 2023
c3537da
Merge pull request #17 from FalkenDev/ssh-authorized-key-update
JamesTTTT Nov 15, 2023
f671e1a
build: Added task to install docker
FalkenDev Nov 15, 2023
75d1d88
build: Added playbook docker-mysql
FalkenDev Nov 15, 2023
f4cced0
build: Added task to run a mysql docker container
FalkenDev Nov 15, 2023
9117691
build: loadbalancer ansible play
Jolpango Nov 15, 2023
b691c61
build: Added pip3 and Docker SDK for running the mysql container
FalkenDev Nov 15, 2023
95176be
build: Removed connection and added interpreter python3
FalkenDev Nov 15, 2023
2f774bf
build
JamesTTTT Nov 15, 2023
83c2677
Merge pull request #18 from FalkenDev/ansible-docker-database
JamesTTTT Nov 15, 2023
20d94c1
Merge pull request #20 from FalkenDev/provision_update
FalkenDev Nov 15, 2023
5df9c5c
chore: Updated .gitignore with ansible/group_vars/all.yml and Makefile
FalkenDev Nov 15, 2023
6655c1a
chore: Removed personal data
FalkenDev Nov 15, 2023
ffe9d2a
chore: Stop tracking Makefile bcs of personal data
FalkenDev Nov 15, 2023
a2998e2
build: Added pubblished_ports for appservers to connect to mysql
FalkenDev Nov 15, 2023
3064ef6
build: Moved the pip3 install and docker sdk to docker-install asnible.
FalkenDev Nov 15, 2023
c2f84fe
build: Added playbook for appserver for deployment.
FalkenDev Nov 15, 2023
76637cb
build: Added task to start the microblog docker container.
FalkenDev Nov 15, 2023
5075fd5
Merge pull request #21 from FalkenDev/ansible-docker-appservers
Jolpango Nov 15, 2023
3046683
docs: Updated changelog to reflect the new builds and fixes
FalkenDev Nov 15, 2023
8a25be9
Fix gitignore problem
FalkenDev Nov 15, 2023
89e5cd9
Fix gitignore problem
FalkenDev Nov 15, 2023
cc28b67
Merge pull request #23 from FalkenDev/gitignore-fix
FalkenDev Nov 15, 2023
ffafefe
Merge pull request #22 from FalkenDev/changelog
Jolpango Nov 16, 2023
5fc907c
Merge branch 'development' into load-balancer-ansible
Jolpango Nov 16, 2023
9e75e09
bug: Add letsencrypt and pip
Jolpango Nov 16, 2023
4bc1997
bug: Update certbot script
Jolpango Nov 16, 2023
0cdda69
build: loop through appservers dynamically
Jolpango Nov 16, 2023
f7d05c2
build: use admin_email for cert
Jolpango Nov 16, 2023
f20432d
bug: published ports for appserver
Jolpango Nov 16, 2023
a24264f
remove comment
Jolpango Nov 16, 2023
082aca6
build: load_balancer vars
Jolpango Nov 16, 2023
4bbf0e6
Merge pull request #19 from FalkenDev/load-balancer-ansible
JamesTTTT Nov 16, 2023
a524b29
build: Workflow file for deploying release
JamesTTTT Nov 18, 2023
c8db284
build: Playbook for updating docker images
JamesTTTT Nov 18, 2023
fc6fda3
feat: Creates DNS A records for appservers
JamesTTTT Nov 18, 2023
50f452b
fix: Removed subdomains
JamesTTTT Nov 18, 2023
8dd0a9e
fix: Added subdomain hosts
JamesTTTT Nov 18, 2023
3e8fb8b
fix: Fixes to subdomain
JamesTTTT Nov 19, 2023
b12e3d8
fix: Fixed create instance for subdomains
JamesTTTT Nov 19, 2023
9c294f0
Merge pull request #24 from FalkenDev/Continous-Deployment
JamesTTTT Nov 20, 2023
c5edf7c
feat: Added host for databas
JamesTTTT Nov 20, 2023
2b1a46b
feat: Added subdomain for databas
JamesTTTT Nov 20, 2023
186cc42
Merge pull request #25 from FalkenDev/db-subdomain
FalkenDev Nov 20, 2023
38f7de3
my vars
FalkenDev Nov 16, 2023
b418ed4
My vars
FalkenDev Nov 16, 2023
583a55b
Revert "My vars"
FalkenDev Nov 17, 2023
973c2e8
Revert "my vars"
FalkenDev Nov 17, 2023
99afd69
variable
FalkenDev Nov 20, 2023
9e05bab
feat: app version route
Jolpango Nov 20, 2023
f916683
build: Add build args to actions for version
Jolpango Nov 20, 2023
b3837cd
build: Remove release tag var
Jolpango Nov 20, 2023
b296864
Merge pull request #26 from FalkenDev/app-version-route
FalkenDev Nov 20, 2023
e1a80bc
Changed domain name
FalkenDev Nov 20, 2023
08d330a
Merge pull request #27 from FalkenDev/host
JamesTTTT Nov 20, 2023
d4fb249
Added ssh key
FalkenDev Nov 20, 2023
96cf07b
Merge pull request #28 from FalkenDev/host
JamesTTTT Nov 20, 2023
e3da4de
Added workflow call to wait docker before deploy
FalkenDev Nov 20, 2023
66297e5
Merge pull request #29 from FalkenDev/host
JamesTTTT Nov 20, 2023
3ab00fe
Fix
FalkenDev Nov 20, 2023
8664b9b
bugfix
FalkenDev Nov 20, 2023
ea4bc9a
Merge pull request #30 from FalkenDev/host
JamesTTTT Nov 20, 2023
949a0d7
app version fix
FalkenDev Nov 20, 2023
d6e6729
Merge pull request #31 from FalkenDev/enviromentVersion
FalkenDev Nov 20, 2023
15a3d40
rename change
FalkenDev Nov 20, 2023
d7e8a3a
Merge pull request #32 from FalkenDev/enviromentVersion
FalkenDev Nov 20, 2023
2c56b39
Trying to fix app version
FalkenDev Nov 20, 2023
668014b
Trying to fix app version
FalkenDev Nov 20, 2023
0aad2d6
Merge pull request #33 from FalkenDev/enviromentVersion
FalkenDev Nov 20, 2023
52ac6b5
Test code
FalkenDev Nov 20, 2023
8c1b8b8
Merge pull request #34 from FalkenDev/enviromentVersion
JamesTTTT Nov 20, 2023
54205ce
Added env and arg for app version
FalkenDev Nov 20, 2023
d140866
Removed test string
FalkenDev Nov 20, 2023
3e1a805
Merge pull request #35 from FalkenDev/enviromentVersion
JamesTTTT Nov 20, 2023
637f687
docs: Changelog updated to reflect the new release
FalkenDev Nov 20, 2023
b58d77c
Merge pull request #37 from FalkenDev/changelog
Jolpango Nov 20, 2023
1f2146b
test: Added bandit test to find security holes in the code
FalkenDev Nov 21, 2023
0dcd725
ci: Added CI Workflow to run BTD when release created and when using …
FalkenDev Nov 21, 2023
a6cac46
ci: Added pip install bandit
FalkenDev Nov 21, 2023
9f7b2ab
Merge pull request #38 from FalkenDev/banditTest
JamesTTTT Nov 21, 2023
79f6a57
refactor: Updated connection permissions
JamesTTTT Nov 21, 2023
9f51953
refactor: Moved the creation of security groups
JamesTTTT Nov 21, 2023
4d3d107
test: Added dockle-test in makefile
FalkenDev Nov 21, 2023
9cb3dbb
ci: Added dockle run
FalkenDev Nov 21, 2023
af4f5d5
ci: Added docker_content_trust
FalkenDev Nov 21, 2023
fbc466b
build: Added healthcheck for Dockerfile_prod
FalkenDev Nov 21, 2023
4865bff
Merge pull request #40 from FalkenDev/dockleTest
JamesTTTT Nov 21, 2023
e4e4570
fix: Upgrade pip, setuptools, openssl
Jolpango Nov 21, 2023
57845f4
build: Add trivy-test to run trivy against app
Jolpango Nov 21, 2023
82aadf7
fix: Add setuptools, pip min version
Jolpango Nov 21, 2023
4337a11
fix: Upgrade flask and werkzeug
Jolpango Nov 21, 2023
e443122
ci: Add trivy test to BTD workflow
Jolpango Nov 21, 2023
69e6c8d
fix: Add werkzeug2.3.8 to test requirements
Jolpango Nov 21, 2023
d229361
fix: Upgrade flask login to 0.6.3
Jolpango Nov 21, 2023
81c80db
fix: Downgrade flask to oldest version with security fix 2.2.5
Jolpango Nov 21, 2023
fffdbc2
fix: Downgrade flask-logn 0.6.0. upgrade em
Jolpango Nov 21, 2023
3500f41
fix: downgrade werkzeug 2.2.3
Jolpango Nov 21, 2023
5b6b578
fix: Upgrade flask-wtf, downgrade email_validator, downgrade werkzeud…
Jolpango Nov 21, 2023
1d9293a
Merge pull request #41 from FalkenDev/trivy-testing
FalkenDev Nov 21, 2023
1f95bf1
fix: Change from crlf to lf
Jolpango Nov 21, 2023
eb42f5a
fix: Update werkzeug from 2.2.2 to 2.2.3
Jolpango Nov 21, 2023
37597ca
Merge pull request #42 from FalkenDev/fix-trivy-issues
FalkenDev Nov 21, 2023
cbcb06d
fix: Update trivy-test make
Jolpango Nov 21, 2023
f667808
Merge pull request #43 from FalkenDev/fix-trivy-issues
FalkenDev Nov 21, 2023
a53882b
fix: Upgrade werkzeug 2.3.8
Jolpango Nov 21, 2023
1413839
build: Getting the latest tag from github to the docker image tag
FalkenDev Nov 21, 2023
453e297
fix: Cookie No HttpOnly Flag [10010]
FalkenDev Nov 21, 2023
c8f3e2c
fix: Changed download depend for dockle
FalkenDev Nov 21, 2023
3454805
Merge pull request #44 from FalkenDev/fix-trivy-issues
FalkenDev Nov 21, 2023
e8a46d0
feat: New SSHD config
JamesTTTT Nov 21, 2023
493d74a
feat:Replace sshd
JamesTTTT Nov 21, 2023
ebfb1c0
Merge pull request #39 from FalkenDev/security_groups
FalkenDev Nov 21, 2023
0a0c0b2
Merge pull request #46 from FalkenDev/ssh-improvements
FalkenDev Nov 21, 2023
75a73d3
Merge pull request #45 from FalkenDev/zapTests
JamesTTTT Nov 21, 2023
08ce909
debug: Trying to fix security groups problem with ip
FalkenDev Nov 22, 2023
3dd77d0
debug: Trying to fix security groups problem with ip
FalkenDev Nov 22, 2023
39256e2
fix: Added gather instances to run before security groups to get the ips
FalkenDev Nov 22, 2023
a4af4c3
fix: Fixed the appserver ip to source adress prefix
FalkenDev Nov 22, 2023
01986eb
fix: removed unused code
FalkenDev Nov 22, 2023
3123a73
Merge pull request #47 from FalkenDev/debugSecurityGroups
Jolpango Nov 23, 2023
a5a68d8
fix: Prettier update
FalkenDev Nov 26, 2023
1291057
fix: Changed to use j2 for sshd_config
FalkenDev Nov 26, 2023
72d627a
fix: Prettrier
FalkenDev Nov 26, 2023
5513ff1
build: Fixed the 10-firt-minutes
FalkenDev Nov 26, 2023
1315cae
Merge pull request #48 from FalkenDev/ansibleFix
Jolpango Nov 26, 2023
08bd124
docs: Changelog 2.1.0 and 3.0.0
Jolpango Nov 26, 2023
f8060ff
Merge pull request #49 from FalkenDev/changelog-3-0-0
FalkenDev Nov 26, 2023
914c471
build: Add docker-install role to loadbalancer
Jolpango Nov 28, 2023
8df331f
build: Check cert before create, start prometheus exporter
Jolpango Nov 28, 2023
7e95820
chore: Enable nginx metrics
Jolpango Nov 28, 2023
c3d44f7
Merge pull request #51 from FalkenDev/load-balancer-nginx-exporter
FalkenDev Nov 28, 2023
1051134
build: Added monitoring to the build
FalkenDev Nov 28, 2023
b4bd11c
feat: Added gunicorn config
JamesTTTT Nov 28, 2023
7877cb8
feat: Configuration for gunicorn
JamesTTTT Nov 28, 2023
c08af3e
build: Docker-compose file to run the Prometheus, Grafana and Alertma…
FalkenDev Nov 28, 2023
796495b
config: Added alertmanager condig
FalkenDev Nov 28, 2023
faf5d13
build: Added prometheus condig for exporter
FalkenDev Nov 28, 2023
635d3a7
feat: New requirement
JamesTTTT Nov 28, 2023
29a497c
build: Added prometheus rules
FalkenDev Nov 28, 2023
8798a26
Updated port
JamesTTTT Nov 28, 2023
94f107b
build: Added monitoring as a new vm
FalkenDev Nov 28, 2023
d35cd65
feat: updated boot.sh
JamesTTTT Nov 28, 2023
e366d8f
build: Added monitoring to the security groups
FalkenDev Nov 28, 2023
b287a94
Merge pull request #52 from FalkenDev/flask_export
FalkenDev Nov 28, 2023
7b491b4
Merge branch 'development' into ansibleMonitoring
Jolpango Nov 28, 2023
bc833cb
chore: Reverse proxy for grafana
Jolpango Nov 28, 2023
8dcbe5d
fix: Removed unused citation "
FalkenDev Nov 28, 2023
8426512
build: Added Grfana initials
FalkenDev Nov 28, 2023
dd34dbb
build: Changed to use the vms ips
FalkenDev Nov 28, 2023
71a50a2
build: Bugging
FalkenDev Nov 28, 2023
22d973e
build: Fixed security ports
FalkenDev Nov 28, 2023
9f349b1
Merge pull request #53 from FalkenDev/ansibleMonitoring
JamesTTTT Nov 28, 2023
a410e2f
feat: __init__.py
JamesTTTT Nov 28, 2023
a8a5e33
Merge pull request #54 from FalkenDev/flask_bugfix
FalkenDev Nov 28, 2023
2352808
Added port for exporter in load balancer
FalkenDev Nov 28, 2023
d70b064
Merge pull request #55 from FalkenDev/ansibleMonitoring
FalkenDev Nov 28, 2023
2404e93
fix: Adding the PROMETHEUS_MULTIPROC_DIR to the test dockerfile
FalkenDev Nov 28, 2023
503768a
Merge pull request #56 from FalkenDev/pytestFix
FalkenDev Nov 28, 2023
d156d3f
fix: Fixing pytest unit
FalkenDev Nov 28, 2023
2929321
Merge pull request #57 from FalkenDev/pytestFix
FalkenDev Nov 28, 2023
12b2c88
fix: Using internal instead of without
FalkenDev Nov 28, 2023
5d1184c
fix: Using internal instead of without
FalkenDev Nov 28, 2023
912a17a
fix: Removed alredy existing pip installs
FalkenDev Nov 28, 2023
05b778d
Merge pull request #58 from FalkenDev/pytestFix
FalkenDev Nov 28, 2023
d631201
build: Add node exporter to database vm
Jolpango Nov 30, 2023
4910778
feat: Added new alarms - High cpu usage and High memory
FalkenDev Nov 30, 2023
2b30601
feat: Added flash dashboard, node and nginx
FalkenDev Nov 30, 2023
f38f30b
Changelog 3.1.0 - 3.1.1
Jolpango Nov 30, 2023
9eab144
fix: string formatting
Jolpango Nov 30, 2023
73a013f
fix: mysql node metrics path
Jolpango Nov 30, 2023
aca80b7
feat: Added port 9100 to mysql exporter
FalkenDev Nov 30, 2023
1737be6
feat: Added job mysql-node (node exporter)
FalkenDev Nov 30, 2023
fe76bc9
fix: Update timer rules
FalkenDev Nov 30, 2023
10f681b
feat: Added dashboards to grafana
FalkenDev Nov 30, 2023
521748e
fix: Small fixes, using now the local json files of dashboards instead
FalkenDev Nov 30, 2023
da4ec22
refactor: Changed the timer to be on 10s
FalkenDev Nov 30, 2023
3c15966
refactor: typo change
FalkenDev Nov 30, 2023
15bc66f
Merge pull request #59 from FalkenDev/mysql-node
FalkenDev Nov 30, 2023
b543673
Merge pull request #60 from FalkenDev/dashboardAndAlarms
Jolpango Nov 30, 2023
95f452c
changelog 4-0-0
Jolpango Nov 30, 2023
cdee1af
Merge pull request #62 from FalkenDev/changelog3-1-1
FalkenDev Nov 30, 2023
0008066
fix: Added task to update requests_toolbelt & urllib3
FalkenDev Dec 5, 2023
1ca6467
Merge pull request #64 from FalkenDev/loadbalancerUpdate
Jolpango Dec 5, 2023
5604fa3
cd: Add doppler to deploy workflow
Jolpango Dec 5, 2023
40e4f16
chore: Replace vars with doppler secrets
Jolpango Dec 5, 2023
6464a8d
chore: Replace config vars with doppler secrets
Jolpango Dec 5, 2023
ec16711
chore: Get .pub ssh keys from doppler instead of files
Jolpango Dec 5, 2023
3d2fe13
chore: DOPPLER_TOKEN -> DOPPLER_TOKEN_PROD
Jolpango Dec 5, 2023
27e48ea
Merge pull request #65 from FalkenDev/doppler
FalkenDev Dec 5, 2023
605eef5
docs: Added images for Doppler technical analysis
FalkenDev Dec 5, 2023
658d792
docs: Doppler technical analysis
FalkenDev Dec 5, 2023
5e805db
feat: Added doppler.yaml for easy configuration on Doppler
FalkenDev Dec 5, 2023
1bb3f19
docs: Changelog updated to reflect the new release (Kmom05)
FalkenDev Dec 5, 2023
432d19d
Merge pull request #66 from FalkenDev/dopplerUpdate
JamesTTTT Dec 5, 2023
615214f
fix: doppler images
Jolpango Dec 5, 2023
c96465d
Merge pull request #67 from FalkenDev/doppler-image-fix
FalkenDev Dec 5, 2023
68eea8f
Demo / test
FalkenDev Dec 17, 2023
221e437
Kubernetes for setup microblog
FalkenDev Dec 17, 2023
8b43e15
Kubernetes for setup mysql database and use it for microblog
FalkenDev Dec 17, 2023
713887e
Merge pull request #69 from FalkenDev/kubernetes-Kasper
FalkenDev Dec 17, 2023
5eadfd0
kmom06 - james
JamesTTTT Jan 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Small fixes, using now the local json files of dashboards instead
of getting them from internet
  • Loading branch information
FalkenDev committed Nov 30, 2023
commit 521748e15d363e3d1281c0aa6a79f9022a044d7b
60 changes: 28 additions & 32 deletions ansible/roles/monitoring/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -5,30 +5,6 @@
state: latest
update_cache: yes

- name: Remove image prometheus
docker_image:
name: prometheus
state: absent
force_absent: yes

- name: Remove image deploy_grafana_1
docker_image:
name: deploy_grafana_1
state: absent
force_absent: yes

- name: Remove image deploy_alertmanager_1
docker_image:
name: deploy_alertmanager_1
state: absent
force_absent: yes

- name: Remove image node-exporter
docker_image:
name: node-exporter
state: absent
force_absent: yes

- name: copy docker-compose.yml to vm
ansible.builtin.template:
src: files/docker-compose.yml
@@ -54,38 +30,58 @@
src: files/grafana.ini
dest: /home/deploy/grafana.ini

- name: Copy Flask dash to vm
copy:
src: files/flask_dash.json
dest: /home/deploy/flask_dash.json

- name: Copy Nginx dash to vm
copy:
src: files/nginx_dash.json
dest: /home/deploy/nginx_dash.json

- name: Start Prometheus, Grafana and Alertmanager
ansible.builtin.command:
cmd: docker-compose up -d
chdir: /home/deploy
become: yes

- name: Wait for a few seconds for starting grafana
pause:
seconds: 60

- name: Prometheus as data source
community.grafana.grafana_datasource:
name: prometheus
url: http://0.0.0.0:3000
ds_type: prometheus
url: "http://0.0.0.0:3000"
ds_type: "prometheus"
ds_url: http://prometheus:9090
grafana_user: "admin"
grafana_password: "admin"
state: present

- name: Flask Dashboard Grafana
community.grafana.grafana_dashboard:
grafana_url: http://0.0.0.0:3000
grafana_url: "http://0.0.0.0:3000"
grafana_user: "admin"
grafana_password: "admin"
path: https://gist.githubusercontent.com/AndreasArne/433f902f9b986c301f2b2877454a581f/raw/4898bb2013b469cf74ace82d2d5aa39e073cb069/flaskdash.json
path: /home/deploy/flask_dash.json
overwrite: true
state: present

- name: Node exporter Dashboard Grafana
community.grafana.grafana_dashboard:
grafana_url: http://0.0.0.0:3000
grafana_url: "http://0.0.0.0:3000"
grafana_user: "admin"
grafana_password: "admin"
dashboard_id: 1860
dashboard_revision: 33

- name: Nginx Dashboard Grafana
community.grafana.grafana_dashboard:
grafana_url: http://0.0.0.0:3000
grafana_url: "http://0.0.0.0:3000"
grafana_user: "admin"
grafana_password: "admin"
dashboard_id: 14900
dashboard_revision: 2
path: /home/deploy/nginx_dash.json
overwrite: true
state: present