-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add bss-init to initialize Postgres DB #13
Conversation
- Add 'dbName' arg rather than using global var - Only add DB opts to connection string if passed - Fix properly looping connection attempts - Add looping ping attempts
I don't see any changes to the .goreleaser.yaml file or the .github/workflows/actions. Those need to be updated in order for this work to get automatically built and released. If you're not comfortable doing that in this PR, I can open a fresh one to take care of it once this merges. @synackd what do you think? |
Ah, I missed that! Thank you for pointing that out. Updated in 3bffbae. |
@alexlovelltroy I realized that I didn't edit the |
Running goreleaser locally, I discovered that you're missing migrations in the extra_files section under dockers. I fixed it locally which made it run. Here's the change you need:
|
Added in c39fb13. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
scripts/pg-init/multi-psql-db.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE!
go.mod
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still a lot of Cray-HPE references in here that I don't understand. We can look at those in future work though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, will be nice to clear those out in the future.
Summary and Scope
Use the migration approach to database initialization. Similar to SMD's
smd-init
, addbss-init
, which initializes a Postgres database using Golang's migrate library. Convert the PostgreSQL queries that were originally in theboot-script-services
binary to be migrations used bybss-init
.Issues and Related PRs
Testing
Tested on:
cg-head
and compute nodes)