Web-based Install

I had a couple of quick questions on the Gravity Web Installer:

  1. If I want to do a single node install, is it possible to run the web installer and then install Gravity on the same node? Right now, it won’t let me make progress until I have some other node join it (via running the curl command supplied in the Web Installer). If I try and run the curl command on that same machine, I get a port conflict error.

  2. Is it possible to bring up the Web Installer “progress” screen (basically the third step) for a cluster that’s being run via the CLI installer? Basically, I want to do an automatic installation (e.g. via CloudFormation), but still have the option for the user to be able to follow the installation progress along and see the output.

This is likely a bug. This is the expected process, is from a second shell on the same host, to run the join command. The reason is, some customers specifically want to use a temporary node when bootstrapping the cluster, so when doing an install like this, joining the same node is the expected process. Feel free to share the version, logs, etc on the conflict so we can check into it.

I don’t know of a way to do this. The ./gravity plan CLI command should work for cli install as well as upgrades on the current releases, and does show a sort of overview of what step the install is on, and how many steps are remaining. You can throw it into watch so that it refreshes.

Re (1), here is what I am running.

To launch the wizard:

[ec2-user@ip-10-1-10-138 odas]$ cd /home/ec2-user/odas && sudo ./gravity install --token=TjEYSuLJjs --advertise-addr=10.1.10.138 --cloud-provider=generic --config=cluster-config.yaml --pod-network-cidr="172.23.0.0/16" --service-cidr="172.34.0.0/16" --wizard
Tue Sep 24 22:33:22 UTC	Starting installer

To abort the installation and clean up the system,
press Ctrl+C two times in a row.

If the you get disconnected from the terminal, you can reconnect to the installer
agent by issuing 'gravity resume' command.

If the installation fails, use 'gravity plan' to inspect the state and
'gravity resume' to continue the operation.
See https://gravitational.com/gravity/docs/cluster/#managing-an-ongoing-operation for details.

Tue Sep 24 22:33:22 UTC	Connecting to installer
Tue Sep 24 22:33:28 UTC	Connected to installer
Tue Sep 24 22:33:28 UTC	Starting web UI install wizard
Tue Sep 24 22:33:28 UTC	Open this URL in browser: https://10.1.10.138:61009/web/installer/new/gravitational.io/odas/1.0.0-latest?install_token=TjEYSuLJjs
Tue Sep 24 22:33:28 UTC	Waiting for the operation to start

Running the curl:

[ec2-user@ip-10-1-10-138 ~]$ curl -s --tlsv1.2 -0 -k "https://10.1.10.138:61009/t/TjEYSuLJjs/master" | sudo bash
Tue Sep 24 22:34:16 UTC 2019 [INFO] Downloading install agent...
Tue Sep 24 22:34:16 UTC 2019 [INFO] Install agent will be using /tmp for temporary files
Tue Sep 24 22:34:16 UTC	Starting agent

To abort the agent and clean up the system,
press Ctrl+C two times in a row.

If the you get disconnected from the terminal, you can reconnect to the installer
agent by issuing 'gravity resume' command.
See https://gravitational.com/gravity/docs/cluster/#managing-an-ongoing-operation for details.

Tue Sep 24 22:34:16 UTC	Connecting to agent
Tue Sep 24 22:34:17 UTC	Connected to agent
Tue Sep 24 22:34:17 UTC	Connecting to cluster
Tue Sep 24 22:34:17 UTC	Connected to installer at https://10.1.10.138:61009
Tue Sep 24 22:34:17 UTC	Saving debug report to /usr/bin/crashreport.tgz
[ERROR]: listen tcp 10.1.10.138:3012: bind: address already in use

This is with Gravity 6.1.4. Happy to get the logs or crash report or whatever will be helpful. You can see the port bind:

[ec2-user@ip-10-1-10-138 ~]$ sudo netstat -pltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:61025         0.0.0.0:*               LISTEN      13637/gravity
tcp        0      0 10.1.10.138:3012        0.0.0.0:*               LISTEN      13637/gravity
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      2631/rpcbind
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3364/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      3099/master
tcp6       0      0 :::61024                :::*                    LISTEN      13637/gravity
tcp6       0      0 :::111                  :::*                    LISTEN      2631/rpcbind
tcp6       0      0 :::61009                :::*                    LISTEN      13637/gravity
tcp6       0      0 :::61010                :::*                    LISTEN      13637/gravity
tcp6       0      0 :::22                   :::*                    LISTEN      3364/sshd
tcp6       0      0 :::61022                :::*                    LISTEN      13637/gravity
tcp6       0      0 :::61023                :::*                    LISTEN      13637/gravity
[ec2-user@ip-10-1-10-138 ~]$ ps aux | grep 13637
root     13637 10.4  0.2 1688632 79560 ?       Ssl  22:33   0:20 /home/ec2-user/odas/gravity install --token TjEYSuLJjs --advertise-addr 10.1.10.138 --cloud-provider generic --config cluster-config.yaml --pod-network-cidr 172.23.0.0/16 --service-cidr 172.34.0.0/16 --wizard --from-service /home/ec2-user/odas

Regarding (2) - is there an API to access the output of gravity plan without having to access the CLI?

OK, if I re-run the provided command, I’m able to reproduce.

The only thing is, I’m not 100% sure ./gravity install --wizard is meant to be used this way, as our normal install script (./install) calls ./gravity wizard, which i what we normally use. Although gravity wizard doesn’t accept all the parameters that ./gravity install can use.

Anyways, I’m not sure if this is an intended use case, @r0mant might have more insight.

For 2, no we don’t have any type of API that can be used. Gravity plan is based off the cli tool interacting with etcd and local files, and I don’t believe we support any sort of parseable output either.