Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoster committed Dec 11, 2017
0 parents commit 8ee182a
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.dev_builds/
/dev_releases/
*~
Empty file added config/blobs.yml
Empty file.
3 changes: 3 additions & 0 deletions config/final.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: migrate-postgres
blobstore:
provider: local
Empty file added jobs/migrate-postgres/monit
Empty file.
10 changes: 10 additions & 0 deletions jobs/migrate-postgres/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: migrate-postgres

templates:
pre-start.erb: bin/pre-start

packages:
- postgres-unknown

properties: {}
10 changes: 10 additions & 0 deletions jobs/migrate-postgres/templates/pre-start.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

OLD_STORE_DIR=/var/vcap/store/postgres-9.4
NEW_STORE_DIR=/var/vcap/store/postgres

if [ -d ${OLD_STORE_DIR} ]; then
mkdir -p ${NEW_STORE_DIR}
ln -s ${OLD_STORE_DIR} ${NEW_STORE_DIR}/postgres-unknown
/var/vcap/jobs/postgres/bin/pre-start
fi
31 changes: 31 additions & 0 deletions packages/postgres-unknown/packaging
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
set -e -x

POSTGRES_VERSION=9.4.12

tar xzf postgres/postgresql-${POSTGRES_VERSION}.tar.gz

pushd postgresql-${POSTGRES_VERSION}
./configure --prefix=${BOSH_INSTALL_TARGET}

pushd src/bin/pg_config
make
make install
popd

cp -LR src/include ${BOSH_INSTALL_TARGET}

pushd src/interfaces/libpq
make
make install
popd

pushd src
make
make install
popd

pushd contrib
make
make install
popd
popd
5 changes: 5 additions & 0 deletions packages/postgres-unknown/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: postgres-unknown

files:
- postgres/postgresql-9.4.12.tar.gz
Binary file added src/postgres/postgresql-9.4.12.tar.gz
Binary file not shown.

0 comments on commit 8ee182a

Please sign in to comment.