Skip to content

Guided installer for server deployments (version v 0.2.0) - #165

Open
paolocappelletti wants to merge 1 commit into
mainfrom
pc/install-helper
Open

paolocappelletti wants to merge 1 commit into
mainfrom
pc/install-helper

Conversation

@paolocappelletti

Copy link
Copy Markdown
Collaborator

Guided installer script for server deployments
(Since it is based on 0.2.0 has been openend on master branch)

@saratnt saratnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Claude:
_pkg/manager/config.go:190 builds the URL as exactly:

protocol + "://" + address + ":" + port

In case the address contians a path, the port lands inside the path. Eg
https://horizen-testnet.rpc.caldera.xyz/http:443 instead of https://horizen-testnet.rpc.caldera.xyz:443/http

Comment thread install-helper/README.md
| | `horizen-l3-testnet` | `base-sepolia` |
|---|---|---|
| chainId | 2651420 | 84532 |
| RPC | `https://horizen-testnet.rpc.caldera.xyz` | `https://sepolia.base.org` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be https://horizen-testnet.rpc.caldera.xyz/http?

NET_RPC_PROTOCOL="https"
NET_RPC_HOST="horizen-testnet.rpc.caldera.xyz"
NET_RPC_PORT="443"
NET_RPC_URL="https://horizen-testnet.rpc.caldera.xyz"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be https://horizen-testnet.rpc.caldera.xyz/http?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

privileged: true + devices: /dev/vsock survive into a TCP-only bundle.
Both executor and manager keep the vsock device mapping, but the bundle forces CHANNEL_TYPE='tcp' and no-TEE. On a server without /dev/vsock (the common case for a plain VM), docker compose up fails at container creation with error gathering device information while adding custom device "/dev/vsock". README-DEPLOY.md troubleshoots port and subnet collisions but not this. Strip devices (and privileged, which is unnecessary here) for CHANNEL_TYPE=tcp, or document modprobe vhost_vsock as a server prerequisite.

warn "RPC $method returned an error: $resp"
return 1
fi
printf '%s' "$resp" | sed -n 's/.*"result"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rpc_result exits 0 with empty stdout when its sed doesn't match the response shape (eg in case of a HTML 404 error). Then some checks don't work as expected (eg at line 316, 652, 725)

#-----------------------------------------------------------------------------
readonly SCRIPT_NAME="$(basename "$0")"
readonly REPO_SLUG="HorizenOfficial/vela"
readonly SUPPORTED_VERSIONS=("0.2.0")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remember at any new release to update this variable. Claude suggests one of the following options:

  • Minimal — extend the CLAUDE.md note with the release-time trigger: "Cutting a release requires adding the new version to SUPPORTED_VERSIONS in install-helper/vela-install.sh; the installer offers a closed menu and cannot install a tag that is not listed."
  • Enforced — add a step to the existing v* tag job asserting ${GITHUB_REF_NAME#v} appears in SUPPORTED_VERSIONS. Cheap, and it fails at exactly the right moment.
  • Structural — derive the list instead of hardcoding it (GitHub's tag list, or the ## headings in CHANGELOG.md), and keep the shape assertions as the real safety net, since they already stop the run with an explicit error when an unfamiliar tag doesn't match.

// volume mounts of dropped volumes (e.g. horizen-cce-deploy-data:/deploy-data).
bl = filterKeyBlock(bl, 4, 'volumes', (name) => !dropVolumes.has(name));
// "profiles: [...]" only exists on kms-proxy, but drop defensively.
bl = dropKeyBlock(bl, 4, 'profiles');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropKeyBlock(bl, 4, 'profiles') matches only a bare profiles: line; upstream uses the inline form profiles: ["kms"]. Dead today (kms-proxy is dropped wholesale), but it won't protect a kept service that later gains a profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants