-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ongo agora explicitamente não faz referencia a estar em cluster; Instalado HAproxy em Alpha; instalado ferramentas extras por linha de comando que já estavam na Bravo para acessar bancos de dados em Elefante Borneu
- Loading branch information
Showing
12 changed files
with
514 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
global | ||
log /dev/log local0 | ||
log /dev/log local1 notice | ||
chroot /var/lib/haproxy | ||
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | ||
stats timeout 30s | ||
user haproxy | ||
group haproxy | ||
daemon | ||
|
||
# Default SSL material locations | ||
ca-base /etc/ssl/certs | ||
crt-base /etc/ssl/private | ||
|
||
# Default ciphers to use on SSL-enabled listening sockets. | ||
# For more information, see ciphers(1SSL). This list is from: | ||
# https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ | ||
# An alternative list with additional directives can be obtained from | ||
# https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy | ||
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS | ||
ssl-default-bind-options no-sslv3 | ||
|
||
defaults | ||
log global | ||
mode http | ||
option httplog | ||
option dontlognull | ||
timeout connect 5000 | ||
timeout client 50000 | ||
timeout server 50000 | ||
errorfile 400 /etc/haproxy/errors/400.http | ||
errorfile 403 /etc/haproxy/errors/403.http | ||
errorfile 408 /etc/haproxy/errors/408.http | ||
errorfile 500 /etc/haproxy/errors/500.http | ||
errorfile 502 /etc/haproxy/errors/502.http | ||
errorfile 503 /etc/haproxy/errors/503.http | ||
errorfile 504 /etc/haproxy/errors/504.http | ||
|
||
# Load Balancing for Galera Cluster | ||
listen MariaDB-Galera-Cluster | ||
bind 127.0.0.1:3306 | ||
balance leastconn | ||
mode tcp | ||
option tcplog | ||
option mysql-check user haproxy | ||
server elefante-borneu-yul-01 149.56.130.19:3306 maxconn 25 check weight 10 | ||
server elefante-borneu-yul-02 149.56.130.66:3306 maxconn 25 check weight 10 | ||
server elefante-borneu-yul-03 149.56.130.178:3306 maxconn 25 check weight 10 | ||
|
||
#listen MongoDB-TestFakeCluster | ||
# bind 127.0.0.1:27017 | ||
# balance leastconn | ||
# option tcp-check | ||
# option tcplog | ||
# server elefante-borneu-yul-01 149.56.130.19:27017 maxconn 25 check weight 10 | ||
# server elefante-borneu-yul-02 149.56.130.66:27017 maxconn 25 check weight 10 | ||
# server elefante-borneu-yul-03 149.56.130.178:27017 maxconn 25 check weight 10 | ||
|
||
listen MongoDB-01 | ||
bind 127.0.0.1:27017 | ||
balance leastconn | ||
option tcp-check | ||
option tcplog | ||
server elefante-borneu-yul-01 149.56.130.19:27017 maxconn 25 check weight 10 | ||
#server elefante-borneu-yul-02 149.56.130.66:27017 maxconn 25 check weight 10 | ||
#server elefante-borneu-yul-03 149.56.130.178:27017 maxconn 25 check weight 10 | ||
|
||
listen MongoDB-02 | ||
bind 127.0.0.1:27018 | ||
balance leastconn | ||
option tcp-check | ||
option tcplog | ||
#server elefante-borneu-yul-01 149.56.130.19:27017 maxconn 25 check weight 10 | ||
server elefante-borneu-yul-02 149.56.130.66:27017 maxconn 25 check weight 10 | ||
#server elefante-borneu-yul-03 149.56.130.178:27017 maxconn 25 check weight 10 | ||
|
||
listen MongoDB-03 | ||
bind 127.0.0.1:27018 | ||
balance leastconn | ||
option tcp-check | ||
option tcplog | ||
#server elefante-borneu-yul-01 149.56.130.19:27017 maxconn 25 check weight 10 | ||
#server elefante-borneu-yul-02 149.56.130.66:27017 maxconn 25 check weight 10 | ||
server elefante-borneu-yul-03 149.56.130.178:27017 maxconn 25 check weight 10 | ||
|
||
listen 'Redis-01' | ||
bind 127.0.0.1:6379 | ||
balance leastconn | ||
option tcp-check | ||
tcp-check connect | ||
tcp-check send PING\r\n | ||
tcp-check expect string +PONG | ||
#tcp-check send info\ replication\r\n | ||
#tcp-check expect string role:master | ||
tcp-check send QUIT\r\n | ||
tcp-check expect string +OK | ||
server elefante-borneu-yul-01 149.56.130.19:6379 maxconn 100 check weight 10 | ||
#server elefante-borneu-yul-02 149.56.130.66:6379 maxconn 100 check weight 10 | ||
#server elefante-borneu-yul-03 149.56.130.178:6379 maxconn 100 check weight 10 | ||
|
||
listen 'Redis-02' | ||
bind 127.0.0.1:6380 | ||
balance leastconn | ||
option tcp-check | ||
tcp-check connect | ||
tcp-check send PING\r\n | ||
tcp-check expect string +PONG | ||
#tcp-check send info\ replication\r\n | ||
#tcp-check expect string role:master | ||
tcp-check send QUIT\r\n | ||
tcp-check expect string +OK | ||
#server elefante-borneu-yul-01 149.56.130.19:6379 maxconn 100 check weight 10 | ||
server elefante-borneu-yul-02 149.56.130.66:6379 maxconn 100 check weight 10 | ||
#server elefante-borneu-yul-03 149.56.130.178:6379 maxconn 100 check weight 10 | ||
|
||
listen 'Redis-03' | ||
bind 127.0.0.1:6381 | ||
balance leastconn | ||
option tcp-check | ||
tcp-check connect | ||
tcp-check send PING\r\n | ||
tcp-check expect string +PONG | ||
#tcp-check send info\ replication\r\n | ||
#tcp-check expect string role:master | ||
tcp-check send QUIT\r\n | ||
tcp-check expect string +OK | ||
#server elefante-borneu-yul-01 149.56.130.19:6379 maxconn 100 check weight 10 | ||
#server elefante-borneu-yul-02 149.56.130.66:6379 maxconn 100 check weight 10 | ||
server elefante-borneu-yul-03 149.56.130.178:6379 maxconn 100 check weight 10 | ||
|
||
listen stats | ||
bind 127.0.0.1:1936 | ||
stats enable | ||
stats hide-version | ||
stats refresh 30s | ||
stats show-node | ||
# stats auth username:password | ||
stats uri / |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
user www-data; | ||
worker_processes auto; | ||
pid /run/nginx.pid; | ||
include /etc/nginx/modules-enabled/*.conf; | ||
|
||
events { | ||
worker_connections 768; | ||
# multi_accept on; | ||
} | ||
|
||
http { | ||
|
||
## | ||
# Basic Settings | ||
## | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
# server_tokens off; | ||
|
||
# server_names_hash_bucket_size 64; | ||
# server_name_in_redirect off; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
## | ||
# SSL Settings | ||
## | ||
|
||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE | ||
ssl_prefer_server_ciphers on; | ||
|
||
## | ||
# Logging Settings | ||
## | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
## | ||
# Gzip Settings | ||
## | ||
|
||
gzip on; | ||
|
||
# gzip_vary on; | ||
# gzip_proxied any; | ||
# gzip_comp_level 6; | ||
# gzip_buffers 16 8k; | ||
# gzip_http_version 1.1; | ||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; | ||
|
||
## | ||
# Virtual Host Configs | ||
## | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-enabled/*; | ||
} | ||
|
||
|
||
#mail { | ||
# # See sample authentication script at: | ||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript | ||
# | ||
# # auth_http localhost/auth.php; | ||
# # pop3_capabilities "TOP" "USER"; | ||
# # imap_capabilities "IMAP4rev1" "UIDPLUS"; | ||
# | ||
# server { | ||
# listen localhost:110; | ||
# protocol pop3; | ||
# proxy on; | ||
# } | ||
# | ||
# server { | ||
# listen localhost:143; | ||
# protocol imap; | ||
# proxy on; | ||
# } | ||
#} |
14 changes: 14 additions & 0 deletions
14
logbook/aguia-pescadora-alpha/etc/nginx/sites-available/EXEMPLO-PROXY.apa.etica.ai.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# FILE: /etc/nginx/sites-available/EXEMPLO-PROXY.abp.etica.ai.conf | ||
|
||
server { | ||
|
||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name EXEMPLO-PROXY.apb.etica.ai; | ||
|
||
location / { | ||
proxy_ignore_client_abort on; | ||
proxy_pass http://127.0.0.1:9999; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
logbook/aguia-pescadora-alpha/etc/nginx/sites-available/EXEMPLO-USUARIO.apa.etica.ai.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# FILE: /etc/nginx/sites-available/EXEMPLO-USUARIO.apb.etica.ai.conf | ||
|
||
server { | ||
|
||
listen 80; | ||
listen [::]:80; | ||
root /home2/EXEMPLO-USUARIO/web/public_html; | ||
|
||
index index.html; | ||
|
||
server_name EXEMPLO-USUARIO.apb.etica.ai EXEMPLO-USUARIO.lb-ap.etica.ai; | ||
|
||
location / { | ||
try_files $uri $uri/ =404; | ||
} | ||
} |
Oops, something went wrong.