Skip to content

Latest commit

 

History

History
74 lines (57 loc) · 5.22 KB

DEPLOYMENT.md

File metadata and controls

74 lines (57 loc) · 5.22 KB

Deployment

So you're ready to set Postfacto up, choose names for your web and API apps. We'll refer to these names as api-app-name and web-app-name from now on. If you're deploying to Pivotal Web Services, you can check they are available by making sure there is an error when visiting your-chosen-name.cfapps.io.

Pivotal Web Services

Pivotal Web Services provides a hosted version of Pivotal's Cloud Foundry platform and is probably the easiest place to get Postfacto up and running. You can use Concourse to deploy and keep your instance up to date using the example pipeline in deployments/pws or if you'd prefer you can set it up manually using the steps below:

  1. Sign up for a PWS account, install the CF CLI and set yourself up with an organization and space by following the instructions here

  2. Once logged in to PWS, add a database and a Redis service instance to your space from the Marketplace. We recommend the free plans of ElephantSQL and Redis Cloud respectively for this. Name these services postfacto-db and postfacto-redis

  3. Download and unzip the latest release source code here.

  4. In postfacto/deployment/pws/config/manifest-api.yml, change the {{api-app-name}} and {{web-app-name}} to be your api-app-name and web-app-name

  5. In postfacto/deployment/pws/config/manifest-web.yml, change the {{web-app-name}} to be your web-app-name

  6. In postfacto/deployment/pws/config/config.js, change the {{api-app-name}} to be your api-app-name

  7. In postfacto/deployment/pws/deploy.sh, change the {{api-app-name}} to be your api-app-name

  8. Run the PWS deployment script from the postfacto directory:

deployment/pws/deploy.sh
  1. Log in to the admin dashboard (email: [email protected] and password: password) to check everything has worked at api-app-name.cfapps.io/admin
  2. Create a retro for yourself by clicking on 'Retros' and the 'New Retro'
  3. Log in to your retro at web-app-name.cfapps.io/retros/you-retro-slug
  4. Share the URL and password with your team and then run a retro!

Pivotal Cloud Foundry

You can use Concourse to deploy and keep your instance up to date using the example pipeline in deployments/pcf or if you'd prefer you can set it up manually using the steps below:

  1. Set yourself up with an organization and space in your PCF to deploy your Postfacto to.

  2. Take note of your PCF url, going forward referred to as pcf-url

  3. Add a database (Postgres or Mysql) and a Redis service instance to your space from the Marketplace. Name these services postfacto-db and postfacto-redis.

  4. Download and unzip the latest release source code here.

  5. In postfacto/deployment/pcf/config/manifest-api.yml, change the {{api-app-name}}, {{web-app-name}}, {{pcf-url}} to be your api-app-name, web-app-name and pcf-url

  6. In postfacto/deployment/pcf/config/manifest-web.yml, change the {{web-app-name}} to be your web-app-name

  7. In postfacto/deployment/pcf/config/config.js, change the {{api-app-name}}, {{web-app-name}}, and {{pcf-url}} to be your api-app-name, web-app-name, and pcf-url

  8. In postfacto/deployment/pcf/deploy.sh, change the {{api-app-name}} to be your api-app-name

  9. Run the PCF deployment script from the postfacto directory:

deployment/pcf/deploy.sh
  1. Log in to the admin dashboard (email: [email protected] and password: password) to check everything has worked at api-app-name.{{pcf-url}}/admin
  2. Create a retro for yourself by clicking on 'Retros' and the 'New Retro'
  3. Log in to your retro at web-app-name.{{pcf-url}}/retros/you-retro-slug
  4. Share the URL and password with your team and then run a retro!

Optional Setup

Setting up Google OAuth

In order for users to sign-up and create their own retros using the web UI, Postfacto needs Google OAuth setup. For deployments that do not want to setup Google OAuth, you will need to create your retros through the admin console of your server via api-app-name.cfapps.io/admin or api-app-name.{{pcf-url}}/admin.

  1. Go to Google Cloud Console and create a new project
  2. Go to APIs & Services > Credentials > Create Credentials > OAuth client ID > Web application
  3. Choose a name for your app
  4. In Authorized JavaScript Origins, set it to the public URL of your web-app-name. For example: if deploying to PWS, your public URL will be https://{{web-app-name}}.cfapps.io
  5. You can leave redirect blank
  6. Take note of your client-id that is generated
  7. In additional to the steps required for deploying to PWS, and PCF:
    • For PWS, in postfacto/deployment/pws/config/config.js, add the line "google_oauth_client_id": {{client-id}} to the config object, and change {{client-id}} to your generated Google OAuth client-id
    • For PCF, in postfacto/deployment/pcf/config/config.js, add the line "google_oauth_client_id": {{client-id}} to the config object, and change {{client-id}} to your generated Google OAuth client-id