Skip to content

Commit

Permalink
Add one-step installer and a note
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Wagner <[email protected]>

change alter system to alter database for the AM

Signed-off-by: Kai Wagner <[email protected]>
  • Loading branch information
ImTheKai committed Nov 19, 2024
1 parent 8a0f358 commit 7421990
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test script
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
format:
name: Install and set up
runs-on: ubuntu-24.04
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Update runner
run: sudo apt update -y && sudo apt upgrade -y
- name: Run script
run: ./pg-easy-deploy.sh
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Percona Server for PostgreSQL Easy Install
This repo provides a single click installation script for Percona Server for PostgreSQL and pg_tde. Currently we do support and test always against the latest community release of Debian/Ubuntu and Oracle Linux.
This repo provides a single click installation script for [Percona Server for PostgreSQL](https://docs.percona.com/postgresql/17/index.html) and [pg_tde](https://percona.github.io/pg_tde/main/index.html). Currently we do support and test always against the latest community release of Debian/Ubuntu and Oracle Linux.

## One-Step Automated Install
```
curl -fsSL https://raw.githubusercontent.com/ImTheKai/pg-easy-deploy/refs/heads/main/pg-easy-deploy.sh | bash
```

**NOTE**
Piping to `bash` is a controversial topic, as it prevents you from [reading code that is about to run](https://raw.githubusercontent.com/ImTheKai/pg-easy-deploy/refs/heads/main/pg-easy-deploy.sh) on your system. If you would prefer to review the code before installation, please take a look the [code](https://raw.githubusercontent.com/ImTheKai/pg-easy-deploy/refs/heads/main/pg-easy-deploy.sh).

## Usage
Currently we support installing [Percona Server for PostgreSQL](https://docs.percona.com/postgresql/17/index.html) with the [pg_tde](https://percona.github.io/pg_tde/main/index.html) extension. It deploys and configures TDE with a configured database and table, that's encrypted. Ready to start your testing.
Expand Down
4 changes: 2 additions & 2 deletions pg-easy-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ database_and_table_create() {
sudo -u postgres psql -U postgres -d $DATABASE -c "CREATE EXTENSION pg_tde;"
sudo -u postgres psql -U postgres -d $DATABASE -c "SELECT pg_tde_add_key_provider_file('file-vault','/tmp/pg_tde_test_keyring.per');"
sudo -u postgres psql -U postgres -d $DATABASE -c "SELECT pg_tde_set_principal_key('test-db-master-key','file-vault');"
sudo -u postgres psql -U postgres -d $DATABASE -c "ALTER SYSTEM SET default_table_access_method='tde_heap';"
sudo -u postgres psql -U postgres -d $DATABASE -c "ALTER DATABASE $DATABASE SET default_table_access_method='tde_heap';"
sudo -u postgres psql -U postgres -c "SELECT pg_reload_conf();"
sudo -u postgres psql -U postgres -d $DATABASE -c "CREATE TABLE $TABLE (album_id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, artist_id INTEGER, title TEXT NOT NULL, released DATE NOT NULL) USING tde_heap"
sudo -u postgres psql -U postgres -d $DATABASE -c "CREATE TABLE $TABLE (album_id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, artist_id INTEGER, title TEXT NOT NULL, released DATE NOT NULL)"
sudo -u postgres psql -U postgres -d $DATABASE -c "SELECT pg_tde_is_encrypted('albums');"
}

Expand Down

0 comments on commit 7421990

Please sign in to comment.