export FDB_COORDINATOR_ADDRESSES=( "<coordinator ip address 1>""<coordinator ip address 2>""<coordinator ip address 3>" ) export PASSWD=""
${WORKING_DIR}/foundationdb/bin/fdbcli -C ${WORKING_DIR}/fdb_runtime/config/fdb.cluster --exec"configure new single ssd" ADD_COORDINATORS_CMD="coordinators ${FDB_COORDINATOR_ADDRESSES[@]/%/:4500}" ${WORKING_DIR}/foundationdb/bin/fdbcli -C ${WORKING_DIR}/fdb_runtime/config/fdb.cluster --exec"${ADD_COORDINATORS_CMD}"
# Then copy file `${WORKING_DIR}/fdb_runtime/config/fdb.cluster` in first node to the other nodes, and then executes `systemctl restart fdb.service` in all nodes. for FDB_COORDINATOR_ADDRESS in${FDB_COORDINATOR_ADDRESSES[@]} do if [ "${CUR_IP_ADDRESS}" != "${FDB_COORDINATOR_ADDRESS}" ]; then sshpass -p "${PASSWD}" scp -o StrictHostKeyChecking=no ${WORKING_DIR}/fdb_runtime/config/fdb.cluster root@${FDB_COORDINATOR_ADDRESS}:${WORKING_DIR}/fdb_runtime/config/fdb.cluster fi done
if [ ! -f ${HADOOP_DIR}/etc/hadoop/hadoop-env.sh.bak ]; then \cp -vf ${HADOOP_DIR}/etc/hadoop/hadoop-env.sh ${HADOOP_DIR}/etc/hadoop/hadoop-env.sh.bak fi
JAVA_HOME_PATH=$(readlink -f $(which java)) JAVA_HOME_PATH=${JAVA_HOME_PATH%/jre/bin/java} sed -i -E "s|^.*export JAVA_HOME=.*$|export JAVA_HOME=${JAVA_HOME_PATH}|g"${HADOOP_DIR}/etc/hadoop/hadoop-env.sh sed -i -E "s|^.*export HADOOP_HOME=.*$|export HADOOP_HOME=${WORKING_DIR}/hdfs/hadoop-3.3.6|g"${HADOOP_DIR}/etc/hadoop/hadoop-env.sh sed -i -E "s|^.*export HADOOP_LOG_DIR=.*$|export HADOOP_LOG_DIR=\${HADOOP_HOME}/logs|g"${HADOOP_DIR}/etc/hadoop/hadoop-env.sh
cat > ${HADOOP_DIR}/etc/hadoop/core-site.xml << EOF <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>fs.defaultFS</name> <value>hdfs://${HDFS_NAME_NODE_ADDRESS}:12000</value> </property> </configuration> EOF
cat > ${HADOOP_DIR}/etc/hadoop/hdfs-site.xml << EOF <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file://${WORKING_DIR}/hdfs/root_data_path_for_namenode</value> </property> <property> <name>dfs.hosts</name> <value>${WORKING_DIR}/hdfs/datanodes_list.txt</value> </property> <property> <name>dfs.permissions</name> <value>false</value> </property> </configuration> EOF
cat > ${HADOOP_DIR}/etc/hadoop/hdfs-site.xml << EOF <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>dfs.data.dir</name> <value>file://${WORKING_DIR}/hdfs/root_data_path_for_datanode</value> </property> <property> <name>dfs.permissions</name> <value>false</value> </property> </configuration> EOF
The Foundation client package are tight coupled to version of FoundationDB server. So we need to choose the client package with version that match the version of FoundationDB server.
The byconity-resource-manager, byconity-daemon-manger and byconity-tso are light weight service so it could be install in shared machine with other package.
But for byconity-server, byconity-worker, byconity-worker-write we should install them in separate machines. These components are incompatible with each other for they all locking the file /var/lib/byconity-server/status exclusively.
export BYCONITY_PANEL_NODE_ADDRESS="<panel node ip address>" export BYCONITY_PANEL_NODE_HOSTNAME="<panel node hostname>" export DNS_PAIRS=( "<panel node ip address>:<panel node hostname>""<worker node ip address>:<worker node hostname>""<worker-wirte node ip address>:<worker-wirte node hostname>" ) export CUR_IP_ADDRESS="<current node ip address>"
if [ ! -f /etc/byconity-server/cnch_config.xml.bak ]; then \cp -vf /etc/byconity-server/cnch_config.xml /etc/byconity-server/cnch_config.xml.bak fi
# Set host and hostname of server, tso, daemon_manager, resource_manager to the panel node. sed -i -E "s|<host>.*</host>|<host>${BYCONITY_PANEL_NODE_ADDRESS}</host>|g" /etc/byconity-server/cnch_config.xml sed -i -E "s|<hostname>.*</hostname>|<hostname>${BYCONITY_PANEL_NODE_HOSTNAME}</hostname>|g" /etc/byconity-server/cnch_config.xml
# Set hdfs sed -i -E "s|<hdfs_nnproxy>.*</hdfs_nnproxy>|<hdfs_nnproxy>hdfs://${HDFS_NAME_NODE_ADDRESS}:12000</hdfs_nnproxy>|g" /etc/byconity-server/cnch_config.xml
# Set dns config. This is optional to make sure that dns works well if you have changed the node name manually. set +H for DNS_PAIR in${DNS_PAIRS[@]} do IP_ADDRESS=${DNS_PAIR%:*} HOSTNAME=${DNS_PAIR#*:} if grep -q "${IP_ADDRESS}" /etc/hosts; then if ! grep -q "${IP_ADDRESS}.*${HOSTNAME}" /etc/hosts; then sed -i -E "/${IP_ADDRESS}.*${HOSTNAME}/!{0,/${IP_ADDRESS}/s|${IP_ADDRESS}.*|& ${HOSTNAME}|}" /etc/hosts fi else echo"${IP_ADDRESS}${HOSTNAME}" >> /etc/hosts fi done set -H
For panel node: Install tso, resource-manager, daemon-manager, server.