Skip to content

Commit 0940818

Browse files
dragarciaolirice
andauthored
chore: install pg_graphql extension (#152)
* install pg_graphql extension * install dependencies * update steps to reflect how the docker example is built * update pg_graphql to release v0.1.0 * omit ./bin/pgc build * add pg_graphql to list of extensions to be installed * bump pg_graphql version to v0.1.1 * update pg_graphql release from 0.1.1 to 0.1.2 Co-authored-by: Oliver Rice <github@oliverrice.com>
1 parent 7f3f5e7 commit 0940818

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# pg_graphql
2+
- name: pg_graphql - download & install dependencies
3+
apt:
4+
pkg:
5+
- bison
6+
- build-essential
7+
- clang-11
8+
- cmake
9+
- flex
10+
- python2
11+
update_cache: yes
12+
install_recommends: no
13+
14+
- name: pg_graphql - download libgraphqlparser
15+
git:
16+
repo: https://github.com/graphql/libgraphqlparser.git
17+
dest: /tmp/libgraphqlparser
18+
version: "{{ libgraphqlparser_release }}"
19+
become: yes
20+
21+
- name: pg_graphql - compile libgraphqlparser
22+
shell:
23+
cmd: "cmake ."
24+
chdir: /tmp/libgraphqlparser
25+
become: yes
26+
27+
- name: pg_graphql - build libgraphqlparser
28+
make:
29+
chdir: /tmp/libgraphqlparser
30+
target: install
31+
become: yes
32+
33+
- name: pg_graphql - download latest release
34+
git:
35+
repo: https://github.com/supabase/pg_graphql.git
36+
dest: /tmp/pg_graphql
37+
version: "{{ pg_graphql_release }}"
38+
become: yes
39+
40+
- name: pg_graphql - build
41+
make:
42+
chdir: /tmp/pg_graphql
43+
target: install
44+
become: yes
45+
46+
- name: pg_graphql - update links and cache for shared libraries
47+
shell:
48+
cmd: "/sbin/ldconfig -v"
49+
chdir: /tmp/pg_graphql
50+
become: yes

ansible/tasks/setup-extensions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@
5151

5252
- name: Install pgsodium
5353
import_tasks: tasks/postgres-extensions/18-pgsodium.yml
54+
55+
- name: Install pg_graphql
56+
import_tasks: tasks/postgres-extensions/19-pg_graphql.yml

ansible/vars.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,9 @@ libsodium_release_checksum: sha1:795b73e3f92a362fabee238a71735579bf46bb97
9494
pgsodium_release: "2.0.1"
9595
pgsodium_release_checksum: sha1:b6ef733c9bbae590c1eee676fd0a97fd129893e0
9696

97+
libgraphqlparser_release: "v0.7.0"
98+
99+
pg_graphql_release: "v0.1.2"
100+
97101
osquery_deb: 'https://pkg.osquery.io/deb/osquery_5.1.0-1.linux_arm64.deb'
98102
osquery_deb_checksum: sha1:6b6fa49edcfad5d77aa1e59c75b8708de2f634ac

0 commit comments

Comments
 (0)