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

Add bss-init to initialize Postgres DB #13

Merged
merged 21 commits into from
Jan 24, 2024

Conversation

synackd
Copy link
Collaborator

@synackd synackd commented Jan 22, 2024

Summary and Scope

Use the migration approach to database initialization. Similar to SMD's smd-init, add bss-init, which initializes a Postgres database using Golang's migrate library. Convert the PostgreSQL queries that were originally in the boot-script-services binary to be migrations used by bss-init.

Issues and Related PRs

Testing

Tested on:

  • Cable Guys SI Cluster (cg-head and compute nodes)
    • This is a system of x86-64 Gigabyte 272-Z32-00 machines running Rocky Linux 8.8

@alexlovelltroy
Copy link
Member

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?

@synackd
Copy link
Collaborator Author

synackd commented Jan 24, 2024

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.

@synackd
Copy link
Collaborator Author

synackd commented Jan 24, 2024

@alexlovelltroy I realized that I didn't edit the .github/workflow files, which I did in above most recent commits. Can you check these changes?

@alexlovelltroy
Copy link
Member

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:

      - LICENSE
      - CHANGELOG.md
      - README.md
      - .version
      - migrations/

@synackd
Copy link
Collaborator Author

synackd commented Jan 24, 2024

Added in c39fb13.

Copy link
Member

@alexlovelltroy alexlovelltroy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

NICE!

go.mod Outdated
Copy link
Member

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.

Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants