From 79e0e6fbfa5d4d60598f1bf2477a0c8f7d53bbf5 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Thu, 10 Dec 2020 15:42:11 -0500 Subject: [PATCH] set ip6 on local node. update docs --- .../service/boot/ActivationService.java | 20 +++++++++++-------- docs/launch-node-from-local.md | 4 +++- docs/remote-launcher.md | 11 +++++++--- utils/cobbzilla-utils | 2 +- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/bubble-server/src/main/java/bubble/service/boot/ActivationService.java b/bubble-server/src/main/java/bubble/service/boot/ActivationService.java index 93736487..0aef8281 100644 --- a/bubble-server/src/main/java/bubble/service/boot/ActivationService.java +++ b/bubble-server/src/main/java/bubble/service/boot/ActivationService.java @@ -44,8 +44,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; import static org.cobbzilla.util.daemon.ZillaRuntime.*; import static org.cobbzilla.util.io.StreamUtil.stream2string; import static org.cobbzilla.util.json.JsonUtil.json; -import static org.cobbzilla.util.network.NetworkUtil.getFirstPublicIpv4; -import static org.cobbzilla.util.network.NetworkUtil.getLocalhostIpv4; +import static org.cobbzilla.util.network.NetworkUtil.*; import static org.cobbzilla.util.system.Sleep.sleep; import static org.cobbzilla.wizard.model.entityconfig.ModelSetup.scrubSpecial; import static org.cobbzilla.wizard.resources.ResourceUtil.invalidEx; @@ -68,12 +67,17 @@ public class ActivationService { @Autowired private PackerService packerService; public BubbleNode bootstrapThisNode(Account account, ActivationRequest request) { - String ip = getFirstPublicIpv4(); - if (ip == null) { + String ip4 = getFirstPublicIpv4(); + if (ip4 == null) { log.warn("thisNode.ip4 will be localhost address, may not be reachable from other nodes"); - ip = getLocalhostIpv4(); + ip4 = getLocalhostIpv4(); + } + if (ip4 == null) die("bootstrapThisNode: no IP could be found, not even a localhost address"); + String ip6 = getFirstPublicIpv6(); + if (ip6 == null) { + log.warn("thisNode.ip6 will be localhost address, may not be reachable from other nodes"); + ip6 = IPv6_LOCALHOST; } - if (ip == null) die("bootstrapThisNode: no IP could be found, not even a localhost address"); if (request.hasSshKey()) { final String keyJson = json(request.getSshKey()); @@ -205,8 +209,8 @@ public class ActivationService { .setSizeType(ComputeNodeSizeType.local) .setCloud(localCloud.getUuid()) .setSslPort(network.getSslPort()) - .setIp4(ip) - // todo: also set ip6 if we have one + .setIp4(ip4) + .setIp6(ip6) .setAdminPort(configuration.getHttp().getPort()) .setState(BubbleNodeState.running)); diff --git a/docs/launch-node-from-local.md b/docs/launch-node-from-local.md index c4efdb3d..e6d69be2 100644 --- a/docs/launch-node-from-local.md +++ b/docs/launch-node-from-local.md @@ -25,7 +25,9 @@ You should now see the advanced launch settings screen, like the one below: In the "Bubble Type" drop-down, ensure that "Fork Bubble" is selected. -In the "Fork Host" field, enter the fully-qualified domain name (FQDN) that the Bubble will be known as. +If you leave the "Fork Host" field blank, the system will assign a hostname for you. +Or, you set the "Fork Host" to be the fully-qualified domain name (FQDN) that the Bubble will be known as. + The FQDN has the form `host.net.domain`, where `host` and `net` identify the Bubble and can be whatever you want (at least 3 characters each), and `domain` is the domain that's been selected in the "Domain" field. diff --git a/docs/remote-launcher.md b/docs/remote-launcher.md index 53e69cff..9e81336c 100644 --- a/docs/remote-launcher.md +++ b/docs/remote-launcher.md @@ -36,7 +36,9 @@ You should now see the advanced launch settings screen, like the one below: In the "Bubble Type" drop-down box, ensure "Fork Launcher" is selected. -In the "Fork Host" field, enter the fully-qualified domain name (FQDN) that the Bubble will be known as. +If you leave the "Fork Host" field blank, the system will assign a hostname for you. +Or, you set the "Fork Host" to be the fully-qualified domain name (FQDN) that the Bubble will be known as. + The FQDN has the form `host.net.domain`, where `host` and `net` identify the Bubble and can be whatever you want (at least 3 characters each), and `domain` is the domain that's been selected in the "Domain" field. @@ -61,7 +63,10 @@ If the image is still being built or needs to be built, that will add some time The [Bubble packer documentation](packer.md) has more details on this process. ## Next Steps -When your Bubble finishes launching, it will show a "Connect to Bubble" button. Click this and you'll be connected -to your Remote Launcher. +When your Bubble finishes launching, you'll see something like the screenshot below. +Click or tap "Connect to Bubble" to be connected to your new Bubble Launcher. You can then sign in. + +#### My Bubble Screen +screenshot of My Bubble screen You are now ready to [Launch a Bubble](launch-node.md) from the Remote Launcher diff --git a/utils/cobbzilla-utils b/utils/cobbzilla-utils index 9b452ea6..091dea6b 160000 --- a/utils/cobbzilla-utils +++ b/utils/cobbzilla-utils @@ -1 +1 @@ -Subproject commit 9b452ea619a732d77a4b9426daec4612c91ace90 +Subproject commit 091dea6bc33e3b8bcff96b62008eadf7fe2c22ac