Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1959-Stage SIMS Prod #2008

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ High, new features released weekly
- [Technologies Overview](./docs/technologies-overview.md)
- [BCeID-Web Service Integration](./docs/bceid-webservice-integration.md)
- How To
- [DevOps](./docs/howto/devops.md)
- [DevOps](https://github.com/bcgov/SIMS/wiki/DevOps-and-Running-the-Application#devops)
- [Database Migration](./docs/howto/db-migration.md)
- [Keycloak Configuration](./docs/hotwot/keycloak-config.md)
andrewsignori-aot marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
4 changes: 3 additions & 1 deletion devops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ deploy-redis:
# Command to initialize the redis cluster.
# Make sure that all the redis pods are up and running before initializing the cluster.
init-redis-cluster:
@oc exec -n $(NAMESPACE) -it redis-0 -- redis-cli -a $(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d) --cluster create --cluster-replicas 1 $(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')
REDIS_PASSWORD=$$(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d); \
REDIS_NODES=$$(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 ' | sed 's/ :6379 $$/ /'); \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the command
oc get pods -n 0c27fb-dev -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 ' | sed 's/ :6379 $$/ /'
Is still returning the extra :6379 at the end, as shown below. Is it the expectation?
10.97.50.200:6379 10.97.38.75:6379 10.97.70.236:6379 10.97.94.99:6379 10.97.56.98:6379 10.97.101.99:6379 :6379

Copy link
Collaborator Author

@guru-aot guru-aot Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is when the command is run via a makefile it trims the last 6379
image

image

Dont ask me how it does, but it does 😄 .

The above screenshot is an example of echoing the variable REDIS_NODES by changing the makefile command.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that echo is correctly printing it. Thanks for the explanation 😉

oc exec -n $(NAMESPACE) -it redis-0 -- redis-cli -a $$REDIS_PASSWORD --cluster create $$REDIS_NODES --cluster-replicas 1

create-db:
test -n $(DB_NAME)
Expand Down
181 changes: 0 additions & 181 deletions docs/howto/devops.md

This file was deleted.