Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quickstart for Postgres stable chart #5

Open
ohaiwalt opened this issue Dec 12, 2016 · 3 comments
Open

Add quickstart for Postgres stable chart #5

ohaiwalt opened this issue Dec 12, 2016 · 3 comments
Assignees

Comments

@ohaiwalt
Copy link
Owner

In the interests of getting a new user set up as quickly as possible, add a Quickstart to create a Postgres container to point Cog to.

@davejlong
Copy link
Contributor

I looked at using Postgres from the stable repo, but it doesn't look like it'll work with GCE, which I think most people are using to get up and running quickly, since it uses a generic persistent volume claim.

@ohaiwalt
Copy link
Owner Author

ohaiwalt commented Jan 5, 2017

@davejlong I was able to get this working in GCE. The generic setting for persistent volume claims will select whatever a default is for a given cloud provider, I believe. This isn't something you'd want to use in production, certainly, but for a quick test it's pretty neat.

helm install stable/postgresql --set postgresUser=cog,postgresDatabase=cog
PGPASSWORD=$(printf $(printf '\%o' `kubectl get secret --namespace default morbid-dolphin-postgresq -o jsonpath="{.data.postgres-password[*]}"`);echo)
helm install cog --set cog.secrets.slackAPIToken=$SLACK_API_TOKEN,cog.secrets.databaseURL=ecto://cog:$PGPASSWORD@morbid-dolphin-postgresq:5432/cog

This resulted in:

$ kubectl get pods
NAME                                        READY     STATUS    RESTARTS   AGE
binging-mongoose-cog-2713078290-6v8fl       1/1       Running   0          3m
binging-mongoose-relay-3439989241-3ipdh     1/1       Running   0          3m
morbid-dolphin-postgresq-4285123528-c0i85   1/1       Running   0          4m
$ kubectl get pvc
NAME                       STATUS    VOLUME                                     CAPACITY   ACCESSMODES   AGE
morbid-dolphin-postgresq   Bound     pvc-ce60c23f-d2ff-11e6-9a23-42010a800fe0   8Gi        RWO           4m

@ohaiwalt
Copy link
Owner Author

New Helm developments allow sufficient conditionals to make this work just adding the database instead of documentation, and that seems the entirely better route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants