Skip to content

Commit 885ce9b

Browse files
committed
Merge pull request #68 from arschles/readme-beta
doc(README.md): modifying the readme to reflect beta status
2 parents 1bbac54 + 9239af2 commit 885ce9b

1 file changed

Lines changed: 47 additions & 34 deletions

File tree

README.md

Lines changed: 47 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,69 @@
1-
# Postgres
1+
# Deis Postgres v2
22

3-
A PostgreSQL database for use in the [Deis](http://deis.io) open source PaaS.
3+
Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage applications on your own servers. Deis builds on [Kubernetes](http://kubernetes.io/) to provide a lightweight, easy and secure way to deploy your code to production.
44

5-
This Docker image is based on the official
6-
[postgres](https://registry.hub.docker.com/_/postgres/) image.
5+
For more information about the Deis workflow, please visit the main project page at https://github.com/deis/workflow.
76

8-
Master/slave replication and leader election code is largely inspired by [`compose/governor`](https://github.com/compose/governor).
7+
## Beta Status
98

10-
Please add any [issues](https://github.com/deis/postgres/issues) you find with this software.
9+
This Deis component is currently in beta status, and we welcome your input! If you have feedback, please submit an [issue][issues]. If you'd like to participate in development, please read the "Development" section below and submit a [pull request][prs].
1110

11+
# About
1212

13-
## Deploying
13+
This component is a PostgreSQL database for use in Kubernetes. It builds on the official [postgres](https://registry.hub.docker.com/_/postgres/) Docker image. While it's intended for use inside of the Deis open source [PaaS](https://en.wikipedia.org/wiki/Platform_as_a_service), it's flexible enough to be used as a standalone pod on any Kubernetes cluster or even as a standalone Docker container.
1414

15-
To build a dev release of this image, you will also need your own registry, but DockerHub or
16-
[Quay](https://quay.io/) will do fine here. To build, run:
15+
# Development
1716

18-
```bash
19-
$ export DEIS_REGISTRY=myregistry.com:5000
20-
$ make docker-build docker-push
21-
```
17+
The Deis project welcomes contributions from all developers. The high level process for development matches many other open source projects. See below for an outline.
2218

23-
This will compile the Docker image and push it to your registry.
19+
- Fork this repository
20+
- Make your changes
21+
- Submit a [pull request][prs] (PR) to this repository with your changes, and unit tests whenever possible
22+
- If your PR fixes any [issues][issues], make sure you write Fixes #1234 in your PR description (where #1234 is the number of the issue you're closing)
23+
- The Deis core contributors will review your code. After each of them sign off on your code, they'll label your PR with LGTM1 and LGTM2 (respectively). Once that happens, a contributor will merge it
2424

25-
After that, run
25+
## Prerequisites
2626

27-
```
28-
$ make deploy
29-
```
27+
In order to develop and test this component in a Deis cluster, you'll need the following:
3028

31-
Which will deploy the component to kubernetes. After a while, you should see one pod up with one
32-
running:
29+
* [GNU Make](https://www.gnu.org/software/make/)
30+
* [Docker](https://www.docker.com/) installed, configured and running
31+
* A working Kubernetes cluster and `kubectl` installed and configured to talk to the cluster
32+
* If you don't have this setup, please see [the installation instructions][install-k8s]
3333

34-
```
35-
NAME READY STATUS RESTARTS AGE
36-
postgres-6wy8o 1/1 Running 0 32s
37-
```
34+
## Testing Your Code
3835

39-
You can then query this pod as you would with any other Kubernetes pod:
36+
Once you have all the aforementioned prerequisites, you are ready to start writing code. Once you've finished building a new feature or fixed a bug, please write a unit or integration test for it if possible. See [an existing test](https://github.com/deis/postgres/blob/master/contrib/ci/test.sh) for an example test.
4037

41-
```
42-
$ kubectl logs -f postgres-6wy8o
43-
$ kubectl exec -it postgres-6wy8o psql
44-
```
38+
If your feature or bugfix doesn't easily lend itself to unit/integration testing, you may need to add tests at a higher level. Please consider adding a test to our [end-to-end test suite](https://github.com/deis/workflow-e2e) in that case. If you do, please reference the end-to-end test pull request in your pull request for this repository.
4539

40+
### Dogfooding
4641

47-
## Testing
42+
Finally, we encourage you to [dogfood](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) this component while you're writing code on it. To do so, you'll need to build and push Docker images with your changes.
4843

49-
You can run the test suite with
44+
This project has a [Makefile](https://github.com/deis/postgres/blob/master/Makefile) that makes these tasks significantly easier. It requires the following environment variables to be set:
5045

51-
```
52-
$ make test
46+
* `DEIS_REGISTRY` - A Docker registry that you have push access to and your Kubernetes cluster can pull from
47+
* If this is [Docker Hub](https://hub.docker.com/), leave this variable empty
48+
* Otherwise, ensure it has a trailing `/`. For example, if you're using [Quay.io](https://quay.io), use `quay.io/`
49+
* `IMAGE_PREFIX` - The organization in the Docker repository. This defaults to `deis`, but if you don't have access to that organization, set this to one you have push access to.
50+
* `SHORT_NAME` (optional) - The name of the image. This defaults to `controller`
51+
* `VERSION` (optional) - The tag of the Docker image. This defaults to the current Git SHA (the output of `git rev-parse --short HEAD`)
52+
53+
Assuming you have these variables set correctly, run `make docker-build` to build the new image, and `make docker-push` to push it. Here is an example command that would push to `quay.io/arschles/postgres:devel`:
54+
55+
```console
56+
export DEIS_REGISTRY=quay.io/
57+
export IMAGE_PREFIX=arschles
58+
export VERSION=devel
59+
make docker-build docker-push
5360
```
5461

62+
Note that you'll have to push your image to a Docker repository (`make docker-push`) in order for your Kubernetes cluster to pull the image. This is important for testing in your cluster.
5563

5664
## License
5765

58-
© 2015 Engine Yard, Inc.
66+
© 2015, 2016 Engine Yard, Inc.
5967

6068
Licensed under the Apache License, Version 2.0 (the "License"); you may
6169
not use this file except in compliance with the License. You may obtain
@@ -66,3 +74,8 @@ distributed under the License is distributed on an "AS IS" BASIS,
6674
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6775
See the License for the specific language governing permissions and
6876
limitations under the License.
77+
78+
[prs]: https://github.com/deis/postgres/pulls
79+
[issues]: https://github.com/deis/postgres/issues
80+
[install-k8s]: http://kubernetes.io/gettingstarted/
81+

0 commit comments

Comments
 (0)