Installing from source¶
config.ymlでinstall_from_source
を設定することにより、Gitリポジトリからビルドおよびインストールする拡張機能のリストを定義できます。
cluster_vars:
install_from_source:
- name: ext
git_repository_url: https://repo.example.com/ext.git
git_repository_ref: dev/example
- name: otherext
git_repository_url: ssh://repo.example.com/otherext.git
git_repository_ref: master
source_directory: /opt/postgres/src/otherext
build_directory: /opt/postgres/build/otherext
build_commands:
- "make -f /opt/postgres/src/otherext/Makefile install"
build_environment:
VAR: value
TPAはリストされている順序で拡張機能を1つずつビルドおよびインストールするため、正しい順序で言及することにより、別の拡張機能( pglogical やBDRなど)をビルドできます。
各エントリは、ビルドするname 、git_repository_url
、およびgit_repository_ref (デフォルト:master
)を指定する必要があります。 SSH agent forwarding or an HTTPS username/password を使用できます
Gitリポジトリに対して認証します。上記のようにsource_directory
、build_directory 、build_environment
、およびbuild_commands も設定します。
繰り返しデプロイを行うときにビルドディレクトリを再利用するには、
tpaexec deploy … --skip-tags build-clean を実行します。
(それ以外の場合、ビルドを開始する前に古いビルドディレクトリが空になります。)
ローカルソースディレクトリ を構成することもできます。
開発ビルドをスピードアップします。
ソースビルドを実行するたびに、Postgresが再起動されます。
依存関係をビルドする¶
- ソースからビルドしている場合、TPAは基本的なPostgresビルドの依存関係がインストールされていることを保証します。追加のパッケージが必要な場合は、
TPAパッケージのインストール に記載してください。例
cluster_vars:
packages:
common:
- golang-1.16