-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,160 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
187 changes: 169 additions & 18 deletions
187
upcoming/noble/amd64/eth-node-lodestar-testnet/0.0.1-1/eth-node-lodestar-testnet.sps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,177 @@ | ||
name = "eth-node-lodestar-testnet" | ||
bin_package = "eth-node-config-testnet-lodestar" | ||
binary = "/usr/lib/eth-node-config-testnet/bin/run-lodestar.sh" | ||
conf_param = "--conf-file" | ||
user = { group = true, create = { home = false } } | ||
bin_package = "eth-node-lodestar" | ||
binary = "/usr/lib/eth-node-lodestar-testnet/run-lodestar-service.sh" | ||
user = { name = "eth-node-lodestar-testnet", group = true, create = { home = false } } | ||
runtime_dir = { mode = "750" } | ||
# Service Fields | ||
after = "multi-user.target" | ||
service_type = "simple" | ||
extra_service_config = """ | ||
# no need to specify, these come from debcrafter | ||
# User=eth-node-lodestar-testnet | ||
# NoNewPrivileges=true | ||
# ProtectHome=true | ||
# PrivateTmp=true | ||
# PrivateDevices=true | ||
# additional flags not specified by debcrafter | ||
CapabilityBoundingSet= | ||
IPAddressDeny=none | ||
LockPersonality=true | ||
PrivateIPC=true | ||
PrivateUsers=true | ||
ProtectClock=true | ||
ProtectControlGroups=true | ||
ProtectHostname=true | ||
ProtectKernelLogs=true | ||
ProtectKernelModules=true | ||
ProtectKernelTunables=true | ||
ProtectProc=invisible | ||
ReadWritePaths=/var/lib/eth-node-testnet/lodestar | ||
ReadOnlyPaths=/var/lib/eth-node-testnet | ||
RemoveIPC=true | ||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK | ||
RestrictNamespaces=true | ||
RestrictRealtime=true | ||
RestrictSUIDSGID=true | ||
SystemCallArchitectures=native | ||
# TODO: this specially not working with only lodestar | ||
# SystemCallFilter=@system-service | ||
# does not work with lodestar as well | ||
#SystemCallFilter=~@privileged @resources @obsolete | ||
UMask=0077 | ||
WorkingDirectory=/var/lib/eth-node-testnet/lodestar | ||
""" | ||
## hack to actually use system.d but let debcrafter manage the user creation | ||
add_files = ["debian/lib/systemd/system/eth-node-lodestar-testnet.service /lib/systemd/system/"] | ||
add_files = [ | ||
"debian/scripts/run-lodestar-service.sh /usr/lib/eth-node-lodestar-testnet/", | ||
"debian/scripts/run-lodestar.sh /usr/lib/eth-node-lodestar-testnet/bin/", | ||
"debian/scripts/postprocess.sh /usr/lib/eth-node-lodestar-testnet", | ||
"debian/tmp/eth-node-lodestar-testnet.service /lib/systemd/system/", | ||
] | ||
provides = ["eth-node-testnet-cl-service"] | ||
conflicts = ["eth-node-testnet-cl-service"] | ||
depends=["eth-node-config-testnet-lodestar", "eth-node-testnet-config", "eth-node-testnet"] | ||
summary = "systemd service files for eth-node-lodestar using eth-node-config-testnet-lodestar and eth-node-testnet-config" | ||
|
||
# TODO debcrafter should do this | ||
# [config."vars"] | ||
# format = "plain" | ||
|
||
# [config."vars.toml".ivars.base_dir] | ||
# type = "path" | ||
# file_type = "dir" | ||
# create = { mode = 755, owner = "$service", group = "$service" } | ||
# default = "/var/lib/eth-node-testnet/besu" | ||
depends=["eth-node-testnet-config", "eth-node-testnet"] | ||
summary = "service file for eth-node-lodestar for network: testnet" | ||
|
||
[config."lodestar-testnet.conf".postprocess] | ||
command = ["bash", "/usr/lib/eth-node-lodestar-testnet/postprocess.sh"] | ||
|
||
[config."lodestar-testnet.conf"] | ||
format = "plain" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_DATA_DIR"] | ||
type = "string" | ||
default = "$BASE_CONFIG_DATA_DIR/lodestar" | ||
priority = "low" | ||
summary = "Lodestar root data directory" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_ETH1_DEPOSIT_CONTRACT_DEPLOY_BLOCK"] | ||
type = "string" | ||
default = "0" | ||
priority = "low" | ||
summary = "Eth1 deposit contract deploy block number" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_NETWORK_CONNECT_TO_DISCV5_BOOTNODES"] | ||
type = "string" | ||
default = "false" | ||
priority = "low" | ||
summary = "Whether to connect to discv5 bootnodes" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_DEV_DISCV5"] | ||
type = "string" | ||
default = "true" | ||
priority = "low" | ||
summary = "Enable discv5 discovery" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_ETH1"] | ||
type = "string" | ||
default = "true" | ||
priority = "low" | ||
summary = "Follow the Eth1 chain" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_ETH1_PROVIDER_URLS"] | ||
type = "string" | ||
default = "" | ||
priority = "low" | ||
summary = "URLs to Eth1 node with enabled RPC" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_REST"] | ||
type = "string" | ||
default = "true" | ||
priority = "low" | ||
summary = "Enable HTTP API" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_DEV_REST_PORT"] | ||
type = "string" | ||
default = "9597" | ||
priority = "low" | ||
summary = "Set port for HTTP API" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_DEV_PORT"] | ||
type = "string" | ||
default = "9000" | ||
priority = "low" | ||
summary = "TCP/UDP port for Lodestar" | ||
|
||
# [config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_REST_NAMESPACE"] | ||
# type = "string" | ||
# default = "localhost" | ||
# priority = "low" | ||
# summary = "Node working directory" | ||
# summary = "Pick namespaces to expose for HTTP API" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_REST_ADDRESS"] | ||
type = "string" | ||
default = "127.0.0.1" | ||
priority = "low" | ||
summary = "Set host for HTTP API" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_NAT"] | ||
type = "string" | ||
default = "true" | ||
priority = "low" | ||
summary = "Allow non-local addresses configuration" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_SUBSCRIBE_ALL_SUBNETS"] | ||
type = "string" | ||
default = "true" | ||
priority = "low" | ||
summary = "Subscribe to all subnets regardless of validator count" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_JWT_SECRET"] | ||
type = "string" | ||
default = "$BASE_CONFIG_SECRETS_FILE" | ||
priority = "low" | ||
summary = "Path to shared JWT secret for authentication with EL client's RPC server" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_PARAMS_FILE"] | ||
type = "string" | ||
default = "$BASE_CONFIG_CUSTOM_NETWORK_CHAINCONFIG" | ||
priority = "low" | ||
summary = "Network configuration file" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_GENSIS_STATE_FILE"] | ||
type = "string" | ||
default = "$BASE_CONFIG_CUSTOM_NETWORK_GENESIS_STATE" | ||
priority = "low" | ||
summary = "Genesis state file for custom network" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_DEV_BOOTNODES"] | ||
type = "string" | ||
default = "" | ||
priority = "low" | ||
summary = "Bootnodes for discv5 discovery" | ||
|
||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_REST_NAMESPACE"] | ||
type = "string" | ||
default = "eth" | ||
priority = "low" | ||
summary = "Pick namespaces to expose for HTTP API" | ||
|
||
[config."lodestar-testnet.conf".ivars."LODESTAR_CLI_BN_REST_PORT"] | ||
type = "string" | ||
default = "$BASE_CONFIG_CL_RPC_PORT" | ||
priority = "low" | ||
summary = "Set port for HTTP API (custom config)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
...ble/amd64/eth-node-lodestar-testnet/0.0.1-1/src/debian/eth-node-lodestar-testnet.postinst
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
...-lodestar-testnet/0.0.1-1/src/debian/lib/systemd/system/eth-node-lodestar-testnet.service
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
upcoming/noble/amd64/eth-node-lodestar-testnet/0.0.1-1/src/debian/scripts/postprocess.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
|
||
trap 'echo "Error: Command \"$BASH_COMMAND\" failed with exit code $?"' ERR | ||
|
||
echo "Creating user and group eth-node-testnet" | ||
adduser --system --quiet --group eth-node-testnet || true | ||
|
||
|
||
echo "Creating /var/lib/eth-node-testnet directory" | ||
mkdir -p /var/lib/eth-node-testnet | ||
|
||
echo "Setting ownership of /var/lib/eth-node-testnet to eth-node-testnet" | ||
chown eth-node-testnet:eth-node-testnet /var/lib/eth-node-testnet | ||
|
||
echo "Creating /var/lib/eth-node-testnet/lodestar directory" | ||
mkdir -p /var/lib/eth-node-testnet/lodestar | ||
|
||
echo "Setting ownership of /var/lib/eth-node-testnet/lodestar to eth-node-lodestar-testnet" | ||
chown -R eth-node-lodestar-testnet:eth-node-lodestar-testnet /var/lib/eth-node-testnet/lodestar | ||
|
||
echo "Adding eth-node-lodestar-testnet to eth-node-testnet group" | ||
usermod -aG eth-node-testnet eth-node-lodestar-testnet || true | ||
|
||
exit 0 |
6 changes: 6 additions & 0 deletions
6
.../noble/amd64/eth-node-lodestar-testnet/0.0.1-1/src/debian/scripts/run-lodestar-service.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
exec /usr/lib/eth-node-lodestar-testnet/bin/run-lodestar.sh \ | ||
--conf-file /etc/eth-node-testnet-config/testnet.conf \ | ||
--conf-file /etc/eth-node-lodestar-testnet/lodestar-testnet.conf |
Oops, something went wrong.