This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # @title LEMP Installer | |
| # @author Kamaran Layne <github.com/KamaranL> | |
| # @system CentOS 7 | 8 | |
| # @description This script will install Nginx 1.x.x, MariaDB 10.5.x, Php 7.4.x and PhpMyAdmin 5.0.x | |
| __construct () | |
| { | |
| RED='\033[0;31m' | |
| YELLOW='\033[1;33m' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node(){ | |
| properties([ | |
| parameters([ | |
| booleanParam(name: 'slacknotify', defaultValue: false, description: 'Notify via Slack'), | |
| choice (name: 'limit', choices: '\ntag_Name_Server1\ntag_Name_Server2\ntag_Name_Etc3', description: 'Limit execution to'), | |
| choice (name: 'tags', choices: '\nlogstash\nsecurity\netc', description: 'Run the following tags'), | |
| string (name: 'extras', defaultValue: '', description: 'Extra vars, example: -e "restart=true" '), | |
| string (name: 'msg', defaultValue: '', description: 'Slack message" '), | |
| ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream @prometheus { | |
| server MY_IP:9090; | |
| } | |
| upstream @alertmanager { | |
| server MY_IP:9093; | |
| } | |
| server { | |
| listen 80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream rails_application { | |
| server 10.0.0.1 max_fails=1 fail_timeout=10s; | |
| server 10.0.0.2 max_fails=1 fail_timeout=10s; | |
| # and so on: server 10.0.0.x; | |
| } | |
| server { | |
| listen 1.2.3.4:80; | |
| location / { | |
| proxy_pass http://rails_application; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # add to /lib/systemd/system/prometheus.service | |
| # --web.external-url=https://monitoring.mydomain.com/prometheus/ | |
| # add to /lib/systemd/system/alertmanager.service | |
| # --web.external-url=https://monitoring.mydomain.com/alertmanager \ | |
| # --web.route-prefix="/" \ | |
| # --cluster.advertise-address=0.0.0.0:9093 | |
| # systemctl daemon-reload | |
| # systemctl restart prometheus alertmanager | |
| # | |
| cat <<EOF > /etc/nginx/conf.g/monitoring.conf |