Skip to content

Commit 2417311

Browse files
committed
move logging to manifests/ and scripts/
1 parent 2e0a89a commit 2417311

File tree

15 files changed

+87
-3569
lines changed

15 files changed

+87
-3569
lines changed

MANIFEST.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
include src/warnet/schema/*.json
2-
include src/warnet/templates/bitcoin.conf
3-
include src/warnet/templates/fork_observer_config.toml
4-
include src/warnet/templates/addrman_observer_config.toml
5-
include src/warnet/templates/addrman.patch
6-
include src/warnet/templates/isroutable.patch
72
graft images
83
graft manifests
94
graft scripts

docs/running.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,20 @@ a file `$XDG_STATE_HOME/warnet/warnet.log`, otherwise it will use `$HOME/.warnet
99

1010
## Kubernetes
1111

12-
Deploy the resources in `manifests/`, this sets up the correct permissions on the cluster (`rbac-config.yaml`) and deploys the warnet RPC server as a service + statefulset.
13-
14-
This can be done with from inside the `src/warnet/templates/` directory by running:
15-
16-
```bash
17-
kubectl apply -f '*.yaml'
18-
```
19-
20-
Once the RPC server comes up we need to forward the RPC port from the cluster.
21-
This can be done with:
22-
23-
```bash
24-
kubectl port-forward svc/rpc 9276:9276
25-
```
26-
27-
This allows you to communicate with the RPC server using `warcli`. Developers
28-
should check the [developer notes](developer-notes.md) to see how to
29-
update the RPC server when developing on Kubernetes.
30-
31-
Currently, while `warcli network down` will bring down the pods, the RPC server needs manual deletion.
32-
This can be done using:
33-
34-
```bash
35-
kubectl delete statefulset
36-
```
12+
// TODO
3713

3814
### Install logging infrastructure
3915

4016
First make sure you have `helm` installed, then simply run the following script:
4117

4218
```bash
43-
./src/warnet/templates/k8s/install_logging.sh
19+
./scripts/install_logging.sh
4420
```
4521

4622
To forward port to view Grafana dashboard:
4723

4824
```bash
49-
./src/warnet/templates/k8s/connect_logging.sh
25+
./scripts/connect_logging.sh
5026
```
5127

5228
## Kubernetes (e.g. minikube)

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ build branch tag registry=registry repo=repo build-args=build-args action=load:
104104
warcli image build --registry={{registry}} --repo={{repo}} --branch={{branch}} --arches="{{arches}}" --tag={{tag}} --build-args="{{build-args}}" --action={{action}}
105105

106106
installlogging:
107-
./src/warnet/templates/k8s/install_logging.sh
107+
./scripts/install_logging.sh
108108

109109
connectlogging:
110-
./src/warnet/templates/k8s/connect_logging.sh
110+
./scripts/connect_logging.sh
111111

112112
# Format and lint all files
113113
lint:

manifests/grafana_values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
adminUser: admin
22
adminPassword: password
33
admin: {}
4-
datasources:manifests/.yaml:
4+
datasources:
5+
datasources.yaml:
56
apiVersion: 1
67
datasources:
78
- name: Prometheus

scripts/install_logging.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#!/bin/bash
22
set -e
33

4+
THIS_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
5+
MANIFESTS_DIR=$( cd -- "$THIS_DIR/../manifests" &> /dev/null && pwd )
6+
47
helm repo add grafana https://grafana.github.io/helm-charts
58
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
69
helm repo update
710

8-
helm upgrade --install --namespace warnet-logging --create-namespace --values "$PWD/manifests/loki_values.yaml" loki grafana/loki --version 5.47.2
11+
helm upgrade --install --namespace warnet-logging --create-namespace --values "${MANIFESTS_DIR}/loki_values.yaml" loki grafana/loki --version 5.47.2
912
helm upgrade --install --namespace warnet-logging promtail grafana/promtail
1013
helm upgrade --install --namespace warnet-logging prometheus prometheus-community/kube-prometheus-stack --namespace warnet-logging --set grafana.enabled=false
11-
helm upgrade --install --namespace warnet-logging loki-grafana manifests/grafana --values "$PWD/manifests/grafana_values.yaml"
14+
helm upgrade --install --namespace warnet-logging loki-grafana grafana/grafana --values "${MANIFESTS_DIR}/grafana_values.yaml"

src/warnet/templates/__init__.py

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

src/warnet/templates/addrman_observer_config.toml

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

src/warnet/templates/fork_observer_config.toml

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

0 commit comments

Comments
 (0)