mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
* unifying idk and featurebase: first pass * resolved conflict with master for gitignore & dockerignore * deleted binaries that were accidentally pushed to git * combined gitlab jobs for idk & featurebase * run go fmt for idk * updated ssh env variable, and made docker password variable in gitlab env variables * fixed typo assigning variable name * trying to fix docker login error * trying a different solution for docker password * pass registry * fixed docker login * updated paths for idk * exclude idk tests from featurebase test run * fix vendor error * update certificates * grpc needs to be in version 1.38 genproto, which is imported by big query updates the grpc version to 1.47.0 grpc 1.47.0 causes etcd to deadlock when calling etcd.Close() the fix is to have a replace in go.mod to specify a specific grpc version * run go mod tidy * go mod * run go mod tidy * exclude bigquery since it is causing issues and undo grpc replace in go.mod * fix grpc version * fix formatting error * update formatting * attempt to fix formatting * update path for code coverage * update to use current branch binaries, not master * fix for building idk - path updates * udpate path for binaries * update job dependecies * update docker idk tests to use the current branch registry * update stages for jobs * updated job dependencies * not allow idk s3 dump to fail since it is a dependency for integration tests * update dependecy for idk tests * update paths for idk build and code coverage * download featurebase binary from s3 * pass branch name to all setup scripts * change to current branch instead of master * updated sonarcloud * sonarcloud fix and branch name fix * trying to speed up pipeline run time * update stage * branch name fix + sonar cloud * sonarcloud
89 lines
2.5 KiB
Bash
Executable file
89 lines
2.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# To run script: ./setupSamsungGauntlet.sh <BRANCH_NAME>
|
|
export TF_IN_AUTOMATION=1
|
|
|
|
BRANCH_NAME=$1
|
|
|
|
echo "Running tests for branch ${BRANCH_NAME}"
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
source $SCRIPT_DIR/utilCluster.sh
|
|
|
|
pushd ./qa/tf/gauntlet/samsung
|
|
echo "Running terraform init..."
|
|
terraform init -input=false
|
|
echo "Running terraform apply..."
|
|
terraform apply -input=false -auto-approve
|
|
terraform output -json > outputs.json
|
|
popd
|
|
|
|
# path for ebs device
|
|
EBS_DEVICE_NAME=/dev/nvme1n1
|
|
|
|
# featurebase architecture
|
|
FB_BINARY=featurebase_linux_arm64
|
|
|
|
# get the first ingest host
|
|
INGESTNODE0=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.ingest_ips][0]["value"][0]')
|
|
echo "using INGESTNODE0 ${INGESTNODE0}"
|
|
|
|
# get the first data host
|
|
DATANODE0=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.data_node_ips][0]["value"][0]')
|
|
echo "using DATANODE0 ${DATANODE0}"
|
|
|
|
|
|
DEPLOYED_CLUSTER_PREFIX=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.cluster_prefix][0]["value"]')
|
|
echo "Using DEPLOYED_CLUSTER_PREFIX: ${DEPLOYED_CLUSTER_PREFIX}"
|
|
|
|
DEPLOYED_CLUSTER_REPLICA_COUNT=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.fb_cluster_replica_count][0]["value"]')
|
|
echo "Using DEPLOYED_CLUSTER_REPLICA_COUNT: ${DEPLOYED_CLUSTDEPLOYED_CLUSTER_REPLICA_COUNTER_PREFIX}"
|
|
|
|
DEPLOYED_DATA_IPS=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.data_node_ips][0]["value"][]')
|
|
echo "DEPLOYED_DATA_IPS: {"
|
|
echo "${DEPLOYED_DATA_IPS}"
|
|
echo "}"
|
|
|
|
DEPLOYED_DATA_IPS_LEN=`echo "$DEPLOYED_DATA_IPS" | wc -l`
|
|
|
|
DEPLOYED_INGEST_IPS=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.ingest_ips][0]["value"][]')
|
|
echo "DEPLOYED_INGEST_IPS: {"
|
|
echo "${DEPLOYED_INGEST_IPS}"
|
|
echo "}"
|
|
|
|
DEPLOYED_INGEST_IPS_LEN=`echo "$DEPLOYED_INGEST_IPS" | wc -l`
|
|
|
|
#wait until we can connect to one of the hosts
|
|
for i in {0..24}
|
|
do
|
|
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd"
|
|
if [ $? -eq 0 ]
|
|
then
|
|
echo "Cluster is up after ${i} tries."
|
|
break
|
|
fi
|
|
sleep 10
|
|
done
|
|
|
|
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd"
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "Unable to connect to cluster - giving up"
|
|
exit 1
|
|
fi
|
|
|
|
setupClusterNodes $BRANCH_NAME
|
|
|
|
# verify featurebase running
|
|
echo "Verifying featurebase cluster running..."
|
|
curl -s http://${DATANODE0}:10101/status
|
|
if (( $? != 0 ))
|
|
then
|
|
echo "Featurebase cluster not running"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Cluster running."
|
|
|
|
|
|
|