@@ -114,10 +114,6 @@ curl https://gitlab.com/postgres-ai/database-lab/-/raw/${dle_version}/configs/st
114
114
curl https://gitlab.com/postgres-ai/database-lab/-/raw/${dle_version} /configs/standard/postgres/control/postgresql.conf --output $postgres_conf_path /postgresql.conf
115
115
cat /tmp/postgresql_clones_custom.conf >> $postgres_conf_path /postgresql.conf
116
116
117
- # TODO: move to Packer instructions.
118
- wget https://github.com/mikefarah/yq/releases/download/v4.14.1/yq_linux_amd64 -O /usr/bin/yq && \
119
- chmod +x /usr/bin/yq
120
-
121
117
yq e -i '
122
118
.global.debug=${dle_debug_mode} |
123
119
.server.verificationToken="${dle_verification_token}" |
@@ -140,23 +136,23 @@ case "${source_type}" in
140
136
# Mount directory to store dump files.
141
137
extra_mount=" --volume /var/lib/dblab/dblab_pool_00/dump:/var/lib/dblab/dblab_pool/dump"
142
138
143
- yq e -i '
144
- .retrieval.spec.logicalDump.options.source.connection.host = ${source_postgres_host}" |
145
- .retrieval.spec.logicalDump.options.source.connection.port = ${source_postgres_port}" |
146
- .retrieval.spec.logicalDump.options.source.connection.username = ${source_postgres_username}" |
147
- .retrieval.spec.logicalDump.options.source.connection.password = ${source_postgres_password}" |
148
- .retrieval.spec.logicalDump.options.parallelJobs = 1"
149
- ' $dle_config_path /server.yml
139
+ yq e -i '
140
+ .retrieval.spec.logicalDump.options.source.connection.host = ${source_postgres_host}" |
141
+ .retrieval.spec.logicalDump.options.source.connection.port = ${source_postgres_port}" |
142
+ .retrieval.spec.logicalDump.options.source.connection.username = ${source_postgres_username}" |
143
+ .retrieval.spec.logicalDump.options.source.connection.password = ${source_postgres_password}" |
144
+ .retrieval.spec.logicalDump.options.parallelJobs = 1"
145
+ ' $dle_config_path /server.yml
150
146
151
147
# restore pg_dump via pipe - without saving it on the disk
152
148
yq e -i '
153
- .databaseContainer.dockerImage="postgresai/extended-postgres:${source_postgres_version}" |
154
- .retrieval.spec.logicalDump.options.immediateRestore.enabled=true |
155
- .retrieval.spec.logicalDump.options.immediateRestore.forceInit=true |
156
- .retrieval.spec.logicalDump.options.immediateRestore.configs alias = .databaseConfig |
157
- del(.retrieval.jobs[] | select(. == "logicalRestore")) |
158
- .databaseConfig.configs.shared_preload_libraries = ${postgres_config_shared_preload_libraries}
159
- ' $dle_config_path /server.yml
149
+ .databaseContainer.dockerImage="postgresai/extended-postgres:${source_postgres_version}" |
150
+ .retrieval.spec.logicalDump.options.immediateRestore.enabled=true |
151
+ .retrieval.spec.logicalDump.options.immediateRestore.forceInit=true |
152
+ .retrieval.spec.logicalDump.options.immediateRestore.configs alias = .databaseConfig |
153
+ del(.retrieval.jobs[] | select(. == "logicalRestore")) |
154
+ .databaseConfig.configs.shared_preload_libraries = ${postgres_config_shared_preload_libraries}
155
+ ' $dle_config_path /server.yml
160
156
;;
161
157
162
158
s3)
@@ -167,15 +163,15 @@ yq e -i '
167
163
extra_mount=" --volume ${source_pgdump_s3_mount_point} :${source_pgdump_s3_mount_point} "
168
164
169
165
yq e -i '
170
- del(.retrieval.jobs[] | select(. == "logicalDump")) |
171
- .retrieval.spec.logicalRestore.options.dumpLocation="${source_pgdump_s3_mount_point}/${source_pgdump_path_on_s3_bucket}"
172
- ' $dle_config_path /server.yml
166
+ del(.retrieval.jobs[] | select(. == "logicalDump")) |
167
+ .retrieval.spec.logicalRestore.options.dumpLocation="${source_pgdump_s3_mount_point}/${source_pgdump_path_on_s3_bucket}"
168
+ ' $dle_config_path /server.yml
173
169
174
170
nProcessors = $( getconf _NPROCESSORS_ONLN)
175
171
yq e -i '
176
- .retrieval.spec.logicalDump.options.parallelJobs=${postgres_dump_parallel_jobs} |
177
- .retrieval.spec.logicalRestore.options.parallelJobs=$nProcessors
178
- ' $dle_config_path /server.yml
172
+ .retrieval.spec.logicalDump.options.parallelJobs=${postgres_dump_parallel_jobs} |
173
+ .retrieval.spec.logicalRestore.options.parallelJobs=$nProcessors
174
+ ' $dle_config_path /server.yml
179
175
;;
180
176
181
177
esac
@@ -221,12 +217,12 @@ curl https://gitlab.com/postgres-ai/joe/-/raw/${joe_version}/configs/config.exam
221
217
222
218
yq e -i '
223
219
.app.debug = ${dle_debug_mode} |
224
- .platform.token = ${platform_access_token} |
225
- .channelMapping.dblabServers.prod1.token = ${dle_verification_token} |
220
+ .platform.token = " ${platform_access_token}" |
221
+ .channelMapping.dblabServers.prod1.token = " ${dle_verification_token}" |
226
222
.channelMapping.dblabServers.url.token = "http://localhost:2345" |
227
- .channelMapping.communicationTypes.webui[0].credentials.signingSecret = ${platform_joe_signing_secret} |
228
- .channelMapping.communicationTypes.webui[0].channels[0].project = ${platform_project_name} |
229
- .channelMapping.communicationTypes.webui[0].channels[0].dblabParams.dbname = ${source_postgres_dbname} |
223
+ .channelMapping.communicationTypes.webui[0].credentials.signingSecret = " ${platform_joe_signing_secret}" |
224
+ .channelMapping.communicationTypes.webui[0].channels[0].project = " ${platform_project_name}" |
225
+ .channelMapping.communicationTypes.webui[0].channels[0].dblabParams.dbname = " ${source_postgres_dbname}" |
230
226
del(.channelMapping.communicationTypes.slack) |
231
227
del(.channelMapping.communicationTypes.slackrtm) |
232
228
del(.channelMapping.communicationTypes.slacksm)
@@ -247,20 +243,13 @@ mkdir -p $ci_checker_config_path
247
243
248
244
curl https://gitlab.com/postgres-ai/database-lab/-/raw/${dle_version} /configs/config.example.ci_checker.yml --output $ci_checker_config_path /ci_checker.yml
249
245
250
- sed -ri " s/^(\s*)(debug:.*$)/\1debug: ${dle_debug_mode} /" $ci_checker_config_path /ci_checker.yml
251
- sed -ri " s/^(\s*)( verificationToken: \" secret_token\" .*$)/\1 verificationToken: ${vcs_db_migration_checker_verification_token} /" $ci_checker_config_path /ci_checker.yml
252
- sed -ri " s/^(\s*)( url: \" https\\ :\\ /\\ /dblab.domain.com\" $)/\1 url: \" http\\ :\\ /\\ /dblab_server\\ :2345\" /" $ci_checker_config_path /ci_checker.yml
253
- sed -ri " s/^(\s*)( verificationToken: \" checker_secret_token\" .*$)/\1 verificationToken: ${dle_verification_token} /" $ci_checker_config_path /ci_checker.yml
254
- sed -ri " s/^(\s*)( accessToken:.*$)/\1 accessToken: ${platform_access_token} /" $ci_checker_config_path /ci_checker.yml
255
- sed -ri " s/^(\s*)( token:.*$)/\1 token: ${vcs_github_secret_token} /" $ci_checker_config_path /ci_checker.yml
256
-
257
246
yq e -i '
258
247
.app.debug = ${dle_debug_mode} |
259
- .app.verificationToken = ${vcs_db_migration_checker_verification_token} |
248
+ .app.verificationToken = " ${vcs_db_migration_checker_verification_token}" |
260
249
.dle.url = "http://dblab_server:2345" |
261
- .dle.verificationToken = ${dle_verification_token} |
262
- .platform.accessToken = ${platform_access_token} |
263
- .source.token = ${vcs_github_secret_token}
250
+ .dle.verificationToken = " ${dle_verification_token}" |
251
+ .platform.accessToken = " ${platform_access_token}" |
252
+ .source.token = " ${vcs_github_secret_token}"
264
253
' $ci_checker_config_path /ci_checker.yml
265
254
266
255
sudo docker run \
0 commit comments