- Capture the changes that we missed (somehow) during the "git merge"
done by commits9544379cd
and72e06369a
. NOTE: It is not clear how we missed these changes while doing the above "git merge" commits. Changes: cmake/InstallLayout.cmake: Capture the change made to this file by commit95d33cb363
. packaging/docker/build-images.sh: Capture the change made to this file by commit8aab68303b
. packaging/docker/fdb.bash: Capture the changes made to this file by commits504f08a102
andf24adc7b6a
.
This commit is contained in:
parent
7db86e7518
commit
a82a20e11b
|
@ -176,6 +176,12 @@ install(DIRECTORY "${script_dir}/clients/usr/lib/cmake"
|
|||
DESTINATION usr/lib
|
||||
COMPONENT clients-versioned)
|
||||
|
||||
################################################################################
|
||||
# Move Docker Setup
|
||||
################################################################################
|
||||
|
||||
file(COPY "${PROJECT_SOURCE_DIR}/packaging/docker" DESTINATION "${PROJECT_BINARY_DIR}/packages/")
|
||||
|
||||
################################################################################
|
||||
# General CPack configuration
|
||||
################################################################################
|
||||
|
|
|
@ -165,6 +165,9 @@ function build_and_push_images(){
|
|||
for image in "${image_list[@]}"; do
|
||||
logg "BUILDING ${image}"
|
||||
image_tag="${tag_base}${image}:${fdb_version}"
|
||||
if [ -n "${tag_postfix+x}" ]; then
|
||||
image_tag="${tag_base}${image}:${fdb_version}-${tag_postfix}"
|
||||
fi
|
||||
if [ "${image}" == "foundationdb-kubernetes-sidecar" ]; then
|
||||
image_tag="${image_tag}-1"
|
||||
fi
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#! /bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# fdb.bash
|
||||
#
|
||||
# This source file is part of the FoundationDB open source project
|
||||
#
|
||||
# Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
|
||||
# Copyright 2013-2021 Apple Inc. and the FoundationDB project authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -20,10 +20,49 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
source /var/fdb/scripts/create_server_environment.bash
|
||||
function create_cluster_file() {
|
||||
FDB_CLUSTER_FILE=${FDB_CLUSTER_FILE:-/etc/foundationdb/fdb.cluster}
|
||||
mkdir -p "$(dirname $FDB_CLUSTER_FILE)"
|
||||
|
||||
if [[ -n "$FDB_CLUSTER_FILE_CONTENTS" ]]; then
|
||||
echo "$FDB_CLUSTER_FILE_CONTENTS" > "$FDB_CLUSTER_FILE"
|
||||
elif [[ -n $FDB_COORDINATOR ]]; then
|
||||
coordinator_ip=$(dig +short "$FDB_COORDINATOR")
|
||||
if [[ -z "$coordinator_ip" ]]; then
|
||||
echo "Failed to look up coordinator address for $FDB_COORDINATOR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
coordinator_port=${FDB_COORDINATOR_PORT:-4500}
|
||||
echo "docker:docker@$coordinator_ip:$coordinator_port" > "$FDB_CLUSTER_FILE"
|
||||
else
|
||||
echo "FDB_COORDINATOR environment variable not defined" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function create_server_environment() {
|
||||
env_file=/var/fdb/.fdbenv
|
||||
|
||||
if [[ "$FDB_NETWORKING_MODE" == "host" ]]; then
|
||||
public_ip=127.0.0.1
|
||||
elif [[ "$FDB_NETWORKING_MODE" == "container" ]]; then
|
||||
public_ip=$(hostname -i | awk '{print $1}')
|
||||
else
|
||||
echo "Unknown FDB Networking mode \"$FDB_NETWORKING_MODE\"" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "export PUBLIC_IP=$public_ip" > $env_file
|
||||
if [[ -z $FDB_COORDINATOR && -z "$FDB_CLUSTER_FILE_CONTENTS" ]]; then
|
||||
FDB_CLUSTER_FILE_CONTENTS="docker:docker@$public_ip:$FDB_PORT"
|
||||
fi
|
||||
|
||||
create_cluster_file
|
||||
}
|
||||
|
||||
create_server_environment
|
||||
source /var/fdb/.fdbenv
|
||||
echo "Starting FDB server on $PUBLIC_IP:$FDB_PORT"
|
||||
fdbserver --listen_address 0.0.0.0:$FDB_PORT --public_address $PUBLIC_IP:$FDB_PORT \
|
||||
--datadir /var/fdb/data --logdir /var/fdb/logs \
|
||||
--locality_zoneid="$(hostname)" --locality_machineid="$(hostname)" --class $FDB_PROCESS_CLASS
|
||||
fdbserver --listen-address 0.0.0.0:"$FDB_PORT" --public-address "$PUBLIC_IP:$FDB_PORT" \
|
||||
--datadir /var/fdb/data --logdir /var/fdb/logs \
|
||||
--locality-zoneid="$(hostname)" --locality-machineid="$(hostname)" --class "$FDB_PROCESS_CLASS"
|
||||
|
|
Loading…
Reference in New Issue