starkandwayne/rdpg-boshrelease

Name: rdpg-boshrelease

Owner: Stark & Wayne

Description: Reliable Distributed Provisioning Grid BOSH Release

Created: 2016-04-14 18:32:07.0

Updated: 2016-10-20 17:10:02.0

Pushed: 2016-04-25 14:51:03.0

Homepage: null

Size: 1911

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Reliable Distributed PostgreSQL (RDPG) BOSH release

License

MIT, see LICENSE file.

Usage: Configuration & Deployment

We will walk through an example of using with Cloud Foundry.

Be sure to first target your BOSH Director:

 target $BOSH_HOST

If you are using bosh-lite you target like so:

 target 192.168.50.4 lite

Now clone this release and cd into the directory:

clone https://.../rdpg-boshrelease.git
dpg-boshrelease

If you intend on using a final release upload it like so:

 upload release releases/rdpg-1.yml

Next download your manifest file for the deployment targeted so we can edit it and add the release.

r -p ~/workspace/manifests
 download manifest rdpg-development ~/workspace/manifests/rdpg.yml
 deployment ~/workspace/manifests/rdpg.yml

Alternatively, you can make your manifest. For example to prepare a manifest for bosh-lite (warden) using the 'centos' stemcell we would do the following:

CELL_OS=centos ./rdpg-dev manifest warden

Edit the manifest file you downloaded (~/workspace/manifests/rdpg.yml) and add settings as follows.

Add to the list of known releases:

ases:

me: rdpg
rsion: latest

For consistency also add to the releases: section under meta:

:
vironment: rdpg-development
leases:
name: cf
version: latest
name: rdpg
version: latest

Add properties such as tags.

erties:
. lots of properties ... at bottom put vv
pg:

Now, for every instances: entry you wish to collocate this release with under jobs: add the following in the templates: section:

name: rdpg
release: rdpg

Now you can deploy,

 -n deploy

Note that for each job you create in your release that you want to run on a Job VM you must add a templates: entry with the name: of the template and the release: from which it comes.

Deployments Blobs

The script ./rdpg-dev blobs is used to prepare the blobs/ directory runs each package's prepare script from within the blobs/ directory. This will run each package's prepare script, if it exists, which should download and prepare that package's required blobs (source tarballs, etc…) into the {package}/ directory.

Development

Download your manifest file for the deployment targeted.

Target your BOSH Director as explained above, if you already have a deploy be sure to also download your manifest as per above.

If this is your first time cloning the release repository for develompent first prepare all of the things:

pg-dev prepare warden

This is equivalent to:

pg-dev blobs
pg-dev release
pg-dev stemcell warden
pg-dev manifest warden

Once these steps have all been completed

 -n deploy
More Information

For more information on the internal components used to manage PostgreSQL databases please refer to the documentation in src/rdpgd/docs/*.md

There is also a large treasure trove of “How To” and similar documents in the Wiki in this repository.

Debugging & QA

In order to gain access to one of the VMs, from a terminal bosh ssh rdpg {VM Index}, for example to ssh to the first node:

 ssh rdpg 0 # Hop on and have a look around...

If you want to destroy and recreate on specific node, say rdpg/0, you do the following:

 -n recreate rdpg 0 --force

See docs/rdpg.md for release specific information.

To run acceptance tests:

bosh create release --force && bosh upload release && bosh -n deploy && bosh run errand acceptance_tests

Pipeline

This BOSH release is automatically built and tested upon every commit to master.

bosh release changes trigger deploy job

The deploy job will:

  1. Run bosh create release to ensure that the BOSH release can be successfully created
  2. Upload the release to a bosh-lite running on AWS
  3. Generate a manifest and deploy a cluster (via the ./rdpg-dev manifest warden manifest generator)
  4. Run the acceptance_tests errand

The deploy job is triggered when:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.