Skip to content

Instantly share code, notes, and snippets.

@marcparadise
Created July 8, 2015 15:25
Show Gist options
  • Save marcparadise/6dbc4d5f708b981effde to your computer and use it in GitHub Desktop.
Save marcparadise/6dbc4d5f708b981effde to your computer and use it in GitHub Desktop.
Quick Steps to External Postgres Testing with DVM
  1. Make sure you've pulled down the latest changs in chef-server branch 'mp/postgres-remote-connection-support'. This will be merged into byop-phase-1 shortly.
  2. copy dev/config.example.yml dev/config.yml
  3. Edit it so that the following entries are present:
vm:
  postgresql:
    # Makes the database VM start
    start: true 

    # Configures the chef-server to use the database vm 
    use-external: true
     
  # Optional if you have cookbook changes to test as part of first reconfigure
  omnibus-autoload: [private-chef-cookbooks] 

Then vagrant up.

You can access the database node by using vagrant ssh database, and sudo postgres.

By default, the database node will be configured in pg_hba to allow password access to the superuser id (bofh), oc_id, oc_bifrost, oc_erchef originating from the chef-server node.

Other Notes:

  1. vagrant ssh with no argument will still take you to the chef-server VM
  2. ./sync will still work asa normal
  3. You can destroy only the chef-server VM and leave the DB node in place if you want. Use vagrant destroy chef-server instead of vagrant destroy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment