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
を指定する必要があります。 Git credentials を使用できます
Gitリポジトリに対して認証するため。また、上記のようにsource_directory
、build_directory 、build_environment
、およびbuild_commands を設定します。
tpaexec deploy … --skip-tags build-clean
を実行して、展開を繰り返すときにビルドディレクトリを再利用します。それ以外の場合、古いビルドディレクトリはビルドを開始する前に空にされます。
ローカルソースディレクトリ を構成することもできます。
開発ビルドを高速化します。
ソースビルドを実行するたびに、Postgresが再起動されます。
ビルドの依存関係#
ソースからビルドする場合、TPAは、基本的なPostgresビルドの依存関係がインストールされることを保証します。追加パッケージが必要な場合は、 Installing packages に記載してください。例
cluster_vars:
packages:
common:
- golang-1.16