Skip to content

Commit

Permalink
add dotters and ibp nginx configs
Browse files Browse the repository at this point in the history
  • Loading branch information
hitchhooker committed Oct 24, 2023
1 parent e019523 commit 38df153
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bkk03
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ proxmox_hosts
proxmox_nodes
routers
referrence_nodes
services

[proxmox_nodes:children]
cumulus
Expand All @@ -32,6 +33,9 @@ wnd23
[proxmox_hosts]
bkk03

[services]
ibp

[unmanaged]

[hardware]
Expand Down
2 changes: 2 additions & 0 deletions host_vars/dot23.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pinned_service: True
default_telemetry_name: "Rotko Networks - {{ host_name.split('.')[0] }} {{ default_node_type | capitalize }}"
default_public_dns: "{{ host_name }}"
default_public_dns_lb: "polkadot.rotko.net"
default_public_dns_ibp: "rpc.ibp.network"
default_public_dns_dotters: "rpc.dotters.network"
default_network: "polkadot"
default_node_type: "endpoint"
default_pruning: "archive"
Expand Down
2 changes: 2 additions & 0 deletions host_vars/dot24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pinned_service: True
default_telemetry_name: "Rotko Networks - {{ host_name.split('.')[0] }} {{ default_node_type | capitalize }}"
default_public_dns: "{{ host_name }}"
default_public_dns_lb: "polkadot.rotko.net"
default_public_dns_ibp: "rpc.ibp.network"
default_public_dns_dotters: "rpc.dotters.network"
default_network: "polkadot"
default_node_type: "endpoint"
default_pruning: "archive"
Expand Down
2 changes: 1 addition & 1 deletion host_vars/ibp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ansible_host: "27.131.160.106"
container_ip: "192.168.69.97"
ansible_port: "2997"
host_name: "ibp-monitor.rotko.net"
host_name: "ibp.rotko.net"
host_timezone: "Asia/Bangkok"
netif: '{"net0":"name=eth0,gw={{ default_nat_network_forward_cidr.split("/")[0] }},ip={{ default_host_ip }}/24,bridge={{ default_nat_device }}"}'
role: "monitor"
Expand Down
2 changes: 2 additions & 0 deletions host_vars/ksm23.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pinned_service: True
default_telemetry_name: "Rotko Networks - {{ host_name.split('.')[0] }} {{ default_node_type | capitalize }}"
default_public_dns: "{{ host_name }}"
default_public_dns_lb: "kusama.rotko.net"
default_public_dns_ibp: "rpc.ibp.network"
default_public_dns_dotters: "rpc.dotters.network"
default_network: kusama
default_node_type: "endpoint"
default_pruning: "archive"
Expand Down
2 changes: 2 additions & 0 deletions host_vars/ksm24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pinned_service: True
default_telemetry_name: "Rotko Networks - {{ host_name.split('.')[0] }} {{ default_node_type | capitalize }}"
default_public_dns: "{{ host_name }}"
default_public_dns_lb: "kusama.rotko.net"
default_public_dns_ibp: "rpc.ibp.network"
default_public_dns_dotters: "rpc.dotters.network"
default_network: kusama
default_node_type: "endpoint"
default_pruning: "archive"
Expand Down
2 changes: 2 additions & 0 deletions host_vars/wnd23.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pinned_service: True
default_telemetry_name: "Rotko Networks - {{ host_name.split('.')[0] }} {{ default_node_type | capitalize }}"
default_public_dns: "{{ host_name }}"
default_public_dns_lb: "westend.rotko.net"
default_public_dns_ibp: "rpc.ibp.network"
default_public_dns_dotters: "rpc.dotters.network"
default_network: "westend"
default_node_type: "endpoint"
default_pruning: "archive"
Expand Down
2 changes: 2 additions & 0 deletions host_vars/wnd24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pinned_service: True
default_telemetry_name: "Rotko Networks - {{ host_name.split('.')[0] }} {{ default_node_type | capitalize }}"
default_public_dns: "{{ host_name }}"
default_public_dns_lb: "westend.rotko.net"
default_public_dns_ibp: "rpc.ibp.network"
default_public_dns_dotters: "rpc.dotters.network"
default_network: "westend"
default_node_type: "endpoint"
default_pruning: "archive"
Expand Down
35 changes: 35 additions & 0 deletions roles/setup_install_nginx/templates/https-endpoint-dotters.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
server {
listen {{ default_secure_rpc_port }} ssl http2;
listen [::]:{{ default_secure_rpc_port }} ssl http2;
server_name {{ default_public_dns_dotters }};

# SSL/TLS settings
ssl_certificate /etc/letsencrypt/live/{{ default_public_dns_dotters }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ default_public_dns_dotters }}/privkey.pem;

# Strong SSL settings
ssl_protocols TLSv1.3;
ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384';
ssl_prefer_server_ciphers off;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_session_tickets off;

# OCSP Stapling
ssl_stapling on;
ssl_stapling_verify on;
resolver 1.1.1.1 1.0.0.1 valid=300s;
resolver_timeout 5s;

location / {
proxy_buffers 16 4k;
proxy_buffer_size 2k;
proxy_pass http://127.0.0.1:{{ default_rpc_port }};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
35 changes: 35 additions & 0 deletions roles/setup_install_nginx/templates/https-endpoint-ibp.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
server {
listen {{ default_secure_rpc_port }} ssl http2;
listen [::]:{{ default_secure_rpc_port }} ssl http2;
server_name {{ default_public_dns_ibp }};

# SSL/TLS settings
ssl_certificate /etc/letsencrypt/live/{{ default_public_dns_ibp }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ default_public_dns_ibp }}/privkey.pem;

# Strong SSL settings
ssl_protocols TLSv1.3;
ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384';
ssl_prefer_server_ciphers off;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_session_tickets off;

# OCSP Stapling
ssl_stapling on;
ssl_stapling_verify on;
resolver 1.1.1.1 1.0.0.1 valid=300s;
resolver_timeout 5s;

location / {
proxy_buffers 16 4k;
proxy_buffer_size 2k;
proxy_pass http://127.0.0.1:{{ default_rpc_port }};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

0 comments on commit 38df153

Please sign in to comment.