Skip to content

Commit a5dfebf

Browse files
authored
Merge pull request #718 from pinheadmz/cleanup
Clean up and improve UX when creating a new project
2 parents e2a0036 + 2d87ed1 commit a5dfebf

File tree

17 files changed

+207
-175
lines changed

17 files changed

+207
-175
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
- logging_test.py
4343
- ln_basic_test.py
4444
- ln_test.py
45+
- plugin_test.py
4546
- rpc_test.py
4647
- services_test.py
4748
- signet_test.py
48-
- simln_test.py
4949
- scenarios_test.py
5050
- namespace_admin_test.py
5151
- wargames_test.py

resources/networks/fork_observer/node-defaults.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/warnet/constants.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Constants used throughout the project
77
# Storing as constants for now but we might want a more sophisticated config management
88
# at some point.
9-
SUPPORTED_TAGS = ["27.0", "26.0", "25.1", "24.2", "23.2", "22.2"]
9+
SUPPORTED_TAGS = ["29.0", "28.1", "27.0", "26.0", "25.1", "24.2", "23.2", "22.2"]
1010
DEFAULT_TAG = SUPPORTED_TAGS[0]
1111
WEIGHTED_TAGS = [
1212
tag for index, tag in enumerate(reversed(SUPPORTED_TAGS)) for _ in range(index + 1)
@@ -48,6 +48,13 @@ class AnnexMember(Enum):
4848

4949
PLUGIN_ANNEX = "annex"
5050

51+
DEFAULT_IMAGE_REPO = "bitcoindevproject/bitcoin"
52+
53+
# Bitcoin Core config
54+
FORK_OBSERVER_RPCAUTH = "forkobserver:1418183465eecbd407010cf60811c6a0$d4e5f0647a63429c218da1302d7f19fe627302aeb0a71a74de55346a25d8057c"
55+
# Fork Observer config
56+
FORK_OBSERVER_RPC_USER = "forkobserver"
57+
FORK_OBSERVER_RPC_PASSWORD = "tabconf2024"
5158

5259
# Directories and files for non-python assets, e.g., helm charts, example scenarios, default configs
5360
SRC_DIR = files("warnet")
@@ -72,7 +79,6 @@ class AnnexMember(Enum):
7279
CADDY_CHART = str(files("resources.charts").joinpath("caddy"))
7380
CADDY_INGRESS_NAME = "caddy-ingress"
7481

75-
DEFAULT_NETWORK = Path("6_node_bitcoin")
7682
DEFAULT_NAMESPACES = Path("two_namespaces_two_users")
7783

7884
# Kubeconfig related stuffs
@@ -136,7 +142,7 @@ class AnnexMember(Enum):
136142
"helm repo update",
137143
f"helm upgrade --install --namespace warnet-logging --create-namespace --values {MANIFESTS_DIR}/loki_values.yaml loki grafana/loki --version 5.47.2",
138144
"helm upgrade --install --namespace warnet-logging promtail grafana/promtail --create-namespace",
139-
"helm upgrade --install --namespace warnet-logging prometheus prometheus-community/kube-prometheus-stack --namespace warnet-logging --create-namespace --set grafana.enabled=false",
145+
"helm upgrade --install --namespace warnet-logging prometheus prometheus-community/kube-prometheus-stack --namespace warnet-logging --create-namespace --set grafana.enabled=false --set prometheus.prometheusSpec.maximumStartupDurationSeconds=300",
140146
f"helm upgrade --install grafana-dashboards {CHARTS_DIR}/grafana-dashboards --namespace warnet-logging --create-namespace",
141147
f"helm upgrade --install --namespace warnet-logging --create-namespace loki-grafana grafana/grafana --values {MANIFESTS_DIR}/grafana_values.yaml",
142148
]
@@ -145,7 +151,7 @@ class AnnexMember(Enum):
145151
INGRESS_HELM_COMMANDS = [
146152
"helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx",
147153
"helm repo update",
148-
f"helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --namespace {INGRESS_NAMESPACE} --create-namespace",
154+
f"helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --namespace {INGRESS_NAMESPACE} --create-namespace --set controller.progressDeadlineSeconds=600",
149155
]
150156

151157
# Helm binary

src/warnet/deploy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
DEFAULTS_FILE,
1616
DEFAULTS_NAMESPACE_FILE,
1717
FORK_OBSERVER_CHART,
18+
FORK_OBSERVER_RPC_PASSWORD,
19+
FORK_OBSERVER_RPC_USER,
1820
HELM_COMMAND,
1921
INGRESS_HELM_COMMANDS,
2022
LOGGING_CRD_COMMANDS,
@@ -331,8 +333,8 @@ def deploy_fork_observer(directory: Path, debug: bool) -> bool:
331333
description = "{node_name}.{default_namespace}.svc:{int(p2pport)}"
332334
rpc_host = "{node_name}.{default_namespace}.svc"
333335
rpc_port = {int(rpcport)}
334-
rpc_user = "forkobserver"
335-
rpc_password = "tabconf2024"
336+
rpc_user = "{FORK_OBSERVER_RPC_USER}"
337+
rpc_password = "{FORK_OBSERVER_RPC_PASSWORD}"
336338
"""
337339

338340
override_string += node_config

0 commit comments

Comments
 (0)