WIP

  • Main GitHub repo for Cornell
  • Main underlying Spotlight repo
  • Installation from scratch on local machine
    • Generic Spotlight
    • Exhibits code
      • Look at https://github.com/cul-it/exhibits-library-cornell-edu/blob/dev/README.md 
      • Steps I took on my local machine to build
        • mkdir cornellexhibittest (you may name the directory whatever you wish)
        • cd cornellexhibittest
        • git clone git@github.com:cul-it/exhibits-library-cornell-edu.git .
        • (I used RVM so had to ensure the right version of Ruby was being employed. "rvm use 3.0.5")
        • bundle install
        • bin/rake db:migrate
        • brew install imagemagick
        • cp .env.example .env
          • Look through the .env file and follow the instructions for setting up the database (under the #mysql section) and setting up the database name, username, and password
          • For Solr URL, you can try the Solr wrapper method.  I also set up a separate Solr index using the schema files I saw being used and then set Solr _URL to point to my local Solr URL
          • Update SITE_ADMINS to include the site admin user email addresses you want to use
          • Generate a Devise secret key as the instructions tell you
        • Start solr. If using SolrWrapper ("bin/solr_wrapper"), update .solr_wrapper configs to match your local solr version and point to custom solr configs, e.g.: 

          version: '8.11.2'
          collection:
            dir: solr/conf/
            name: blacklight-core
            persist: true
        • "rails server" to start the system
        • Go to sign up and enter the email you already added to the site admins and create a password.  When you login, you should be able to see the "Site Administration" link under your email address on the top right of the page.
  • Components for the system (also see Components: Servers, Solr index and Rails database)
    • Databases
      • Username and password for the integration, staging, and production AWS RDS databases are in LastPass and on the elastic beanstalk AWS dashboard (under "Configuration").
      • The databases include various tables for storing user information, but also information about the "resources" which include the exhibits themselves.  You can see the schema here https://github.com/cul-it/exhibits-library-cornell-edu/blob/dev/db/schema.rb or login to MySQL (or Sqlite3, depending on your rails app database setup) and access the database on your local machine to get a sense of which data is stored where. 
    • Solr index
      • There are separate indices used for integration, staging, and production.  The Solr index captures the main metadata for the resources (e.g. title, description, copyright, etc.) and the location of the images that are uploaded and to which exhibit these items correspond.  (Based on experience with the code, this information isn't published to the Solr index until the exhibit itself has been published.  Until that point, it appears the information about exhibits and related images is stored elsewhere.   You may wish to confirm.)
    • Rails app
    • AWS storage for uploaded images: /uploads/spotlight/
      • exhibits-data-prod
      • exhibits-data-stg
      • exhibits-data-int
  • Adding site admin email addresses
    • Cornell exhibits has an added layer of permissions for a site wide admin which is defined in the elastic bean stalk configuration. 
      • Access elastic beanstalk environments through the AWS console.  Look for exhibits-integration or exhibits-prod-1.
        • Go to configuration → software
          • Click edit and go to environment properties  
          • Edit "SITE_ADMINS" and add the email addresses you like (email addresses are separated by semi-colons)
          • Click "Apply" to update the configuration
      • After updating the configuration, rebuild environment.  (Restarting the app seems insufficient and leaves the site down)
      • If you are deploying the system locally, set up a .env file based on https://github.com/cul-it/exhibits-library-cornell-edu/blob/dev/.env.example 
  • Signing up an external user
    • Ask the user to click on "Admin Login" on the bottom of the page and then select "Sign up". This should take them to  https://exhibits.library.cornell.edu/users/sign_up
    • Once they have signed up, login as administrator into the site.  Go to "Manage Users" under Actions. You can change their role in general under this section (e.g. make someone an "admin").  To associate a user with a particular exhibit, go to "Exhibit Dashboard" in the menu under your email address on the top right of the page, and then "Configuration" in the left column.  Click on "Users" under Configuration and you can select "add a new user" to add this user to the list of people who have roles for this specific exhibit. 

Release Process

https://github.com/cul-it/exhibits-library-cornell-edu/wiki/Release-Process although portions may be out of date.

Deployment

  • Updating dev (or setting up a pull request) will kick off CircleCI (see below - you should have logged in to CircleCI already for this to take effect, it appears).  If you want to see any console output and/or what may not be passing, you can check CircleCI logs . You can also run rubocop directly on the code by going to the top level directory and running bin/rubocop and see the resulting messages.
  • To actually build from a branch onto one of the servers, you must do the following
    • Example: Deploying dev to the integration branch. 
    • Under AWS Jenkins, (https://awsjenkins.library.cornell.edu), you can find "exhibits-stg-ruby3-deploy" and "exhibits-prod-ruby3-deploy" which deploy to staging and production separately. Production is set to deploy from the main branch and will not let you pick a different branch to deploy.
  • You may find that you need to do a restart of the application in AWS Elastic Beanstalk if you run into an issue. Go to elastic beanstalk and then find "exhibits-int-ruby3" if deploying to integration or "exhibits-prod-ruby3-deploy" if deploying to production.  Under "Actions" (top right), select "rebuild environment".  It would be best to have Greg available to contact in case you need help when you this yourself.  

CircleCI

TODO: Move to Jenkins: https://culibrary.atlassian.net/browse/LP-195

  • Login to http://circleci.com.  You will need to login and connect to the repository before the built-in GitHub CircleCI can kick off and before you can see the output of those CircleCI processes.
  • Pick login with GitHub
  • Go to Projects
  • Pick "exhibits-library-cornell-edu"

Group Exchange Accounts / Emails 


  • No labels