Skip to content

Commit

Permalink
chore: new deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchere committed Dec 16, 2024
1 parent 067422c commit dbb076b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
22 changes: 16 additions & 6 deletions .github/image/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
#! /bin/sh
#!/bin/sh

echo "Starting dolos bootstrap"
echo "Starting dolos bootstrap from snapshot"

# Create empty WAL
dolos bootstrap relay --config /etc/dolos.toml && \
# Now you can run
dolos daemon --config /etc/dolos.toml
# Run the bootstrap command and capture the output
BOOTSTRAP_OUTPUT=$(dolos bootstrap snapshot --variant full --config /etc/dolos.toml)

# Check if the output indicates existing data
if echo "$BOOTSTRAP_OUTPUT" | grep -q "found existing data, skipping bootstrap"; then
echo "Bootstrap skipped due to existing data, skipping ledger removal and rebuild"
else
echo "Removing ledger and rebuilding"
rm -rf /var/data/ledger
dolos doctor rebuild-ledger
fi

# Start the dolos daemon
dolos daemon --config /etc/dolos.toml
10 changes: 5 additions & 5 deletions k8s/sf-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: dolos-container
image: us-central1-docker.pkg.dev/comet-7aaf0/comet-ar/dolos:sha-ef3f5e9
image: us-central1-docker.pkg.dev/comet-7aaf0/comet-ar/dolos:sha-067422c
ports:
- containerPort: 50051

Expand All @@ -32,11 +32,11 @@ spec:

resources:
requests:
memory: "8Gi"
cpu: "8"
memory: "1Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "8"
memory: "1Gi"
cpu: "2"

volumeClaimTemplates:
- metadata:
Expand Down
14 changes: 14 additions & 0 deletions k8s/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: dolos-app-svc
namespace: dolos
spec:
type: LoadBalancer
loadBalancerIP: 34.67.87.74
selector:
app: dolos-app
ports:
- protocol: TCP
port: 80 # External port
targetPort: 50051 # Port used by the container

0 comments on commit dbb076b

Please sign in to comment.