-
Notifications
You must be signed in to change notification settings - Fork 28
warpsql: Add Citus Extension #12
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
Merged
ChakshuGautam
merged 2 commits into
Samagra-Development:main
from
jayanth-kumar-morem:main
Apr 20, 2023
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,7 @@ RUN set +o pipefail \ | |
| ARG PG_VERSION | ||
| FROM bitnami/postgresql:${PG_VERSION} | ||
| ARG PG_VERSION | ||
| ARG CITUS_VERSION="11.2.0" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we expose this to makefile and subsequently expose this to the CI to test out various versions?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| LABEL maintainer="Timescale https://www.timescale.com" | ||
|
|
||
|
|
@@ -89,6 +90,22 @@ RUN set -ex \ | |
| && cd build && make install \ | ||
| && cd ~ \ | ||
| \ | ||
| # Install Citus | ||
| && apt-get update \ | ||
| && apt-get install -y curl liblz4-dev libzstd-dev clang libkrb5-dev libicu-dev libxslt1-dev libxml2-dev llvm-dev libcurl4-openssl-dev \ | ||
| && CITUS_DOWNLOAD_URL="https://github.com/citusdata/citus/archive/refs/tags/v${CITUS_VERSION}.tar.gz" \ | ||
| && curl -L -o /tmp/citus.tar.gz "${CITUS_DOWNLOAD_URL}" \ | ||
| && tar -C /tmp -xvf /tmp/citus.tar.gz \ | ||
| && addgroup --system postgres \ | ||
| && adduser --system --ingroup postgres --home /opt/bitnami/postgresql --no-create-home postgres \ | ||
| && chown -R postgres:postgres /tmp/citus-${CITUS_VERSION} \ | ||
| && cd /tmp/citus-${CITUS_VERSION} \ | ||
| && PATH="/opt/bitnami/postgresql/bin:$PATH" ./configure \ | ||
| && make \ | ||
| && make install \ | ||
| && cd ~ \ | ||
| && rm -rf /tmp/citus.tar.gz /tmp/citus-${CITUS_VERSION} \ | ||
| \ | ||
| && apt-get autoremove --purge -y \ | ||
| \ | ||
| build-essential \ | ||
|
|
@@ -105,8 +122,11 @@ RUN set -ex \ | |
| "${HOME}/.cache" \ | ||
| /var/lib/apt/lists/* \ | ||
| /tmp/* \ | ||
| /var/tmp/* | ||
|
|
||
| /var/tmp/* \ | ||
| \ | ||
| # Update shared_preload_libraries | ||
| && sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'citus,timescaledb'/g" /opt/bitnami/postgresql/conf/postgresql.conf | ||
|
|
||
| USER 1001 | ||
|
|
||
| ENTRYPOINT [ "/opt/bitnami/scripts/postgresql/timescaledb-bitnami-entrypoint.sh" ] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we expose this to makefile and subsequently expose this to the CI to test out various versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this can be a future task, I believe, as of now, we are in the development phase of adding extensions and if we add version variables to CI now itself, it would add more jobs, which I believe in the development phase is unnecessary. Sticking to the smoke tests solves the purpose in the dev phase.