Skip to content

Commit

Permalink
feat(IPv6): Add IPv6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
cogk committed Oct 15, 2024
1 parent b0a2780 commit eb5a537
Show file tree
Hide file tree
Showing 25 changed files with 113 additions and 12 deletions.
1 change: 1 addition & 0 deletions debugging/mariadb.build.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ usermod -aG frappe www-data
```nginx
echo "server {
listen 80;
listen [::]:80;
server_name packages.frappe.cloud;
location / {
Expand Down
8 changes: 7 additions & 1 deletion deployment/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ upstream frappe-bench-socketio-server {


server {
listen 80 default_server;
listen 80 default_server;
listen [::]:80 default_server;
server_name "";
return 444;
}

server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name "";

ssl on;
Expand All @@ -42,6 +44,7 @@ map $host $site_name_sxjfjnv {
server {

listen 443 ssl http2;
listen [::]:443 ssl http2;


server_name
Expand Down Expand Up @@ -75,6 +78,7 @@ server {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name
frappe.cloud
;
Expand All @@ -88,6 +92,7 @@ proxy_cache_path /var/cache/nginx/assets keys_zone=assets_cache:10m loader_thres
server {

listen 443 ssl http2;
listen [::]:443 ssl http2;


server_name
Expand Down Expand Up @@ -431,6 +436,7 @@ server {


listen 80;
listen [::]:80;
server_name
frappecloud.com
;
Expand Down
1 change: 1 addition & 0 deletions press/docker/registry.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ map $upstream_http_docker_distribution_api_version $docker_distribution_api_vers

server {
listen 443 ssl;
listen [::]:443 ssl;
server_name registry.frappe.cloud;

# SSL
Expand Down
1 change: 1 addition & 0 deletions press/playbooks/roles/ssl_nginx/templates/ssl.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
server {
listen 80;
listen [::]:80;
server_name {{ domain }};

location ^~ /.well-known/acme-challenge/ {
Expand Down
10 changes: 9 additions & 1 deletion press/press/doctype/analytics_server/analytics_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"is_server_setup",
"networking_section",
"ip",
"ip6",
"column_break_10",
"private_ip",
"private_mac_address",
Expand Down Expand Up @@ -107,6 +108,13 @@
"reqd": 1,
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.public_ip6_address",
"fieldname": "ip6",
"fieldtype": "Data",
"label": "IPv6",
"set_only_once": 1
},
{
"fieldname": "column_break_10",
"fieldtype": "Column Break"
Expand Down Expand Up @@ -252,7 +260,7 @@
"link_fieldname": "server"
}
],
"modified": "2023-12-13 15:09:40.978998",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Analytics Server",
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/analytics_server/analytics_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class AnalyticsServer(BaseServer):
google_client_secret: DF.Password | None
hostname: DF.Data
ip: DF.Data
ip6: DF.Data | None
is_server_setup: DF.Check
monitoring_password: DF.Password | None
plausible_mail_login: DF.Data | None
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/app_release/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ docker run -it -p 127.0.0.1:8021:8080 \
```
server {
listen 80;
listen [::]:80;
server_name code.staging.frappe.cloud;
location / {
proxy_pass http://127.0.0.1:8021;
Expand Down
10 changes: 9 additions & 1 deletion press/press/doctype/database_server/database_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"auto_add_storage_max",
"networking_section",
"ip",
"ip6",
"column_break_10",
"private_ip",
"private_mac_address",
Expand Down Expand Up @@ -104,6 +105,13 @@
"label": "IP",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.public_ip6_address",
"fieldname": "ip6",
"fieldtype": "Data",
"label": "IPv6",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.private_ip_address",
"fieldname": "private_ip",
Expand Down Expand Up @@ -521,7 +529,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-08-13 11:02:07.399141",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Database Server",
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/database_server/database_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class DatabaseServer(BaseServer):
hostname: DF.Data
hostname_abbreviation: DF.Data | None
ip: DF.Data | None
ip6: DF.Data | None
is_performance_schema_enabled: DF.Check
is_primary: DF.Check
is_replication_setup: DF.Check
Expand Down
10 changes: 9 additions & 1 deletion press/press/doctype/log_server/log_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"is_server_setup",
"networking_section",
"ip",
"ip6",
"column_break_9",
"private_ip",
"private_mac_address",
Expand Down Expand Up @@ -90,6 +91,13 @@
"label": "IP",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.public_ip6_address",
"fieldname": "ip6",
"fieldtype": "Data",
"label": "IPv6",
"set_only_once": 1
},
{
"fieldname": "column_break_9",
"fieldtype": "Column Break"
Expand Down Expand Up @@ -198,7 +206,7 @@
"link_fieldname": "server"
}
],
"modified": "2023-12-13 15:09:14.473225",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Log Server",
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/log_server/log_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class LogServer(BaseServer):
frappe_user_password: DF.Password | None
hostname: DF.Data
ip: DF.Data | None
ip6: DF.Data | None
is_server_setup: DF.Check
kibana_password: DF.Password | None
monitoring_password: DF.Password | None
Expand Down
10 changes: 9 additions & 1 deletion press/press/doctype/monitor_server/monitor_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"is_server_setup",
"networking_section",
"ip",
"ip6",
"column_break_9",
"private_ip",
"private_mac_address",
Expand Down Expand Up @@ -92,6 +93,13 @@
"label": "IP",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.public_ip6_address",
"fieldname": "ip6",
"fieldtype": "Data",
"label": "IPv6",
"set_only_once": 1
},
{
"fieldname": "column_break_9",
"fieldtype": "Column Break"
Expand Down Expand Up @@ -212,7 +220,7 @@
"link_fieldname": "server"
}
],
"modified": "2024-02-05 20:07:19.024804",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Monitor Server",
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/monitor_server/monitor_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class MonitorServer(BaseServer):
grafana_password: DF.Password | None
hostname: DF.Data
ip: DF.Data | None
ip6: DF.Data | None
is_server_setup: DF.Check
monitoring_password: DF.Password | None
private_ip: DF.Data
Expand Down
10 changes: 9 additions & 1 deletion press/press/doctype/proxy_server/proxy_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"public",
"section_break_8",
"ip",
"ip6",
"enabled_default_routing",
"column_break_10",
"private_ip",
Expand Down Expand Up @@ -70,6 +71,13 @@
"label": "IP",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.public_ip6_address",
"fieldname": "ip6",
"fieldtype": "Data",
"label": "IPv6",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.private_ip_address",
"fieldname": "private_ip",
Expand Down Expand Up @@ -400,7 +408,7 @@
}
],
"links": [],
"modified": "2024-09-10 15:44:10.989216",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Proxy Server",
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/proxy_server/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class ProxyServer(BaseServer):
hostname: DF.Data
hostname_abbreviation: DF.Data | None
ip: DF.Data | None
ip6: DF.Data | None
is_primary: DF.Check
is_proxysql_setup: DF.Check
is_replication_setup: DF.Check
Expand Down
10 changes: 9 additions & 1 deletion press/press/doctype/registry_server/registry_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"is_server_setup",
"networking_section",
"ip",
"ip6",
"column_break_9",
"private_ip",
"private_mac_address",
Expand Down Expand Up @@ -75,6 +76,13 @@
"reqd": 1,
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.public_ip6_address",
"fieldname": "ip6",
"fieldtype": "Data",
"label": "IPv6",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.private_ip_address",
"fieldname": "private_ip",
Expand Down Expand Up @@ -204,7 +212,7 @@
"link_fieldname": "server"
}
],
"modified": "2023-12-13 15:09:46.909110",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Registry Server",
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/registry_server/registry_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class RegistryServer(BaseServer):
frappe_user_password: DF.Password | None
hostname: DF.Data
ip: DF.Data
ip6: DF.Data | None
is_server_setup: DF.Check
monitoring_password: DF.Password | None
private_ip: DF.Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"server_created",
"server",
"ip",
"ip6",
"ssh_user",
"column_break_smwr",
"existing_bench_present",
Expand Down Expand Up @@ -95,6 +96,12 @@
"label": "IP",
"reqd": 1
},
{
"fieldname": "ip6",
"fieldtype": "Data",
"in_list_view": 1,
"label": "IPv6"
},
{
"default": "root",
"fetch_from": ".ssh_user",
Expand Down Expand Up @@ -451,7 +458,7 @@
}
],
"links": [],
"modified": "2024-05-29 11:41:41.304954",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Self Hosted Server",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class SelfHostedServer(Document):
hostname: DF.Data | None
instance_type: DF.Data | None
ip: DF.Data
ip6: DF.Data | None
is_managed_database: DF.Check
mariadb_ip: DF.Data | None
mariadb_private_ip: DF.Data | None
Expand Down
10 changes: 9 additions & 1 deletion press/press/doctype/server/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"auto_add_storage_max",
"networking_section",
"ip",
"ip6",
"column_break_3",
"private_ip",
"private_mac_address",
Expand Down Expand Up @@ -87,6 +88,13 @@
"label": "IP",
"set_only_once": 1
},
{
"fetch_from": "virtual_machine.public_ip6_address",
"fieldname": "ip6",
"fieldtype": "Data",
"label": "IPv6",
"set_only_once": 1
},
{
"fieldname": "proxy_server",
"fieldtype": "Link",
Expand Down Expand Up @@ -526,7 +534,7 @@
}
],
"links": [],
"modified": "2024-09-24 12:56:06.423649",
"modified": "2024-10-15 15:28:10.193273",
"modified_by": "Administrator",
"module": "Press",
"name": "Server",
Expand Down
1 change: 1 addition & 0 deletions press/press/doctype/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ class Server(BaseServer):
hostname_abbreviation: DF.Data | None
ignore_incidents_since: DF.Datetime | None
ip: DF.Data | None
ip6: DF.Data | None
is_managed_database: DF.Check
is_primary: DF.Check
is_replication_setup: DF.Check
Expand Down
Loading

0 comments on commit eb5a537

Please sign in to comment.