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

Run with Postgres #82

Merged
merged 4 commits into from
Aug 1, 2019
Merged

Run with Postgres #82

merged 4 commits into from
Aug 1, 2019

Conversation

jakubdyszkiewicz
Copy link
Contributor

Created new Makefile tasks

  • start/postgres - start postgres with initialized DB
  • run/standalone/postgres - runs CP with standalone postgres mode

moved test/postgres/docker-compose.yaml to tools/postgres/docker-compose.yaml, because it's now used in integration as well as in start/postgres.

Installation script is in install/postgres/resource.sql and is used in docker-compose.

Removed PluginConfig as it was ignored in 5 cases. Postgres is the first case in which we configure plugin, but it's kind of more convenient to retrieve it from PluginContext without type casting.

Copy link
Contributor

@yskopets yskopets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any connect timeout to Postgres ?

Apparently, there is a problem with connectivity to Postgres on my machine and Control Plane stuck at start up:

KONVOY_GRPC_PORT=5678 \
	KONVOY_HTTP_PORT=5679 \
	KONVOY_ENVIRONMENT=standalone \
	KONVOY_STORE_TYPE=postgres \
	KONVOY_STORE_POSTGRES_HOST=localhost \
	KONVOY_STORE_POSTGRES_PORT=15432 \
	KONVOY_STORE_POSTGRES_USER=konvoy \
	KONVOY_STORE_POSTGRES_PASSWORD=konvoy \
	KONVOY_STORE_POSTGRES_DB_NAME=konvoy \
	go run ./app/konvoy-cp/main.go run
2019-07-30T20:08:50.132+0200	INFO	Skipping reading config from file
^Csignal: interrupt
make: *** [run/standalone/postgres] Error 1


real	8m49.101s
user	0m20.401s
sys	0m13.761s

@jakubdyszkiewicz jakubdyszkiewicz changed the base branch from feature/run-standalone to master July 31, 2019 18:27
@jakubdyszkiewicz
Copy link
Contributor Author

Rebased to master.
Renamed standalone to universal.
Added connection timeout - good point there! I tested with simple nc -l 15432 and it works. It was indeed stuck before.
Restored PluginConfig as discussed on Slack. Although we don't use it almost at all now, this might be useful when plugging in multiple sources of the same type.

@jakubdyszkiewicz jakubdyszkiewicz merged commit 1d8e676 into master Aug 1, 2019
@yskopets yskopets deleted the feature/run-postgres branch August 13, 2019 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants