Skip to content

Commit

Permalink
Merge pull request #151 from rajpalc7/main
Browse files Browse the repository at this point in the history
Consolidate sandbox redeploy actions into one
  • Loading branch information
esune authored Oct 3, 2023
2 parents 764e606 + e9822fc commit e272bea
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 74 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/uninstall_install_sandbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Uninstall and then re-install Traction Sandbox Instance

on:
schedule:
- cron: '0 9 1,15 * *'
workflow_dispatch:
push:
branches:
- main

jobs:
uninstall_sandbox:
runs-on: ubuntu-20.04

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Run Your Job
run: |
echo "This job runs biweekly on 1st and 15th of every month at 2:00 AM PST"
- name: Authenticate and set context
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
namespace: ${{ secrets.OPENSHIFT_NAMESPACE }}

- name: Uninstall Traction via Helm
continue-on-error: false
run: |
helm uninstall traction-sandbox -n ${{ secrets.OPENSHIFT_NAMESPACE }} --wait --timeout=20m
- name: Remove Traction Openshift Objects
continue-on-error: false
run: |
oc delete -n ${{ secrets.OPENSHIFT_NAMESPACE }} all,secret,pod,networkpolicy,configmap,pvc --selector "app.kubernetes.io/instance"=traction-sandbox
install_sandbox:
name: Install Sandbox
needs: uninstall_sandbox
runs-on: ubuntu-20.04

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Run Your Job
run: |
echo "This job runs biweekly on 1st and 15th of every month at 2:00 AM PST"
- name: Authenticate and set context
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
namespace: ${{ secrets.OPENSHIFT_NAMESPACE }}

- name: Install Traction via Helm
continue-on-error: false
run: |
helm repo add traction https://bcgov.github.io/traction
helm upgrade --install traction-sandbox traction/traction \
-f ./helm-values/traction/values-sandbox.yaml \
-n ${{ secrets.OPENSHIFT_NAMESPACE }} --wait --timeout=7m
71 changes: 0 additions & 71 deletions helm-values/tenant-ui/values-sandbox.yaml

This file was deleted.

18 changes: 15 additions & 3 deletions helm-values/traction/values-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ acapy:
generated: true
pluginInnkeeper:
generated: true
ledgers.yml:
- id: bcovrin-test
is_production: true
is_write: true
genesis_url: 'http://test.bcovrin.vonx.io/genesis'
endorser_did: 'Ket75eV5UQvVkW2XBjgDH7'
endorser_alias: 'bcovrin-test-endorser'
plugin-config.yml:
traction_innkeeper:
innkeeper_wallet:
print_key: true
print_token: true
connect_to_endorser:
- endorser_alias: endorser
- endorser_alias: bcovrin-test-endorser
ledger_id: bcovrin-test
create_public_did:
- bcovrin-test
Expand Down Expand Up @@ -72,6 +79,12 @@ ui:
enabled: true
namespaceSelector:
network.openshift.io/policy-group: ingress
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 5
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
ingress:
annotations:
route.openshift.io/termination: edge
Expand All @@ -82,5 +95,4 @@ postgresql:
memory: 1600Mi
requests:
cpu: 200m
memory: 820Mi

memory: 820Mi

0 comments on commit e272bea

Please sign in to comment.