Skip to content

Commit

Permalink
Merge branch 'bz2/prepare-toolchain-update' into xxchan/bump
Browse files Browse the repository at this point in the history
  • Loading branch information
BugenZhao committed Oct 23, 2022
2 parents 2c5bc30 + db7e33f commit 6857085
Show file tree
Hide file tree
Showing 308 changed files with 14,078 additions and 6,437 deletions.
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ fo = "fo"
FPR = "FPR"
ot = "ot"
inout = "inout"
numer = "numer"

[files]
extend-exclude = ["src/tests/regress/data", "e2e_test", "**/*.svg", "scripts"]
71 changes: 71 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ inherits = "dev"
incremental = false
[profile.ci-dev.package."*"] # external dependencies
opt-level = 1
[profile.ci-dev.package."tokio"]
opt-level = 3
[profile.ci-dev.package."async_stack_trace"]
opt-level = 3
[profile.ci-dev.package."indextree"]
opt-level = 3

# The profile used for deterministic simulation tests in CI.
# The simulator can only run single-threaded, so optimization is required to make the running time
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ There are two ways to install RisingWave: use a pre-built package or compile fro

```shell
# Download the pre-built binary
wget https://github.com/risingwavelabs/risingwave/releases/download/v0.1.11/risingwave-v0.1.11-x86_64-unknown-linux.tar.gz
wget https://github.com/risingwavelabs/risingwave/releases/download/v0.1.13/risingwave-v0.1.13-x86_64-unknown-linux.tar.gz
# Unzip the binary
tar xvf risingwave-v0.1.11-x86_64-unknown-linux.tar.gz
tar xvf risingwave-v0.1.13-x86_64-unknown-linux.tar.gz
# Start RisingWave in single-binary playground mode
./risingwave playground
```
Expand All @@ -31,7 +31,7 @@ tar xvf risingwave-v0.1.11-x86_64-unknown-linux.tar.gz

```shell
# Start RisingWave in single-binary playground mode
docker run -it --pull=always -p 4566:4566 -p 5691:5691 ghcr.io/risingwavelabs/risingwave:v0.1.11 playground
docker run -it --pull=always -p 4566:4566 -p 5691:5691 ghcr.io/risingwavelabs/risingwave:v0.1.13 playground
```

**Compile from Source with [RiseDev](docs/developer-guide.md#set-up-the-development-environment) (Linux and macOS)**
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG RUST_TOOLCHAIN

RUN apt-get update -yy && \
DEBIAN_FRONTEND=noninteractive apt-get -y install make build-essential cmake protobuf-compiler curl parallel \
openssl libssl-dev libsasl2-dev libcurl4-openssl-dev pkg-config bash openjdk-11-jdk wget unzip git tmux lld postgresql-client -yy \
openssl libssl-dev libsasl2-dev libcurl4-openssl-dev pkg-config bash openjdk-11-jdk wget unzip git tmux lld postgresql-client kafkacat -yy \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/

SHELL ["/bin/bash", "-c"]
Expand Down
2 changes: 1 addition & 1 deletion ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ services:
- ..:/risingwave

benchmark-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20221007
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20221020
depends_on:
- kafka
volumes:
Expand Down
90 changes: 66 additions & 24 deletions ci/scripts/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,50 @@
# Exits as soon as any line fails.
set -euo pipefail

while getopts 's:' opt; do
case ${opt} in
s )
SKU=$OPTARG
;;
\? )
echo "Invalid Option: -$OPTARG" 1>&2
exit 1
;;
: )
echo "Invalid option: $OPTARG requires an argument" 1>&2
;;
esac
done
shift $((OPTIND -1))
# pollingScript message try_times interval script_string
function pollingScript() {
message=$1
try_times=$2
interval=$3
script_string=$4
while :; do
echo "polling: $message"
if [ "$try_times" == 0 ]; then
echo "❌ ERROR: polling timeout"
exit 1
fi
if eval "$script_string"; then
echo "✅ Instance Ready"
break
fi
sleep "$interval"
try_times=$((try_times - 1))
done
}

# pollingScript status try_times
function pollingTenantStatus() {
status=$1
try_times=$2
interval=10
pollingScript "tenant status until it is $status" "$try_times" "$interval" \
"rwc tenant get -name $TENANT_NAME | grep 'Status: $status'"
}

function polling() {
set +e
try_times=30
try_times=10
while :; do
if [ $try_times == 0 ]; then
echo "❌ ERROR: Polling Timeout"
exit 1
fi
psql "$@" -c '\q'
if [ $? == 0 ]; then
echo "Instance Ready"
echo "Endpoint Available"
break
fi
sleep 10
sleep 5
try_times=$((try_times - 1))
done
set -euo pipefail
Expand All @@ -45,38 +59,63 @@ function cleanup {

trap cleanup EXIT

DB_USER=dbuser
DB_PWD=dbpwd

if [[ -z "${RISINGWAVE_IMAGE_TAG+x}" ]]; then
IMAGE_TAG="latest"
else
IMAGE_TAG="${RISINGWAVE_IMAGE_TAG}"
fi

if [ -z "${BENCH_SKU+x}" ] || [ "${BENCH_SKU}" == "MultiNodeBench" ]; then
SKU="multinode"
BENCH_SKU="MultiNodeBench"
elif [ "${BENCH_SKU}" == "SingleNodeBench" ]; then
SKU="singlenode"
else
exit 1
fi

date=$(date '+%Y%m%d-%H%M%S')
TENANT_NAME="${SKU}-${date}"

echo "--- Echo Info"
echo "BENCH-SKU: ${BENCH_SKU}"
echo "Tenant-Name: ${TENANT_NAME}"
echo "Host-Ip: ${HOST_IP}"
echo "IMAGE-TAG: ${IMAGE_TAG}"

echo "--- Download Necessary Tools"
apt-get -y install golang-go librdkafka-dev
curl -L -o ./rwc https://rwc-cli-internal-release.s3.ap-southeast-1.amazonaws.com/bench-tmp/rwc && chmod 755 ./rwc && mv rwc /usr/local/bin
apt-get -y install golang-go librdkafka-dev python3-pip
curl -L https://rwc-cli-internal-release.s3.ap-southeast-1.amazonaws.com/download.sh | bash && mv rwc /usr/local/bin

echo "--- RWC Config and Login"
rwc config -region bench-ap-southeast-1
rwc config context -accounturl https://rls-apse1-acc.risingwave-cloud.xyz/api/v1
rwc config -region ap-southeast-1
rwc config ls
rwc login -account benchmark -password "$BENCH_TOKEN"

echo "--- RWC Create a Risingwave Instance"
rwc tenant create -name ${TENANT_NAME} -sku ${SKU} -imagetag ${IMAGE_TAG}
rwc tenant create -name ${TENANT_NAME} -sku ${BENCH_SKU} -imagetag ${IMAGE_TAG}

sleep 2
echo "--- Wait Risingwave Instance Ready"
pollingTenantStatus Running 30

echo "--- Wait Risingwave Instance Ready "
echo "--- Get Risingwave Instance endpoint"
endpoint=$(rwc tenant endpoint -name ${TENANT_NAME})

echo "--- Create DB User"
rwc tenant create-user -n ${TENANT_NAME} -u ${DB_USER} -p ${DB_PWD}

echo "--- Test endpoint"
endpoint=${endpoint//"<user>"/"$DB_USER"}
endpoint=${endpoint//"<password>"/"$DB_PWD"}
echo ${endpoint}
polling ${endpoint}

echo "--- Namespace: ${endpoint#*%3D}"

echo "--- Generate Tpch-Bench Args"
mkdir ~/risingwave-deploy
echo "--frontend-url ${endpoint}" > ~/risingwave-deploy/tpch-bench-args-frontend
Expand All @@ -91,3 +130,6 @@ echo "--- Run Tpch-Bench"
cd tpch-bench/
./scripts/build.sh
./scripts/launch_risedev_bench.sh

echo "--- Waiting For Risingwave to Consume Data"
sleep 300
2 changes: 0 additions & 2 deletions ci/scripts/e2e-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ cargo make pre-start-dev
cargo make link-all-in-one-binaries

echo "--- e2e test w/ Rust frontend - source with kafka"
apt update
apt install -y kafkacat
cargo make clean-data
cargo make ci-start ci-kafka
./scripts/source/prepare_ci_kafka.sh
Expand Down
5 changes: 5 additions & 0 deletions ci/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ dnf install -y 'dnf-command(config-manager)'
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf install -y gh

echo "--- Install lld"
yum install -y centos-release-scl-rh
yum install -y llvm-toolset-7.0-lld
source /opt/rh/llvm-toolset-7.0/enable

echo "--- Release create"
gh release create "${BUILDKITE_TAG}" --generate-notes -d -p

Expand Down

0 comments on commit 6857085

Please sign in to comment.