Comments (12)
I updated the README file, under the Build section you'll see what I added, ....the starting point is for users to run 'make deploy'...they can follow that target to see what scripts are run and what Kube deployment JSON is used.....down stream a 'kubectl create -f deployment.json' command is eventually run after some environment setup is done.
from postgres-operator.
thanks, I'll clear up this in the documentation today, I agree its vague at best.
from postgres-operator.
Wow, this was a really quick response! Thanks for that.
I'm going to seem daft to you, I'm sure, but I have absolutely no experience with go
so I'm still not able to follow your build instructions. Here's what I did:
- cd ~/projects/go/src && git clone https://github.com/CrunchyData/postgres-operator.git
- cd postgres-operator
- normally, I'd expect something like the standard
./configure
&&make
but there's no configure (that's fine, this isn't a C project), so I run make. It saysNothing to be done for 'check-go-vars
so I then runmake deploy
and I get this error:
$ make deploy
cd examples/operator && ./deploy.sh
CO_NAMESPACE not set, using default
CO_CMD not set, using kubectl
+++ dirname /Users/jar349/projects/go/src/postgres-operator/examples/operator/cleanup.sh
++ cd /Users/jar349/projects/go/src/postgres-operator/examples/operator
++ pwd
+ DIR=/Users/jar349/projects/go/src/postgres-operator/examples/operator
+ source /Users/jar349/projects/go/src/postgres-operator/examples/operator/setup.sh
++ '[' -z default ']'
++ '[' -z kubectl ']'
+ kubectl delete configmap operator-conf
Error from server (NotFound): configmaps "operator-conf" not found
+ kubectl --namespace=default delete deployment postgres-operator
Error from server (NotFound): deployments.extensions "postgres-operator" not found
+ sleep 10
error: error reading /conf/postgres-operator/backup-job.json: no such file or directory
./deploy.sh: line 28: envsubst: command not found
error: no objects passed to create
make: *** [deploy] Error 1
from postgres-operator.
And in case I needed to run the operatorimage
target first, that also has an exception.
$ make operatorimage
cd operator && go install postgres-operator.go
postgres-operator.go:20:2: cannot find package "github.com/Sirupsen/logrus" in any of:
/Users/jar349/projects/go/src/postgres-operator/vendor/github.com/Sirupsen/logrus (vendor tree)
/usr/local/Cellar/go/1.8.3/libexec/src/github.com/Sirupsen/logrus (from $GOROOT)
/Users/jar349/projects/go/src/github.com/Sirupsen/logrus (from $GOPATH)
postgres-operator.go:25:2: cannot find package "github.com/crunchydata/postgres-operator/operator/server" in any of:
/Users/jar349/projects/go/src/postgres-operator/vendor/github.com/crunchydata/postgres-operator/operator/server (vendor tree)
/usr/local/Cellar/go/1.8.3/libexec/src/github.com/crunchydata/postgres-operator/operator/server (from $GOROOT)
/Users/jar349/projects/go/src/github.com/crunchydata/postgres-operator/operator/server (from $GOPATH)
make: *** [operatorimage] Error 1
Because of my ignorance of go
I don't know how to get package github.com/Sirupsen/logrus...
from postgres-operator.
A google search tells me that I should try go get github.com/Sirupsen/logrus
which seems to work for me, but then I get cannot find package "github.com/crunchydata/postgres-operator/operator/server"
. I can install that too, but isn't there a way to just download all the dependencies at once as part of the make target??
from postgres-operator.
thanks for the testing this stuff out....I see several things I need to document from your feedback to make this easier to install....I'll work on another doc update and I see some missing dependencies there too from your logs which I'll document.
from postgres-operator.
I've looked through the setup scripts in examples/operator
and it seems to me like there's no need to pull the source code. I can foresee one day installing this like one installs nvm or homebrew, etc... via curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/master/setup.sh | sh -
where setup.sh downloads the files needed to create the configmaps, downloads the deployment.json template, runs a sed command to replace the placeholders, and runs kubectl create -f deployment.json
.
This would turn the install instructions into:
- Run this script to install the server-side operator
- Download the binary release of the cli and put it in your path
- You're done!
from postgres-operator.
I'm back to having users following the directions in the Build document...I think that is the best path for people to follow as it describes or attempts to describe the way to build/install....I'd be curious to your results if you follow from that document and see what happens. I've updated the docs to point users to the Build/Install doc from the README.
from postgres-operator.
I can't follow the document in its entirety because I am trying to install it in a real k8s cluster in AWS created via kops.
That being said, I was able to pick my way around the documentation to correctly build the pgo cli and the docker images. The instructions for downloading the dependencies was very helpful!
The problem that I ran into was gettext's envsubst
. I'm on a mac and although it provides the BSD gettext library, there's no envsubst
command. So, I installed the gettext from homebrew, which says this:
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
Instead of putting it in my PATH via ~/.bash_profile, I simply ran: $ PATH=$PATH:/usr/local/opt/gettext/bin/ ./deploy.sh
and got the following output:
CO_NAMESPACE not set, using default
CO_CMD not set, using kubectl
+++ dirname /Users/jar349/projects/go/src/github.com/crunchydata/postgres-operator/examples/operator/cleanup.sh
++ cd /Users/jar349/projects/go/src/github.com/crunchydata/postgres-operator/examples/operator
++ pwd
+ DIR=/Users/jar349/projects/go/src/github.com/crunchydata/postgres-operator/examples/operator
+ source /Users/jar349/projects/go/src/github.com/crunchydata/postgres-operator/examples/operator/setup.sh
++ '[' -z default ']'
++ '[' -z kubectl ']'
+ kubectl delete configmap operator-conf
Error from server (NotFound): configmaps "operator-conf" not found
+ kubectl --namespace=default delete deployment postgres-operator
Error from server (NotFound): deployments.extensions "postgres-operator" not found
+ sleep 10
error: error reading /conf/postgres-operator/backup-job.json: no such file or directory
deployment "postgres-operator" created
So the postgres-operator was deployed. But should I be concerned about this error?: error: error reading /conf/postgres-operator/backup-job.json: no such file or directory
from postgres-operator.
that error is due to the COROOT environment variable not being set...that is the location where you have the source repo cloned to....on my system it is /home/jeffmc/odev/src/github.com/crunchydata/postgres-operator
that env var is specified in the build.asciidoc around line 149, you would add that typically into your .bashrc.
from postgres-operator.
You're totally right! My copy/paste of the env vars I thought I needed didn't include COROOT (I saw it as GOROOT and thought I didn't need it since my go env works). I'm sorry for that.
I put it in my ~/.bash_profile and re-ran the deploy.sh script and it worked without errors this time.
Thanks for helping me through this. I claim that the instructions are clear enough now for someone with limited go experience to set this up on their kubernetes cluster and I recommend that you close this issue. If I have further problems, I'll create a new issue.
Thanks again!
from postgres-operator.
thanks, outside testing helps me considerably.
from postgres-operator.
Related Issues (20)
- Getting error ERROR: [078]: unable to remap invalid link 'pg_wal' for standby cluster creation of Postgres HOT 4
- How to collect non postgres database metrics via pgmonitor HOT 4
- Cannot set `use_endpoints: false` for PGO HOT 4
- Allow annotations to be added to services HOT 1
- Unable to get metrics for ccp_backrest_* query HOT 2
- Postgres Cluster (Restore) is able to be created with name that causes pod to have label longer than 63 characters. HOT 4
- pgAdmin4 not working with PG15 and PG16 HOT 5
- Make terms of usage for production more clear HOT 1
- Large memory usage on the replica pod HOT 3
- PGAdmin image upgrade resulted in (13)Permission denied: AH00091: httpd: could not open error log file HOT 2
- PGO upgrade caused PG13 backups to fail HOT 3
- PGUpgrade images & version support HOT 4
- pgbouncer operator setup with external postgresql host HOT 1
- How to set ulimit (stack size) with a larger value HOT 2
- registry.developers.crunchydata.com not availible anymore.. HOT 2
- how to create groups or run SQL files using crunchy postgres operator yaml without deleting the Postgres cluster HOT 1
- Basic Steps/Tutorial On how to use the Operator? HOT 3
- 5.5.1 broken upgrade HOT 2
- Documentation Bug - Missing Key HOT 2
- Create Openshift Service + Route on PGAdmin resource deployment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgres-operator.