Skip to content

Instantly share code, notes, and snippets.

@jrafanie
Last active February 16, 2024 16:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrafanie/34313d97a9e5c5238e3d to your computer and use it in GitHub Desktop.
Save jrafanie/34313d97a9e5c5238e3d to your computer and use it in GitHub Desktop.
Extract build and system from manageiq.git
  • build and system directories extracted to manageiq-appliance repo.
  • Make that work by building off a fork of manageiq with build and system removed
  • Split manageiq-appliance(build/system) to manageiq-appliance-build and manageiq-appliance, removing the leading build/system directories.
    • Apply manageiq build directory commits to manageiq-appliance-build.
    • Apply manageiq-appliance build directory commits to manageiq-appliance-build.
    • Save off the system commits from manageiq-appliance. (NONE)
    • Delete manageiq-appliance, recreate it.
    • Apply manageiq system directory commits to manageiq-appliance.
    • Apply old manageiq-appliance system directory commits to manageiq-appliance. (NONE)
  • Make the build work(like step 2) but with the 3 repos.
    • Create fork branch with step 2 "system" changes on manageiq-appliance.
    • Create fork branch with step 2 "build" changes on manageiq-appliance-build.
    • Test it!
    • Create PRs on both.
  • Migrate Alberto and Dennis's Centos 7.1 branch work on manageiq to the new repos.
  • Remove the build and system directories from manageiq.

Below is a diagram showing how things will work before/after:

manageiq.git------------------
  lib                        | 
  vmdb                       | 
  build -------------------  |
    config                |  |
      imagefactory.conf   |  |
      targets.yml         |  |
      ...                 |  |
    kickstarts            |  |
      base.ks.erb         |  |  On appliance ova:
      ...                 |  --> git clone manageiq.git /var/www/miq
    ...                   |
  system-------------     |  --> git clone manageiq-appliance.git /var/www/manageiq-appliance 
    COPY            |     |  |   
    LINK            |     |  |   # Lots of code expects these to exist:
    TEMPLATE        |     |  |       /var/www/miq/system/(COPY|LINK|TEMPLATE|cfme-setup.sh)
    cfme-setup.sh   |     |  |     So, symlink it in: 
    ...             |     |  |       ln -s /var/www/manageiq-appliance /var/www/miq/system 
                    |     |  |
                    V     |  | 
manageiq-appliance.git----|---
  COPY                    |   
  LINK                    |   
  TEMPLATE                |   
  cfme-setup.sh           |   
  ...                     |   
                          |                          
***************************** Application/Build barrier ************************
                          |
                          |
                          V    On build vm:
manageiq-appliance-build.git---> git clone manageiq-appliance-build.git /build/manageiq
  config                         /build
    imagefactory.conf              manageiq
    targets.yml                      config
    ...                                imagefactory.conf
  kickstarts                           targets.yml
    base.ks.erb                      kickstarts
    ...                                base.ks.erb
  scripts (new build code)           scripts
    vmbuild.rb                         vmbuild.rb
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment