SETI / rms-galleries

Apache License 2.0
0 stars 0 forks source link

rms-galleries

Quick notes from Mark 1/30/2022

GalleryPage

Galleries

PiaPage

The Cassini-Huygens mission is a cooperative project of NASA, the European Space Agency and the Italian Space Agency. The Jet Propulsion Laboratory, a division of the California Institute of Technology in Pasadena, manages the mission....

Gallery Deployment Procedure

  1. Make sure your PIAPATH environment variable points to a local copy of the shared Dropbox directory PDS-Galleries/PIAxxxxx. I strongly recommend that you work on a local copy, and then rsync it back to Dropbox when you are done. This avoids any chance of clobbering the copy on Dropbox.

  2. Be sure that the file PDS-Galleries/PIAxxxxx/PIAPAGE_CATALOG.pickle has been copied from Dropbox. If it is not present, this will necessarily be a full update rather than an incremental deploy.

  3. If you don't want to write any newly retrieved JPEG files into /Library/Webserver/Documents, edit DOCUMENTS_FILE_ROOT_ inside gallerypage.py. For example, if you are deploying to the "8080" version of the website first, DOCUMENTS_FILE_ROOT_ should point to /Library/Webserver/Documents_8080 instead. (This could be set up using an environment variable.)

  4. Right now, we are only tracking Photojournal pages up to 25999. If we have started to see pages above 25900 or so, edit piapage/MAX_PIAPAGE.py to specify a higher limit.

  5. cd to the rms-galleries repo directory.

  6. In an ipython2 session...

    import piapage
  7. For an incremental update:

    catalog = piapage.build_catalog()
    piapage.save_catalog(catalog)
  8. Alternatively, for a full update:

    catalog = piapage.build_catalog(incremental=False)
    piapage.save_catalog(catalog)

At this point,

  1. To generate the new galleries, run this program at the command line (not inside ipython):

    python2 piapage/piapage_galleries.py

At this point, the Jekyll galleries have been written to the jekyll/galleries subdirectory of this repo.

  1. Before you can process the Jekyll files and push the HTML to the local website, you need to create links inside your local copy of the SETI/rms-website repo:

    GALLERIES=<path to rms-galleries repo>
    cd <path to rms-website repo>
    
    mkdir website_galleries
    ln -s website/_config.production.yml website_galleries/_config.production.yml
    ln -s website/_config.yml website_galleries/_config.yml
    ln -s website/_data       website_galleries/_data
    ln -s website/_includes   website_galleries/_includes
    ln -s website/_layouts    website_galleries/_layouts
    ln -s website/_posts      website_galleries/_posts
    ln -s website/_sass       website_galleries/_sass
    
    ln -s $GALLERIES/jekyll/galleries      website_galleries/galleries
    ln -s $GALLERIES/jekyll/press_releases website_galleries/press_releases
  2. To deploy to your local copy of the website:

    cd <path to rms-website repo>/deploy
    fab deploy localhost_galleries
  3. Alternatively, to deploy to the local "8080" version of the website:

    cd <path to rms-website repo>/deploy
    fab deploy localhost_8080_galleries
  4. Review the local website. Visit:

    https://localhost/galleries.html
    
    https://localhost/galleries/mercury.html
    https://localhost/galleries/venus.html
    https://localhost/galleries/moon.html
    https://localhost/galleries/mars.html
    https://localhost/galleries/jupiter.html
    https://localhost/galleries/saturn.html
    https://localhost/galleries/uranus.html
    https://localhost/galleries/neptune.html
    https://localhost/galleries/pluto.html
    
    https://localhost/galleries/asteroids.html
    https://localhost/galleries/comets.html
    https://localhost/galleries/kbos.html
    https://localhost/galleries/exoplanets.html
    
    https://localhost/galleries/target_mars.html
    https://localhost/galleries/target_jupiter.html
    https://localhost/galleries/target_saturn.html
    https://localhost/galleries/target_uranus.html
    https://localhost/galleries/target_neptune.html
    https://localhost/galleries/target_pluto.html
    https://localhost/galleries/asteroid_1_ceres.html
    https://localhost/galleries/comet_1p_halley.html
    https://localhost/galleries/kbo_pluto.html
    https://localhost/galleries/exoplanet_55_cancri.html
    
    https://localhost/galleries/cassini.html
    https://localhost/galleries/voyager.html
    https://localhost/galleries/juno.html
    https://localhost/galleries/new_horizons.html
    https://localhost/galleries/messenger.html
    https://localhost/galleries/dawn.html
    https://localhost/galleries/rosetta.html
    
    https://localhost/galleries/cassini_jupiter.html
    https://localhost/galleries/cassini_saturn.html
    https://localhost/galleries/voyager_jupiter.html
    https://localhost/galleries/voyager_saturn.html
    https://localhost/galleries/voyager_uranus.html
    https://localhost/galleries/voyager_neptune.html
  5. If history is any guide, about 10% of the new images will have metadata that needs to be repaired. The simplest way to handle a small number of repairs is to itemize the changes inside the REMOVALS dictionary inside repairs.py. Just create a new dictionary entry keyed by the PIA code of the image. You can list extraneous keyword values to remove, or specify new values to insert for the target, target type, mission, etc.

  6. Once you are satisfied with the results, deploy to the public servers. Note that this command only works from a server that has a current, up to date copy of the galleries and press releases.

    cd <path to rms-website repo>/deploy
    fab deploy server1_galleries
    fab deploy server2_galleries
  7. Copy the new JPEGs to the servers by rsyncing the contents of these directories (although we should really fix this):

    /Library/WebServer/Documents/press_releases/thumbnails
    /Library/WebServer/Documents/press_releases/small
    /Library/WebServer/Documents/press_releases/medium
  8. Rsync your local copy of the PDS-Galleries/PIAxxxxx directory back to Dropbox.

  9. Commit your changes back to the repo on GitHub.