Skip to content

Commit

Permalink
Merge pull request #97 from sgotti/release_v0.2.0
Browse files Browse the repository at this point in the history
Release v0.2.0
  • Loading branch information
sgotti committed Nov 2, 2015
2 parents e5fa544 + 919972e commit 027e74e
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Session.vim
#
bin/
/gopath/
/release/
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

### v0.2.0

* A stolon client (stolonctl) is provided. At the moment it can be used to get clusters list, cluster status and get/replace/patch cluster config ([#28](https://github.com/sorintlab/stolon/pull/28) [#64](https://github.com/sorintlab/stolon/pull/64)). In future multiple additional functions will be added. See [doc/stolonctl.md](doc/stolonctl.md).
* The cluster config is now configurable using stolonctl ([#2](https://github.com/sorintlab/stolon/pull/2)). See [doc/cluster_config.md](doc/cluster_config.md).
* Users can directly put their preferred postgres configuration files inside a configuration directory ($dataDir/postgres/conf.d or provided with --pg-conf-dir) (see [doc/postgres_parameters.md](doc/postgres_parameters.md))
* Users can centrally manage global postgres parameters. They can be configured in the cluster configuration (see [doc/postgres_parameters.md](doc/postgres_parameters.md))
* Now the stolon-proxy closes connections on etcd error. This will help load balancing multiple stolon proxies ([#74](https://github.com/sorintlab/stolon/pull/74) [#76](https://github.com/sorintlab/stolon/pull/76) [#80](https://github.com/sorintlab/stolon/pull/80)).
* kubernetes: added readiness probe for stolon proxy ([#82](https://github.com/sorintlab/stolon/pull/82))
* The keeper takes an exclusive fs lock on its datadir ([#48](https://github.com/sorintlab/stolon/pull/48))
* Numerous bug fixes and improved tests.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ stolon is a cloud native PostgreSQL manager for PostgreSQL high availability. It

## Features

* leverages PostgreSQL streaming replication
* Leverages PostgreSQL streaming replication.
* [kubernetes integration](examples/kubernetes/README.md) letting you achieve postgreSQL high availability.
* uses [etcd](https://github.com/coreos/etcd) as an high available data store and for leader election
* asynchronous (default) and [synchronous](doc/syncrepl.md) replication.
* Uses [etcd](https://github.com/coreos/etcd) as an high available data store and for leader election
* Asynchronous (default) and [synchronous](doc/syncrepl.md) replication.
* Full cluster setup in minutes.
* Easy [cluster admininistration](doc/stolonctl.md)

## Architecture

Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ In this example you'll see how stolon can provide an high available postgreSQL c
## Docker image
Prebuilt images are available on the dockerhub, the images' tags are their release version. Additional images are available:

* `latest`: latest released image (actually not existing, it will apppear when the first release is done)
* `latest`: latest released image (actually v0.2.0).
* `master`: automatically built after every commit to the master branch.


In the [image](examples/kubernetes/image/docker) directory you'll find the Dockerfile to build the image used in this example. Once the image is built you should push it to the docker registry used by your kubernetes infrastructure.

`sorintlab/stolon:master` is the one used by the kubernetes definitions in this example.
`sorintlab/stolon:v0.2.0` is the one used by the kubernetes definitions in this example.
For a more stable testing you can use `sorintlab/stolon:latest` (when available)

## Cluster setup and tests
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/stolon-keeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: stolon-keeper
image: sorintlab/stolon:master
image: sorintlab/stolon:v0.2.0
env:
- name: KEEPER
value: "true"
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/stolon-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: stolon-proxy
image: sorintlab/stolon:master
image: sorintlab/stolon:v0.2.0
env:
- name: PROXY
value: "true"
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/stolon-sentinel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: stolon-sentinel
image: sorintlab/stolon:master
image: sorintlab/stolon:v0.2.0
env:
- name: SENTINEL
value: "true"
Expand Down
77 changes: 77 additions & 0 deletions scripts/build-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env bash

set -e

VER=$1
PROJ="stolon"

if [ -z "$1" ]; then
echo "Usage: ${0} VERSION" >> /dev/stderr
exit 255
fi

set -u

function setup_env {
local proj=${1}
local ver=${2}

if [ ! -d ${proj} ]; then
git clone https://github.com/sorintlab/${proj}
fi

pushd ${proj} >/dev/null
git checkout master
git fetch --all
git reset --hard origin/master
git checkout $ver
popd >/dev/null
}


function package {
local target=${1}
local srcdir="${2}/bin"

local ccdir="${srcdir}/${GOOS}_${GOARCH}"
if [ -d ${ccdir} ]; then
srcdir=${ccdir}
fi
for bin in stolon-keeper stolon-sentinel stolon-proxy stolonctl; do
cp ${srcdir}/${bin} ${target}/${bin}
done

cp stolon/README.md ${target}/README.md

cp -R stolon/doc ${target}/doc
cp -R stolon/examples ${target}/examples
}

function main {
mkdir -p release
cd release
setup_env ${PROJ} ${VER}

for os in linux; do
export GOOS=${os}
export GOARCH="amd64"

pushd stolon >/dev/null
./build
popd >/dev/null

TARGET="stolon-${VER}-${GOOS}-${GOARCH}"
mkdir -p ${TARGET}
package ${TARGET} ${PROJ}

if [ ${GOOS} == "linux" ]; then
tar cfz ${TARGET}.tar.gz ${TARGET}
echo "Wrote release/${TARGET}.tar.gz"
else
zip -qr ${TARGET}.zip ${TARGET}
echo "Wrote release/${TARGET}.zip"
fi
done
}

main
23 changes: 23 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#
# Build all release binaries and sources into "./release" directory.
#

set -e

VERSION=$1
if [ -z "${VERSION}" ]; then
echo "Usage: ${0} VERSION" >> /dev/stderr
exit 255
fi

BASEDIR=$(readlink -f $(dirname $0))/..
BINDIR=${BASEDIR}/bin

if [ $PWD != $BASEDIR ]; then
cd $BASEDIR
fi


echo Building stolon binary...
./scripts/build-binary ${VERSION}

0 comments on commit 027e74e

Please sign in to comment.