Skip to content

Commit 80df993

Browse files
committed
move all RPC files to manifests/ and images/
1 parent 787df46 commit 80df993

23 files changed

+100
-104
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Build and push production RPC image
3939
uses: docker/build-push-action@v5
4040
with:
41-
file: src/templates/rpc/Dockerfile_rpc
41+
file: images/rpc/Dockerfile_prod
4242
platforms: linux/amd64,linux/arm64
4343
context: .
4444
push: true
@@ -50,7 +50,7 @@ jobs:
5050
if: github.ref == 'refs/heads/main'
5151
uses: docker/build-push-action@v5
5252
with:
53-
file: src/templates/rpc/Dockerfile_rpc_dev
53+
file: images/rpc/Dockerfile_dev
5454
platforms: linux/amd64,linux/arm64
5555
context: .
5656
push: true

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Build and export
3636
uses: docker/build-push-action@v5
3737
with:
38-
file: src/warnet/templates/rpc/Dockerfile_rpc
38+
file: images/rpc/Dockerfile_prod
3939
context: .
4040
tags: warnet/dev
4141
cache-from: type=gha
@@ -74,13 +74,13 @@ jobs:
7474
uv pip install -e .
7575
7676
echo "Contents of warnet-rpc-statefulset-dev.yaml being used:"
77-
cat src/warnet/templates/rpc/warnet-rpc-statefulset-dev.yaml
77+
cat manifests/warnet-rpc-statefulset-dev.yaml
7878
7979
echo Setting up k8s
80-
kubectl apply -f src/warnet/templates/rpc/namespace.yaml
81-
kubectl apply -f src/warnet/templates/rpc/rbac-config.yaml
82-
kubectl apply -f src/warnet/templates/rpc/warnet-rpc-service.yaml
83-
kubectl apply -f src/warnet/templates/rpc/warnet-rpc-statefulset-dev.yaml
80+
kubectl apply -f manifests/namespace.yaml
81+
kubectl apply -f manifests/rbac-config.yaml
82+
kubectl apply -f manifests/warnet-rpc-service.yaml
83+
kubectl apply -f manifests/warnet-rpc-statefulset-dev.yaml
8484
kubectl config set-context --current --namespace=warnet
8585
8686
echo sleeping for 30s to give k8s time to boot

MANIFEST.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ include src/warnet/templates/fork_observer_config.toml
44
include src/warnet/templates/addrman_observer_config.toml
55
include src/warnet/templates/addrman.patch
66
include src/warnet/templates/isroutable.patch
7-
graft src/warnet/templates/k8s
8-
graft src/warnet/templates/rpc
9-
graft src/warnet/templates/grafana-provisioning
10-
graft src/warnet/logging_config
7+
graft images
8+
graft manifests
9+
graft scripts

docs/developer-notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ To help with this a helper script is provided: [build-k8s-rpc.sh](../scripts/bui
1313
This script can be run in the following way:
1414

1515
```bash
16-
DOCKER_REGISTRY=bitcoindevproject/warnet-rpc TAG=0.1 ./scripts/build-k8s-rpc.sh Dockerfile_rpc
16+
DOCKER_REGISTRY=bitcoindevproject/warnet-rpc TAG=0.1 ./scripts/build-k8s-rpc.sh Dockerfile_prod
1717
```
1818

1919
You can optionally specify `LATEST=1` to also include the `latest` tag on docker hub.
2020

21-
Once a new image has been pushed, it should be referenced in [warnet-rpc-statefulset.yaml](../src/warnet/templates/warnet-rpc-statefulset.yaml) in the `image` field.
21+
Once a new image has been pushed, it should be referenced in manifests/warnet-rpc-statefulset.yaml in the `image` field.

docs/running.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ a file `$XDG_STATE_HOME/warnet/warnet.log`, otherwise it will use `$HOME/.warnet
99

1010
## Kubernetes
1111

12-
Deploy the resources in `src/warnet/templates/`, this sets up the correct permissions on the cluster (`rbac-config.yaml`) and deploys the warnet RPC server as a service + statefulset.
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.
1313

1414
This can be done with from inside the `src/warnet/templates/` directory by running:
1515

images/bitcoin/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ RUN --mount=type=cache,target=/var/cache/apk \
2222
sqlite-dev \
2323
zeromq-dev
2424

25-
COPY images/bitcoin/isroutable.patch /tmp/
26-
COPY images/bitcoin/addrman.patch /tmp/
25+
COPY isroutable.patch /tmp/
26+
COPY addrman.patch /tmp/
2727

2828

2929
# Clone and patch and build stage
@@ -77,7 +77,7 @@ RUN --mount=type=cache,target=/var/cache/apk sed -i 's/http\:\/\/dl-cdn.alpineli
7777
su-exec
7878

7979
COPY --from=build /opt/bitcoin /usr/local
80-
COPY images/bitcoin/entrypoint.sh /
80+
COPY entrypoint.sh /
8181

8282
VOLUME ["/home/bitcoin/.bitcoin"]
8383
EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332

src/warnet/templates/rpc/Dockerfile_rpc_dev renamed to images/rpc/Dockerfile_dev

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ EXPOSE 9276
2020
# we defer this to the entrypoint script for dev mode to enable hot-reloading.
2121

2222
# Copy the entrypoint script into the container
23-
COPY entrypoint.sh /usr/local/bin/
24-
25-
# Make the entrypoint script executable
26-
RUN chmod +x /usr/local/bin/entrypoint.sh
23+
COPY entrypoint.sh /
2724

2825
# Set the entrypoint script to run when the container launches
29-
ENTRYPOINT ["entrypoint.sh"]
26+
ENTRYPOINT ["/entrypoint.sh"]
3027

3128
# Default command
3229
CMD ["warnet", "--dev"]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)