devnet: add readiness checks to most components

This commit is contained in:
Leo 2020-11-28 01:33:57 +01:00 committed by Leopold Schabel
parent 561852d499
commit 45837241ed
7 changed files with 36 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:experimental
FROM rust:1.45
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang ncat
RUN rustup component add rustfmt
WORKDIR /usr/src/solana

View File

@ -161,4 +161,8 @@ k8s_resource(
objects=["terra-lcd-cm0"]
)
k8s_resource("terra-terrad", objects=["terra-terrad-cm0"])
k8s_resource(
"terra-terrad",
objects=["terra-terrad-cm0"],
port_forwards=[port_forward(26657, name="Terra RPC [:26657]")]
)

View File

@ -43,12 +43,20 @@ spec:
- containerPort: 8545
name: rpc
protocol: TCP
readinessProbe:
tcpSocket:
port: rpc
- name: tests
image: eth-node
command:
- /bin/sh
- -c
- "npm run migrate && sleep infinity"
- "npm run migrate && nc -l -p 2000 && sleep infinity"
startupProbe:
periodSeconds: 1
failureThreshold: 60
tcpSocket:
port: 2000
- name: mine
image: eth-node
command:

View File

@ -67,7 +67,16 @@ spec:
- containerPort: 9900
name: faucet
protocol: TCP
readinessProbe:
httpGet:
port: rpc
path: /health
- name: setup
image: solana-agent
command:
- /usr/src/solana/devnet_setup.sh
startupProbe:
tcpSocket:
port: 2000
periodSeconds: 1
failureThreshold: 300

View File

@ -55,7 +55,9 @@ spec:
name: terra-lcd
ports:
- containerPort: 1317
resources: {}
readinessProbe:
tcpSocket:
port: 1317
volumeMounts:
- mountPath: /root/.terrad/config
name: terra-lcd-cm0
@ -90,6 +92,9 @@ spec:
name: terra-terrad
ports:
- containerPort: 26657
readinessProbe:
httpGet:
port: 26657
resources: {}
volumeMounts:
- mountPath: /root/.terrad/config

View File

@ -41,3 +41,6 @@ spec:
- containerPort: 3000
name: react-devserver
protocol: TCP
readinessProbe:
httpGet:
port: react-devserver

View File

@ -49,5 +49,8 @@ echo "Created wrapped token $token"
wrapped_account=$(cli create-account --seed=934893 "$wrapped_token" | grep 'Creating account' | awk '{ print $3 }')
echo "Created wrapped token account $wrapped_account"
# Let k8s startup probe succeed
nc -l -p 2000
# Keep the container alive for interactive CLI usage
sleep infinity