Skip to content

Commit

Permalink
use deployed pods!
Browse files Browse the repository at this point in the history
  • Loading branch information
MicaiahReid committed Jun 7, 2023
1 parent f629c18 commit 285dc0d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ cargo run
to start the server. Currently, the server is hosted on `localhost:8477` and exposes two routes:
- `POST localhost:8477/api/v1/networks` - Creates a new devnet with configuration provided in request body. See [this example](./examples/new-network.example.json) object for the required parameters.
- `DELETE localhost:8477/api/v1/network?network={namespace}` - Deletes all k8s assets deployed under the given namespace.

### Notes
This project is still very eary in development and the code is fragile and will change a lot. Some known issues:
- if a k8s deployment fails, the app crashes. K8s deployments fail for a lot of reasons, so you'll need to restart the service a lot.
- the project relies on a docker image called `stacks-network`, which is not yet deployed to docker hub. This is in progress.
1 change: 0 additions & 1 deletion scripts/kind-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
kind create cluster --config=./templates/initial-config/kind.yaml && \
docker pull hirosystems/stacks-blockchain-api:latest --platform=linux/amd64 && \
kind load docker-image hirosystems/stacks-blockchain-api && \
kind load docker-image stacks-network && \
kubectl --context kind-kind apply -f https://openebs.github.io/charts/openebs-operator.yaml && \
kubectl --context kind-kind apply -f ./templates/initial-config/storage-class.yaml
4 changes: 2 additions & 2 deletions templates/bitcoind-chain-coordinator-pod.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ spec:
configMapKeyRef:
name: namespace-conf
key: NAMESPACE
image: stacks-network
imagePullPolicy: Never
image: quay.io/hirosystems/stacks-network-orchestrator:latest
imagePullPolicy: IfNotPresent
name: chain-coordinator-container
ports:
- containerPort: 20445
Expand Down
5 changes: 3 additions & 2 deletions templates/stacks-devnet-api.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
name: stacks-devnet-api-service-account
rules:
- apiGroups: [""]
# TODO: production version should not be able to create/delete namespaces (only get)
resources: ["pods", "services", "configmaps", "persistentvolumeclaims", "namespaces"]
verbs: ["get", "delete", "create"]

Expand Down Expand Up @@ -51,8 +52,8 @@ spec:
- command:
- ./stacks-devnet-api
name: stacks-devnet-api-container
image: stacks-devnet-api
imagePullPolicy: Never
image: quay.io/hirosystems/stacks-devnet-api:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8478
name: api
Expand Down

0 comments on commit 285dc0d

Please sign in to comment.