devnet: add readiness checks to most components
This commit is contained in:
parent
561852d499
commit
45837241ed
|
@ -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
|
||||
|
|
6
Tiltfile
6
Tiltfile
|
@ -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]")]
|
||||
)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -41,3 +41,6 @@ spec:
|
|||
- containerPort: 3000
|
||||
name: react-devserver
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
port: react-devserver
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue