Skip to content

Commit

Permalink
Merge pull request #2 from osmosis-labs/v21.1.0
Browse files Browse the repository at this point in the history
Automation Updates
  • Loading branch information
gzukel authored Oct 27, 2023
2 parents 4af6a88 + 8a3c34f commit fec22c7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 18 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
if: github.ref == 'refs/heads/main'
env:
docker_org: "osmolabs"
docker_server_url: "https://index.docker.io/v1/"
docker_repo: "sqs"
app_name: "sqs"
kubernetes_namespace: "sqs"
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
chain_id: "osmosis-1"
node_rpc: "https://rpc.osmosis.zone:443"
node_grpc: "grpc.osmosis.zone:9090"
domain_name: "sqs.osmosis.zone"
domain_name: "sqs.osmosis.zone"
path: "/"

runs-on: ubuntu-latest
Expand Down Expand Up @@ -153,7 +154,7 @@ jobs:
kubernetes_namespace: "sqs"
redis_docker_image: "bitnami/redis:latest"
redis_port: "6379"
redis_user: "default"
redis_user: "user"
redis_name: "article"
redis_initial_delay_seconds: "10"
redis_period_seconds: "10"
Expand All @@ -168,8 +169,8 @@ jobs:
period_seconds: "10"
debug: "true"
chain_id: "osmosis-1"
node_rpc: "https://rpc.testnet.osmosis.zone:443"
node_grpc: "grpc.testnet.osmosis.zone:9090"
node_rpc: "https://rpc.osmosis.zone:443"
node_grpc: "grpc.osmosis.zone:9090"
domain_name: "sqs.dev-osmosis.zone"
path: "/"
docker_server_url: "https://index.docker.io/v1/"
Expand All @@ -186,6 +187,13 @@ jobs:
echo "${{ secrets.DEV_KUBECONFIG }}" > temp_config.yaml
echo "KUBECONFIG=$(pwd)/temp_config.yaml" >> ${GITHUB_ENV}
# This builds and pushes docker image.
- name: "SET:SECRET:ENV:VARS"
run: |
docker build -t ${docker_org}/${docker_repo}:${docker_tag} .
docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
docker push ${docker_org}/${docker_repo}:${docker_tag}
# This step checks to see if the docker tag you are pushing exists.
# If the docker image doesn't exist it will build and push it.
- name: "DOCKER:BUILD:CHECK:PUSH"
Expand Down
31 changes: 17 additions & 14 deletions manifests/deployment.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ spec:
port: -=redis_port=-
initialDelaySeconds: -=redis_initial_delay_seconds=-
periodSeconds: -=redis_period_seconds=-
envFrom:
- secretRef:
name: -=app_name=--redis-secret
env:
- name: ALLOW_EMPTY_PASSWORD
value: "yes"
#envFrom:
# - secretRef:
# name: -=app_name=--redis-secret

---
apiVersion: v1
Expand Down Expand Up @@ -70,18 +73,18 @@ spec:
labels:
app: -=app_name=-
spec:
volumes:
- name: -=app_name=-
secret:
secretName: -=app_name=--secret
items:
- key: config.json
path: config.json
containers:
- name: -=app_name=-
volumes:
- name: -=app_name=-
secret:
secretName: -=app_name=--secret
items:
- key: config.json
path: config.json
image: -=docker_org=-/-=docker_image=-:-=docker_tag=-
image: -=docker_org=-/-=docker_repo=-:-=docker_tag=-
volumeMounts:
- mountPath: "/osmosis/"
- mountPath: "/osmosis-mount/"
name: -=app_name=-
ports:
- containerPort: -=container_port=-
Expand Down Expand Up @@ -123,7 +126,7 @@ stringData:
},
"chain": {
"id": "-=chain_id=-",
"node_uri": "-=node_rpc=-
"node_uri": "-=node_rpc=-",
"node_grpc": "-=node_grpc=-"
}
}
Expand All @@ -133,7 +136,7 @@ stringData:
apiVersion: v1
kind: Secret
metadata:
name: -=app_name=--secret-redis
name: -=app_name=--redis-secret
namespace: -=kubernetes_namespace=-
stringData:
REDIS_PASSWORD: "-=redis_password=-"
Expand Down
8 changes: 8 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@
# This takes the debug variable from pipeline and determines if it needs to be used for the kubernetes deployments.
# The docker-compose automatically sets it to debug.
# One thing to add is to make the code load its debug value from this as well.
# When its Kubernetes deployment you can't mount directly to osmosis dir so we have to copy if the file and directory exist.
echo "Copy the config from the mount point to the osmosis application directory."
cp /osmosis-mount/config.json /osmosis/config.json || echo "not kubernetes deployment"
if [ "${DEBUG}" == "true" ]; then
echo "look at contents of the osmosis directory."
ls -lah /osmosis/
echo "Log the config for debugging"
cat /osmosis/config.json
echo "keep node alive on failure for debugging" >> status
echo "sleep for 30 seconds to let other services start"
sleep 30
echo "start process with debug and keep container running for troubleshooting purposes."
/bin/sqsd || echo "failed to start" && tail -f status
else
/bin/sqsd
Expand Down

0 comments on commit fec22c7

Please sign in to comment.