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

Repository rename: using the new name everywhere #114

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker-push-tde-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:

- name: Build and push Docker image
run: |
docker build -t perconalab/postgres-tde-ext:${{ github.sha }} -t perconalab/postgres-tde-ext:latest . -f docker/Dockerfile
docker push -a perconalab/postgres-tde-ext
docker build -t perconalab/pg_tde:${{ github.sha }} -t perconalab/pg_tde:latest . -f docker/Dockerfile
docker push -a perconalab/pg_tde
4 changes: 2 additions & 2 deletions .github/workflows/docker-test-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:

- name: Build Docker image
run: |
docker build -t perconalab/postgres-tde-ext:${{ github.sha }} -t postgres-tde-ext-test . -f docker/Dockerfile
docker build -t perconalab/pg_tde:${{ github.sha }} -t pg_tde-test . -f docker/Dockerfile

- name: Run and test Docker image
run: |
docker run --name pg-tde -e POSTGRES_PASSWORD=mysecretpassword -d postgres-tde-ext-test
docker run --name pg-tde -e POSTGRES_PASSWORD=mysecretpassword -d pg_tde-test
sleep 10
IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pg-tde)
echo $IP
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/postgresql-16-pgdg-package-pgxs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ jobs:
sudo apt update
sudo apt -y install postgresql-16 postgresql-server-dev-16

- name: Clone postgres-tde-ext repository
- name: Clone pg_tde repository
uses: actions/checkout@master
with:
path: 'src/postgres-tde-ext'
path: 'src/pg_tde'

- name: Change src owner to postgres
run: |
sudo chmod o+rx ~
sudo chown -R postgres:postgres src

- name: Build postgres-tde-ext
- name: Build pg_tde
run: |
sudo -u postgres bash -c './configure'
sudo -u postgres bash -c 'make USE_PGXS=1'
sudo make USE_PGXS=1 install
working-directory: src/postgres-tde-ext
working-directory: src/pg_tde

- name: Start postgres-tde-ext tests
- name: Start pg_tde tests
run: |
sudo service postgresql stop
echo "shared_preload_libraries = 'pg_tde'" |
Expand All @@ -66,22 +66,22 @@ jobs:
sudo service postgresql start
sudo psql -V
sudo -u postgres bash -c 'make installcheck USE_PGXS=1'
working-directory: src/postgres-tde-ext
working-directory: src/pg_tde

- name: Report on test fail
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: Regressions diff and postgresql log
path: |
src/postgres-tde-ext/regression.diffs
src/postgres-tde-ext/logfile
src/pg_tde/regression.diffs
src/pg_tde/logfile
retention-days: 3

- name: Report on test fail 2
if: ${{ failure() }}
run: |
cat src/postgres-tde-ext/regression.diffs
cat src/pg_tde/regression.diffs

- name: Create release directory
run: |
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Publish release
uses: ncipollo/release-action@v1
# Only try and deploy on merged code
if: "github.repository == 'Percona-Lab/postgres-tde-ext' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')"
if: "github.repository == 'Percona-Lab/pg_tde' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')"
with:
artifacts: "pgtde-pgdg16.tar.gz,pgtde-pgdg16.deb"
omitBody: true
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/postgresql-16-src-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
ref: 'a81e5516fa4bc53e332cb35eefe231147c0e1749'
path: 'src'

- name: Clone postgres-tde-ext repository
- name: Clone pg_tde repository
uses: actions/checkout@v2
with:
path: 'src/contrib/postgres-tde-ext'
path: 'src/contrib/pg_tde'

- name: Create pgsql dir
run: mkdir -p /opt/pgsql
Expand All @@ -52,12 +52,12 @@ jobs:
sudo make install
working-directory: src

- name: Build postgres-tde-ext
- name: Build pg_tde
run: |
./configure
make -j
sudo make install
working-directory: src/contrib/postgres-tde-ext
working-directory: src/contrib/pg_tde

- name: Start postgresql cluster with pg_tde
run: |
Expand All @@ -68,25 +68,25 @@ jobs:
/opt/pgsql/data/postgresql.conf
echo "pg_tde.keyringConfigFile = '/tmp/keyring.json'" >> \
/opt/pgsql/data/postgresql.conf
cp src/contrib/postgres-tde-ext/keyring.json /tmp/keyring.json
cp src/contrib/pg_tde/keyring.json /tmp/keyring.json
pg_ctl -D /opt/pgsql/data -l logfile start

- name: Test postgres-tde-ext
- name: Test pg_tde
run: |
make installcheck
working-directory: src/contrib/postgres-tde-ext
working-directory: src/contrib/pg_tde

- name: Report on test fail
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: Regressions diff and postgresql log
path: |
src/contrib/postgres-tde-ext/regression.diffs
src/contrib/pg_tde/regression.diffs
logfile
retention-days: 3

- name: Report on test fail 2
if: ${{ failure() }}
run: |
cat src/contrib/postgres-tde-ext/regression.diffs
cat src/contrib/pg_tde/regression.diffs
18 changes: 9 additions & 9 deletions .github/workflows/postgresql-16-src-meson-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ jobs:
ref: 'a81e5516fa4bc53e332cb35eefe231147c0e1749'
path: 'src'

- name: Clone postgres-tde-ext repository
- name: Clone pg_tde repository
uses: actions/checkout@v2
with:
path: 'src/contrib/postgres-tde-ext'
path: 'src/contrib/pg_tde'

- name: Include postgres-tde-ext in meson build
- name: Include pg_tde in meson build
run: |
echo "subdir('postgres-tde-ext')" >> src/contrib/meson.build
echo "subdir('pg_tde')" >> src/contrib/meson.build

- name: Build postgres
run: |
meson setup build --prefix `pwd`/../inst --buildtype=release
cd build && ninja && ninja install
working-directory: src

- name: Test postgres-tde-ext
- name: Test pg_tde
run: |
cp ../contrib/postgres-tde-ext/keyring.json /tmp/keyring.json
cp ../contrib/pg_tde/keyring.json /tmp/keyring.json
meson test --suite setup -v
meson test --suite postgres-tde-ext -v --num-processes 1
meson test --suite pg_tde -v --num-processes 1
working-directory: src/build

- name: Report on test fail
Expand All @@ -69,7 +69,7 @@ jobs:
with:
name: Regressions diff and postgresql log
path: |
src/build/testrun/postgres-tde-ext/regress/
src/build/testrun/pg_tde/regress/
retention-days: 3

- name: Setup test environment
Expand All @@ -82,7 +82,7 @@ jobs:
bin/createdb sbtest2
bin/createuser sbtest -s
bin/psql sbtest2 <<< "CREATE EXTENSION pg_tde;"
cp -r ../src/contrib/postgres-tde-ext/sysbench .
cp -r ../src/contrib/pg_tde/sysbench .
working-directory: inst

- name: Run baseline performance tests
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/postgresql-16-src-meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ jobs:
ref: 'a81e5516fa4bc53e332cb35eefe231147c0e1749'
path: 'src'

- name: Clone postgres-tde-ext repository
- name: Clone pg_tde repository
uses: actions/checkout@v2
with:
path: 'src/contrib/postgres-tde-ext'
path: 'src/contrib/pg_tde'

- name: Include postgres-tde-ext in meson build
- name: Include pg_tde in meson build
run: |
echo "subdir('postgres-tde-ext')" >> src/contrib/meson.build
echo "subdir('pg_tde')" >> src/contrib/meson.build

- name: Build postgres
run: |
meson setup build --prefix `pwd`/../inst --buildtype=debug -Dcassert=true
cd build && ninja && ninja install
working-directory: src

- name: Test postgres-tde-ext with keyring_file
- name: Test pg_tde with keyring_file
run: |
cp ../contrib/postgres-tde-ext/keyring.json /tmp/keyring.json
cp ../contrib/pg_tde/keyring.json /tmp/keyring.json
meson test --suite setup -v
meson test --suite postgres-tde-ext -v --num-processes 1
meson test --suite pg_tde -v --num-processes 1
working-directory: src/build

- name: Report on test fail
Expand All @@ -69,21 +69,21 @@ jobs:
with:
name: Regressions diff and postgresql log
path: |
src/build/testrun/postgres-tde-ext/regress/
src/build/testrun/pg_tde/regress/
retention-days: 3

- name: Test postgres-tde-ext with keyring_vault
- name: Test pg_tde with keyring_vault
run: |
TV=$(mktemp)
{ exec >$TV; vault server -dev; } &
sleep 10
ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n)
echo "Root token: $ROOT_TOKEN"
cp ../contrib/postgres-tde-ext/keyring-vault.json /tmp/keyring.json
cp ../contrib/pg_tde/keyring-vault.json /tmp/keyring.json
sed -i "s/ROOT_TOKEN/$ROOT_TOKEN/g" /tmp/keyring.json
cat /tmp/keyring.json
meson test --suite setup -v
meson test --suite postgres-tde-ext -v --num-processes 1
meson test --suite pg_tde -v --num-processes 1
working-directory: src/build

- name: Report on test fail
Expand All @@ -92,6 +92,6 @@ jobs:
with:
name: Regressions diff and postgresql log
path: |
src/build/testrun/postgres-tde-ext/regress/
src/build/testrun/pg_tde/regress/
retention-days: 3

2 changes: 1 addition & 1 deletion .github/workflows/postgresql-perf-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
unzip pr_perf_results.zip

- name: Clone postgres-tde-ext repository
- name: Clone pg_tde repository
uses: actions/checkout@v2
with:
path: 'src'
Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MODULE_big = pg_tde
EXTENSION = pg_tde
DATA = pg_tde--1.0.sql

REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/postgres-tde-ext/postgres-tde-ext.conf
REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/pg_tde/pg_tde.conf
REGRESS = toast_decrypt \
toast_extended_storage \
move_large_tuples \
Expand Down Expand Up @@ -44,7 +44,7 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
override PG_CPPFLAGS += -I$(CURDIR)/src/include
include $(PGXS)
else
subdir = contrib/postgres-tde-ext
subdir = contrib/pg_tde
top_builddir = ../..
override PG_CPPFLAGS += -I$(top_srcdir)/$(subdir)/src/include
include $(top_builddir)/src/Makefile.global
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ This is an `experimental` encrypted access method for PostgreSQL 16.

## Latest test release

To download the latest build of the main branch, use the `HEAD` release from [releases](https://github.com/Percona-Lab/postgres-tde-ext/releases).
To download the latest build of the main branch, use the `HEAD` release from [releases](https://github.com/Percona-Lab/pg_tde/releases).

Builds are available in a tar.gz format, containing only the required files, and as a deb package.
The deb package is built against the pgdg16 release, but this dependency is not yet enforced in the package.

## Documentation

Find more information about `pg_tde` in the [documentation](https://percona-lab.github.io/postgres-tde-ext/).
Find more information about `pg_tde` in the [documentation](https://percona-lab.github.io/pg_tde/).

## Installation steps

1. Build and install the plugin with make [from source](#build-from-source), or download a [release](https://github.com/Percona-Lab/postgres-tde-ext/releases) and [install the package](#install-from-package)
1. Build and install the plugin with make [from source](#build-from-source), or download a [release](https://github.com/Percona-Lab/pg_tde/releases) and [install the package](#install-from-package)
2. `pg_tde` needs to be loaded at the start time. The extension requires additional shared memory; therefore, add the `pg_tde` value for the `shared_preload_libraries` parameter and restart the `postgresql` instance.

Use the [ALTER SYSTEM](https://www.postgresql.org/docs/current/sql-altersystem.html) command from `psql` terminal to modify the `shared_preload_libraries` parameter.
Expand Down Expand Up @@ -82,26 +82,26 @@ brew install make autoconf curl json-c gettext postresql@16
4. Clone the repository, build and install it with the following commands:

```
git clone git://github.com/Percona-Lab/postgres-tde-ext
git clone git://github.com/Percona-Lab/pg_tde
```

Compile and install the extension

```
cd postgres-tde-ext
cd pg_tde
./configure
make USE_PGXS=1
sudo make USE_PGXS=1 install
```

_See [Make Builds for Developers](https://github.com/Percona-Lab/postgres-tde-ext/wiki/Make-builds-for-developers) for more info on the build infrastructure._
_See [Make Builds for Developers](https://github.com/Percona-Lab/pg_tde/wiki/Make-builds-for-developers) for more info on the build infrastructure._

## Install from package

1. Download the latest [release package](https://github.com/Percona-Lab/postgres-tde-ext/releases)
1. Download the latest [release package](https://github.com/Percona-Lab/pg_tde/releases)

``` sh
wget https://github.com/Percona-Lab/postgres-tde-ext/releases/download/latest/pgtde-pgdg16.deb
wget https://github.com/Percona-Lab/pg_tde/releases/download/latest/pgtde-pgdg16.deb
```
2. Install the package

Expand All @@ -111,9 +111,9 @@ sudo dpkg -i pgtde-pgdg16.deb

## Run in Docker

You can find docker images built from the current main branch on [Docker Hub](https://hub.docker.com/r/perconalab/postgres-tde-ext). Images build on top of [postgres:16](https://hub.docker.com/_/postgres) official image. To run it:
You can find docker images built from the current main branch on [Docker Hub](https://hub.docker.com/r/perconalab/pg_tde). Images build on top of [postgres:16](https://hub.docker.com/_/postgres) official image. To run it:
```
docker run --name pg-tde -e POSTGRES_PASSWORD=mysecretpassword -d perconalab/postgres-tde-ext
docker run --name pg-tde -e POSTGRES_PASSWORD=mysecretpassword -d perconalab/pg_tde
```
It builds and adds `pg_tde` extension to Postgres 16. Relevant `postgresql.conf` and `tde_conf.json` are created in `/etc/postgresql/` inside the container. This dir is exposed as volume.

Expand Down
Loading
Loading