Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install heroku CLI on my Mac

  2. Run heroku login to auth heroku CLI on my local machine

  3. Create scihist-digicoll app in heroku dashboard

  4. Provision heroku postgresadd-on. For now we’re going to do a hobby-basic at $9/month, although this won’t be enough for production, we plan a standard-0 at $50/month eventually. https://elements.heroku.com/addons/heroku-postgresql

  5. Import database from our staging instance to our heroku db (https://devcenter.heroku.com/articles/heroku-postgres-import-export)

    1. Do a new export on staging, since heroku asks for a certain format

      1. Tricky cause pg_dump doesn’t live on staging jobs server! Need to figure out how to ssh to database server maybe… ok can find it in EC2 console, and ssh there as jrochkind. Now need to figure out how to connect to database… can’t find database backup cronjob on database server, what user does it run under? not in ansible… but managed to pg_dump using credentials from local_env.yml on staging.

      2. Per heroku instructions, we need to put it on a private S3 bucket. We’ll use chf-hydra-backup, file digcol-for-heroku.dump. (Pretty slow to upload from my local network, figuring out how to put it in private bucket from the database server itself is beyond me right now though)

        1. Having trouble getting a properly signed URL to that location! hackily reverse engineered from S3 console, not the right way, but getting me there.

      3. Succesfully imported! heroku pg:psql -a scihist-digicoll drops me into PSQL console where I can see tables and data to confirm. Deleted extra backup from our S3 bucket.

Mon Oct 5

Heroku has a LOT of docs, usually well-written. It is pretty well googled. Some heroku overview and getting started docs:

...