Skip to content

Commit

Permalink
Merge pull request #73 from bcgov/develop/km
Browse files Browse the repository at this point in the history
GRAD2-2841 - Institute - Update Redis cluster and related IaC to be p…
  • Loading branch information
kamal-mohammed authored Jun 27, 2024
2 parents 45e268a + c27cf37 commit 1a6f8ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-redis-cluster-DEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Create Cluster
run: |
echo "Retrieve redis password..."
REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's/.*"REDIS_PASSWORD": "\(.*\)",/\1/p' | base64 --decode)
REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's|.*"REDIS_PASSWORD": "\([^"]*\)".*|\1|p' | base64 --decode)
echo "Creating Cluster..."
oc exec -i redis-ha-0 -- redis-cli --cluster create --cluster-replicas 1 $(oc get pods -l app=redis-ha -o jsonpath='{range.items[*]}{.status.podIP}:6379 {end}') --cluster-yes -a $REDIS_PASSWORD
echo "Success!"
2 changes: 1 addition & 1 deletion .github/workflows/create-redis-cluster-PROD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Create Cluster
run: |
echo "Retrieve redis password..."
REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's/.*"REDIS_PASSWORD": "\(.*\)",/\1/p' | base64 --decode)
REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's|.*"REDIS_PASSWORD": "\([^"]*\)".*|\1|p' | base64 --decode)
echo "Creating Cluster..."
oc exec -i redis-ha-0 -- redis-cli --cluster create --cluster-replicas 1 $(oc get pods -l app=redis-ha -o jsonpath='{range.items[*]}{.status.podIP}:6379 {end}') --cluster-yes -a $REDIS_PASSWORD
echo "Success!"
2 changes: 1 addition & 1 deletion .github/workflows/create-redis-cluster-TEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Create Cluster
run: |
echo "Retrieve redis password..."
REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's/.*"REDIS_PASSWORD": "\(.*\)",/\1/p' | base64 --decode)
REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's|.*"REDIS_PASSWORD": "\([^"]*\)".*|\1|p' | base64 --decode)
echo "Creating Cluster..."
oc exec -i redis-ha-0 -- redis-cli --cluster create --cluster-replicas 1 $(oc get pods -l app=redis-ha -o jsonpath='{range.items[*]}{.status.podIP}:6379 {end}') --cluster-yes -a $REDIS_PASSWORD
echo "Success!"

0 comments on commit 1a6f8ea

Please sign in to comment.