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

init postgres sidecar #263

Merged
merged 1 commit into from
Oct 14, 2019
Merged

init postgres sidecar #263

merged 1 commit into from
Oct 14, 2019

Conversation

ransomw1c
Copy link
Contributor

@ransomw1c ransomw1c commented Sep 25, 2019

@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch 2 times, most recently from 9256d13 to bc3ff8c Compare September 26, 2019 21:19
@ransomw1c
Copy link
Contributor Author

as of bc3ff8c ,

make pg-demo-coord-build-app
make build-and-push-pg-sidecar
./hack/fuse-demo/create_coord_pg_pod.sh

followed by

./hack/fuse-demo/run_coord_pg_shell.sh -s

and

./hack/fuse-demo/run_coord_pg_shell.sh

to enter shells in the sidecar and application containers, respectively,

and then, first, in the application container

/tmp/coord/.scripts/wrap_application.sh -s -c /tmp/coord -b postgres -- ./mock_application_pg.sh 5430

followed by

./wrap_datamon_pg.sh -c /tmp/coord -x -r ransom-datamon-test-repo -l pg-coord-example -m 'postgres coordination example' -p 5430

in the sidecar

is a minimal demo of creating a database and coordinating an upload to datamon.

@kerneltime
Copy link
Contributor

The approach looks fine. Will try to give it a try tomorrow.

@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch 2 times, most recently from 8dcf220 to 840ff72 Compare October 1, 2019 23:49
@ransomw1c
Copy link
Contributor Author

ransomw1c commented Oct 1, 2019

POC demo is

./hack/fuse-demo/demo_pg_coord.sh
  • -s skip container builds (after the first use)
  • -b build datamon source
  • -c passthrough constant, an arbitrary non-negative integer, verifies that the mock application accesses source and output data

ensure no deployment exists before running pg demo via kubectl delete as needed

@ransomw1c
Copy link
Contributor Author

note to self

to resolve in parallel: i256-tinicache--wip workaround for rate-limiting error from the host (not a distro pkg, perhaps use a distro pkg?) where the pid 0 bin resides.

@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch 3 times, most recently from bd68590 to d4264d6 Compare October 2, 2019 23:42
@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch from d4264d6 to 08787f1 Compare October 2, 2019 23:47
@ransomw1c ransomw1c changed the title [wip] init postgres sidecar init postgres sidecar Oct 2, 2019
@ransomw1c ransomw1c marked this pull request as ready for review October 2, 2019 23:55
@fredbi
Copy link
Contributor

fredbi commented Oct 3, 2019

.circleci/config.yml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
sidecar-pg.Dockerfile Outdated Show resolved Hide resolved
sidecar-pg.Dockerfile Show resolved Hide resolved
README.md Show resolved Hide resolved
@ransomw1c
Copy link
Contributor Author

consider Postgres CHECKPOINT along with vacuuming.

https://www.postgresql.org/docs/current/sql-checkpoint.html

#256 (comment)

@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch 4 times, most recently from d3d3b5a to 6dbaa3e Compare October 8, 2019 22:03
@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch from 2dce87b to a13c2e9 Compare October 10, 2019 20:03
@ransomw1c
Copy link
Contributor Author

ransomw1c commented Oct 10, 2019

demo_pg_coord.sh requires postgres 12 on local. it's possible to install via an unofficial brew repository

brew tap petere/postgresql
brew tap-pin petere/postgresql

except the brew repository has an issue with the os x system libraries with the following workaround

cd /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library
sudo mv Perl Perl.bkup_postgresinstall
sudo ln -s /Library/Perl
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
sudo mv Perl Perl.bkup_link
sudo mv Perl.bkup_postgresinstall Perl

such that it's possible to install postgres 12 via brew with

brew install petere/postgresql/postgresql@12

and follow instructions to access postgres. i used the add /usr/local/opt/postgresql@12/bin to path option.

@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch 6 times, most recently from 35bb107 to 05408df Compare October 14, 2019 21:06
Signed-off-by: Ransom Williams <[email protected]>
@ransomw1c ransomw1c force-pushed the i256-pgsidecar--wip branch from 489a219 to c0bdbfa Compare October 14, 2019 21:41
@ransomw1c
Copy link
Contributor Author

status on landing is that internals have a reasonable amount of stress testing, while user-interface is to be significantly revisited.

@ransomw1c ransomw1c merged commit d48cd33 into master Oct 14, 2019
@ransomw1c ransomw1c deleted the i256-pgsidecar--wip branch October 14, 2019 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants