From 9ede0f043db21e2a27a4d9e9fcc18a3852b57fb0 Mon Sep 17 00:00:00 2001 From: grantnoble Date: Thu, 5 Mar 2020 15:19:45 +1000 Subject: [PATCH 1/3] Add Kubernetes info for NAT method Added the KUBERNETES option for --nat-method and provided extra info on the Configuring NAT page. Signed-off-by: grantnoble --- docs/HowTo/Find-and-Connect/Specifying-NAT.md | 19 +++++++++++++---- docs/Reference/CLI/CLI-Syntax.md | 21 ++++++++++++++----- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/docs/HowTo/Find-and-Connect/Specifying-NAT.md b/docs/HowTo/Find-and-Connect/Specifying-NAT.md index bd208f9caf0..130c2ab84e5 100644 --- a/docs/HowTo/Find-and-Connect/Specifying-NAT.md +++ b/docs/HowTo/Find-and-Connect/Specifying-NAT.md @@ -50,17 +50,28 @@ By specifying `MANUAL`: Specify `DOCKER` to explicitly specify Hyperledger Besu is running inside a Docker container. If you specify `DOCKER`, you advertise the host IP address not the container IP address. -The host IP is the advertised host specified in the +The host IP address is the advertised host specified in the [`docker run` command](https://docs.docker.com/engine/reference/commandline/run/#add-entries-to-container-hosts-file---add-host). If not specified in the `docker run` command, the advertised host defaults to the values for [`--p2p-host`](../../Reference/CLI/CLI-Syntax.md#p2p-host) and [`--p2p-port`](../../Reference/CLI/CLI-Syntax.md#p2p-port). +## Kubernetes + +Specify `KUBERNETES` to explicitly specify Hyperledger Besu is running inside a Kubernetes cluster. +Besu automatically detects if it is running inside of a Kubernetes cluster and interacts with +Kubernetes APIs as required to determine external IP addresses and exposed ports. The configuration +is stored in `/opt/besu/shared/kube-config`. + ## Auto -`AUTO` is the default NAT method. `AUTO` detects if Besu is running inside Docker container. If -inside a Docker container, `AUTO` acts as if you specified [`DOCKER`](#docker). If not inside a -Docker container, `AUTO` acts as if you specified [`NONE`](#none). +`AUTO` is the default NAT method. `AUTO` detects if Besu is running inside a Docker container or a +Kubernetes cluster. If running inside: + +* A Docker container, `AUTO` acts as if you specified [`DOCKER`](#docker). +* A Kubernetes cluster, `AUTO` acts as if you specified [`KUBERNETES`](#kubernetes). +* Neither a Docker container nor a Kubernetes cluster, `AUTO` acts as if you specified + [`NONE`](#none). ## None diff --git a/docs/Reference/CLI/CLI-Syntax.md b/docs/Reference/CLI/CLI-Syntax.md index ac8eb063fae..c70314f73a4 100644 --- a/docs/Reference/CLI/CLI-Syntax.md +++ b/docs/Reference/CLI/CLI-Syntax.md @@ -767,16 +767,27 @@ Default is 1000. nat-method="UPNP" ``` -Specify the method for handling [NAT environments](../../HowTo/Find-and-Connect/Specifying-NAT.md). -Options are: [`UPNP`, `MANUAL`, `DOCKER`, `AUTO`, and `NONE`](../../HowTo/Find-and-Connect/Specifying-NAT.md). +Specify the method for handling [NAT environments](../../HowTo/Find-and-Connect/Specifying-NAT.md). +Options are:[`UPNP`](../../HowTo/Find-and-Connect/Specifying-NAT.md#upnp), +[`MANUAL`](../../HowTo/Find-and-Connect/Specifying-NAT.md#manual), +[`DOCKER`](../../HowTo/Find-and-Connect/Specifying-NAT.md#docker), +[`KUBERNETES`](../../HowTo/Find-and-Connect/Specifying-NAT.md#kubernetes), +[`AUTO`](../../HowTo/Find-and-Connect/Specifying-NAT.md#auto), and +[`NONE`](../../HowTo/Find-and-Connect/Specifying-NAT.md#none). The default is `AUTO`. `NONE` disables NAT functionality. !!!tip - UPnP support is often disabled by default in networking firmware. If disabled by default, explicitly enable UPnP support. + + UPnP support is often disabled by default in networking firmware. If disabled by default, + explicitly enable UPnP support. !!!notes - * Option `UPNP` might introduce delays during node startup, especially on networks where no UPnP gateway device can be found. - * `--nat-method=DOCKER` must be specified when using the [Besu Docker image](../../HowTo/Get-Started/Run-Docker-Image.md). + + Specifying `UPNP` might introduce delays during node startup, especially on networks without a + UPnP gateway device. + + You must specify `DOCKER` when using the + [Besu Docker image](../../HowTo/Get-Started/Run-Docker-Image.md). ### network From 58a565d3a51a7db48cc07b35a997d860588bcca2 Mon Sep 17 00:00:00 2001 From: grantnoble Date: Thu, 5 Mar 2020 15:32:52 +1000 Subject: [PATCH 2/3] Updated list of nat-method options to be a bulleted list. Signed-off-by: grantnoble --- docs/Reference/CLI/CLI-Syntax.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/Reference/CLI/CLI-Syntax.md b/docs/Reference/CLI/CLI-Syntax.md index c70314f73a4..84a0075060e 100644 --- a/docs/Reference/CLI/CLI-Syntax.md +++ b/docs/Reference/CLI/CLI-Syntax.md @@ -768,12 +768,15 @@ nat-method="UPNP" ``` Specify the method for handling [NAT environments](../../HowTo/Find-and-Connect/Specifying-NAT.md). -Options are:[`UPNP`](../../HowTo/Find-and-Connect/Specifying-NAT.md#upnp), -[`MANUAL`](../../HowTo/Find-and-Connect/Specifying-NAT.md#manual), -[`DOCKER`](../../HowTo/Find-and-Connect/Specifying-NAT.md#docker), -[`KUBERNETES`](../../HowTo/Find-and-Connect/Specifying-NAT.md#kubernetes), -[`AUTO`](../../HowTo/Find-and-Connect/Specifying-NAT.md#auto), and -[`NONE`](../../HowTo/Find-and-Connect/Specifying-NAT.md#none). +The options are: + +* [`UPNP`](../../HowTo/Find-and-Connect/Specifying-NAT.md#upnp) +* [`MANUAL`](../../HowTo/Find-and-Connect/Specifying-NAT.md#manual) +* [`DOCKER`](../../HowTo/Find-and-Connect/Specifying-NAT.md#docker) +* [`KUBERNETES`](../../HowTo/Find-and-Connect/Specifying-NAT.md#kubernetes) +* [`AUTO`](../../HowTo/Find-and-Connect/Specifying-NAT.md#auto) +* [`NONE`](../../HowTo/Find-and-Connect/Specifying-NAT.md#none). + The default is `AUTO`. `NONE` disables NAT functionality. !!!tip From 5c94b6851aaccf7e8ab65eed2aeca472d46a1444 Mon Sep 17 00:00:00 2001 From: grantnoble Date: Fri, 13 Mar 2020 12:16:19 +1000 Subject: [PATCH 3/3] Change the order of Kubernetes and Docker Signed-off-by: grantnoble --- docs/HowTo/Find-and-Connect/Specifying-NAT.md | 22 +++++++++---------- docs/Reference/CLI/CLI-Syntax.md | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/HowTo/Find-and-Connect/Specifying-NAT.md b/docs/HowTo/Find-and-Connect/Specifying-NAT.md index 130c2ab84e5..d4c2606de1b 100644 --- a/docs/HowTo/Find-and-Connect/Specifying-NAT.md +++ b/docs/HowTo/Find-and-Connect/Specifying-NAT.md @@ -45,6 +45,13 @@ By specifying `MANUAL`: [`rpc-http-port`](../../Reference/CLI/CLI-Syntax.md#rpc-http-port) define the advertised host and port for the JSON-RPC service. +## Kubernetes + +Specify `KUBERNETES` to explicitly specify Hyperledger Besu is running inside a Kubernetes cluster. +Besu automatically detects if it is running inside of a Kubernetes cluster and interacts with +Kubernetes APIs as required to determine external IP addresses and exposed ports. The configuration +is stored in `/opt/besu/shared/kube-config`. + ## Docker Specify `DOCKER` to explicitly specify Hyperledger Besu is running inside a Docker container. If @@ -56,21 +63,14 @@ If not specified in the `docker run` command, the advertised host defaults to th [`--p2p-host`](../../Reference/CLI/CLI-Syntax.md#p2p-host) and [`--p2p-port`](../../Reference/CLI/CLI-Syntax.md#p2p-port). -## Kubernetes - -Specify `KUBERNETES` to explicitly specify Hyperledger Besu is running inside a Kubernetes cluster. -Besu automatically detects if it is running inside of a Kubernetes cluster and interacts with -Kubernetes APIs as required to determine external IP addresses and exposed ports. The configuration -is stored in `/opt/besu/shared/kube-config`. - ## Auto -`AUTO` is the default NAT method. `AUTO` detects if Besu is running inside a Docker container or a -Kubernetes cluster. If running inside: +`AUTO` is the default NAT method. `AUTO` detects if Besu is running inside a Kubernetes cluster or +a Docker container. If running inside: -* A Docker container, `AUTO` acts as if you specified [`DOCKER`](#docker). * A Kubernetes cluster, `AUTO` acts as if you specified [`KUBERNETES`](#kubernetes). -* Neither a Docker container nor a Kubernetes cluster, `AUTO` acts as if you specified +* A Docker container, `AUTO` acts as if you specified [`DOCKER`](#docker). +* Neither a Kubernetes cluster nor a Docker container, `AUTO` acts as if you specified [`NONE`](#none). ## None diff --git a/docs/Reference/CLI/CLI-Syntax.md b/docs/Reference/CLI/CLI-Syntax.md index 84a0075060e..b88380ad763 100644 --- a/docs/Reference/CLI/CLI-Syntax.md +++ b/docs/Reference/CLI/CLI-Syntax.md @@ -772,8 +772,8 @@ The options are: * [`UPNP`](../../HowTo/Find-and-Connect/Specifying-NAT.md#upnp) * [`MANUAL`](../../HowTo/Find-and-Connect/Specifying-NAT.md#manual) -* [`DOCKER`](../../HowTo/Find-and-Connect/Specifying-NAT.md#docker) * [`KUBERNETES`](../../HowTo/Find-and-Connect/Specifying-NAT.md#kubernetes) +* [`DOCKER`](../../HowTo/Find-and-Connect/Specifying-NAT.md#docker) * [`AUTO`](../../HowTo/Find-and-Connect/Specifying-NAT.md#auto) * [`NONE`](../../HowTo/Find-and-Connect/Specifying-NAT.md#none).