From 51e21c3e467dd63cb5f85cd3396df9308f49cf01 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sun, 16 Oct 2022 21:12:33 +0200 Subject: [PATCH] Get rid of garage web port It's not clear how we would be using it at this point, and garage 0.8.0 allows us to leave it off, so might as well do so. --- AppDir/etc/daemon.yml | 3 +-- docs/operator/contributing-storage.md | 2 -- go-workspace/src/bootstrap/hosts.go | 1 - go-workspace/src/cmd/entrypoint/daemon_util.go | 2 -- go-workspace/src/cmd/nebula-entrypoint/main.go | 5 ----- go-workspace/src/daemon_yml.go | 3 +-- go-workspace/src/garage/tpl.go | 5 ----- 7 files changed, 2 insertions(+), 19 deletions(-) diff --git a/AppDir/etc/daemon.yml b/AppDir/etc/daemon.yml index e0ac6ff..17e9ae9 100644 --- a/AppDir/etc/daemon.yml +++ b/AppDir/etc/daemon.yml @@ -64,7 +64,7 @@ storage: # Capacity declares how many gigabytes can be stored in each allocation, and # is required. It must be a multiple of 100. # - # The various ports are all required and must all be unique within and across + # The ports are all required and must all be unique within and across # allocations. allocations: @@ -73,4 +73,3 @@ storage: # capacity: 1200 # api_port: 3900 # rpc_port: 3901 - # web_port: 3902 diff --git a/docs/operator/contributing-storage.md b/docs/operator/contributing-storage.md index ca13377..d1447ce 100644 --- a/docs/operator/contributing-storage.md +++ b/docs/operator/contributing-storage.md @@ -36,7 +36,6 @@ storage: capacity: 1200 api_port: 3900 rpc_port: 3901 - web_port: 3902 # 100 GB (the minimum) are being shared from drive2 - data_path: /mnt/drive2/cryptic-net/data @@ -44,7 +43,6 @@ storage: capacity: 100 api_port: 3910 rpc_port: 3911 - web_port: 3912 ``` ## Setup Firewall diff --git a/go-workspace/src/bootstrap/hosts.go b/go-workspace/src/bootstrap/hosts.go index a4efef8..0042457 100644 --- a/go-workspace/src/bootstrap/hosts.go +++ b/go-workspace/src/bootstrap/hosts.go @@ -24,7 +24,6 @@ type NebulaHost struct { type GarageHostInstance struct { RPCPort int `yaml:"rpc_port"` S3APIPort int `yaml:"s3_api_port"` - WebPort int `yaml:"web_port"` } // GarageHost describes the garage configuration of a Host which is relevant for diff --git a/go-workspace/src/cmd/entrypoint/daemon_util.go b/go-workspace/src/cmd/entrypoint/daemon_util.go index 5e01e1b..5b9e8e5 100644 --- a/go-workspace/src/cmd/entrypoint/daemon_util.go +++ b/go-workspace/src/cmd/entrypoint/daemon_util.go @@ -60,7 +60,6 @@ func mergeDaemonIntoBootstrap(env *crypticnet.Env) error { host.Garage.Instances = append(host.Garage.Instances, bootstrap.GarageHostInstance{ RPCPort: alloc.RPCPort, S3APIPort: alloc.S3APIPort, - WebPort: alloc.WebPort, }) } } @@ -160,7 +159,6 @@ func garageWriteChildConf( RPCAddr: net.JoinHostPort(thisHost.Nebula.IP, strconv.Itoa(alloc.RPCPort)), APIAddr: net.JoinHostPort(thisHost.Nebula.IP, strconv.Itoa(alloc.S3APIPort)), - WebAddr: net.JoinHostPort(thisHost.Nebula.IP, strconv.Itoa(alloc.WebPort)), BootstrapPeers: env.Bootstrap.GarageRPCPeerAddrs(), }) diff --git a/go-workspace/src/cmd/nebula-entrypoint/main.go b/go-workspace/src/cmd/nebula-entrypoint/main.go index 0b82b9f..949f85e 100644 --- a/go-workspace/src/cmd/nebula-entrypoint/main.go +++ b/go-workspace/src/cmd/nebula-entrypoint/main.go @@ -102,11 +102,6 @@ func Main() { Proto: "tcp", Host: "any", }, - crypticnet.ConfigFirewallRule{ - Port: strconv.Itoa(alloc.WebPort), - Proto: "tcp", - Host: "any", - }, ) } diff --git a/go-workspace/src/daemon_yml.go b/go-workspace/src/daemon_yml.go index 62f3fdb..d0f0d4c 100644 --- a/go-workspace/src/daemon_yml.go +++ b/go-workspace/src/daemon_yml.go @@ -31,9 +31,8 @@ type DaemonYmlStorageAllocation struct { DataPath string `yaml:"data_path"` MetaPath string `yaml:"meta_path"` Capacity int `yaml:"capacity"` - S3APIPort int `yaml:"api_port"` // TODO fix field name here + S3APIPort int `yaml:"s3_api_port"` RPCPort int `yaml:"rpc_port"` - WebPort int `yaml:"web_port"` } // DaemonYml describes the structure of the daemon.yml file. diff --git a/go-workspace/src/garage/tpl.go b/go-workspace/src/garage/tpl.go index c561a3c..f5d3c9b 100644 --- a/go-workspace/src/garage/tpl.go +++ b/go-workspace/src/garage/tpl.go @@ -17,7 +17,6 @@ type GarageTomlData struct { RPCAddr string APIAddr string - WebAddr string BootstrapPeers []string } @@ -41,10 +40,6 @@ bootstrap_peers = [{{- range .BootstrapPeers }} api_bind_addr = "{{ .APIAddr }}" s3_region = "garage" -[s3_web] -bind_addr = "{{ .WebAddr }}" -root_domain = ".example.com" - `)) // RenderGarageToml renders a garage.toml using the given data into the writer.