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

Upgrade script, additions to docs, other cleanup 🍬 #58

Merged
merged 6 commits into from
Mar 12, 2025
Merged

Conversation

alismx
Copy link
Collaborator

@alismx alismx commented Mar 7, 2025

Changes Proposed

  • Minor updates to build script:

    • remove the utils directory, as it was overkill for the moment
    • name variables
    • fix reference to dibbs-query-connector
  • dibbs-ecr-viewer-wizard script updates:

    • set vars for directories to be used throughout the script
    • use $HOME instead of ~/
    • rename a couple of functions to improve clarity
    • fix function calls in set_dot_vars to remove calls that set env vars don't want
  • move dibbs-vm/docker/dibbs-ecr-viewer to dibbs-vm/dibbs-ecr-viewer

  • update dibbs-ecr-viewer.env file to remove useless defaults

  • remove deprecated docker-compose version reference from dibbs-ecr-viewer/docker-compose.yml file

  • Docs improvements

    • Added some docs to the tops of the scripts in the repo
    • includes notes about using user data in AWS to set env var defaults
    • start on Azure docs
  • Add hot-upgrade.sh.home script, everytime it's run:

    • This will update the DIBBS_SERVICE with the latest main branch dibbs-vm repo.
    • It'll create a backup of the previous running version
    • Copies all scripts with the .home suffix to the $HOME directory on the VM
    • Calls the latest wizard script for the service to assist in any new setup
  • Update the provision script:

    • remove call to set vars, shouldn't be needed in this context, that's set by our packer vars
    • fix reference to dibbs-query-connector
    • set directory ownership of $HOME/dibbs-vm to ubuntu:ubuntu
  • Packer build script:

    • fix some formatting
    • provision in the $HOME directory for ease of use

Additional Information

  • 🤔
  • Before merging, but after testing and review, I'll need to update the git clone references to use main instead of this branch
  • I started a new pattern of adding .home to any script I want in the $HOME directory in the final build, along with a call in the hot-upgrade script that adds them and a step to provision them during the build.
    • If you want to do this differently, I'm open to chatting about it!
    • I like this approach because it means that we can add all scripts that have .home to the home directory without having to worry about knowing that those files exist, which is something that might happen if folks run the hot-upgrade script.
    • The call in the hot-upgrade script happens here: cat "$file" > "$HOME/$(basename "$file" .home)" this line removes .home from the script name.

Testing

Reviewers can verify these changes by:

  • Run the following command in the root directory:
    • ./build.sh dibbs-ecr-viewer v2.0.0-beta
  • Run the VM
  • Check Docker containers are properly setup and after running each script
  • run the ./dibbs-ecr-viewer-wizard.sh script (No sudo needed!)
  • run the ./hot-upgrade.sh script (No sudo needed!)
  • Run packer builds
  • Poke it
  • Prod it

@alismx alismx force-pushed the alis/24 branch 7 times, most recently from 79da7ea to 1c49a3e Compare March 7, 2025 22:57
…DIBBS services

This commit optimizes and adds thorough descriptions to the hot upgrade, post-install and provisioning scripts for DIBBS services.
@alismx alismx force-pushed the alis/24 branch 3 times, most recently from 077bf47 to 2e2c735 Compare March 11, 2025 18:13
@alismx alismx changed the title chore(ecr-viewer): refactor environment variables and add scripts for… Upgrade script, additions to docs, other cleanup 🍬 Mar 11, 2025
@alismx alismx marked this pull request as ready for review March 11, 2025 23:10
@alismx alismx merged commit 8b5fe1a into main Mar 12, 2025
1 check passed
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.

2 participants