Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(services/tikv): migrate to test planner #3587

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/services/tikv/tikv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

name: tikv
description: 'Behavior test for TiKV'

runs:
using: "composite"
steps:
- name: install tiup
shell: bash
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh

- name: start tiup playground
shell: bash
working-directory: fixtures/tikv
run: |
~/.tiup/bin/tiup install tikv:v7.3.0 pd:v7.3.0
~/.tiup/bin/tiup playground v7.3.0 --mode tikv-slim --kv 3 --without-monitor --kv.config tikv.toml --pd.config pd.toml &
while :; do
echo "waiting cluster to be ready"
[[ "$(curl -I http://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
sleep 1
done

- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
OPENDAL_TIKV_ENDPOINTS=http://127.0.0.1:2379
OPENDAL_TIKV_INSECURE=true
EOF
77 changes: 77 additions & 0 deletions .github/services/tikv/tikv_tls/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

name: tikv_with_tls
description: 'Behavior test for TiKV with tls'

runs:
using: "composite"
steps:
- name: Copy TiKV Certificate Files
shell: bash
working-directory: fixtures/tikv
run: |
mkdir -p /tmp/tikv/ssl
cp -r `pwd`/ssl/* /tmp/tikv/ssl

- name: install tiup
shell: bash
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh

- name: Start tikv-tls
Xuanwo marked this conversation as resolved.
Show resolved Hide resolved
shell: bash
working-directory: fixtures/tikv
run: |
# use latest stable version
~/.tiup/bin/tiup install tikv:v7.3.0 pd:v7.3.0

~/.tiup/components/tikv/v7.3.0/tikv-server \
--addr=127.0.0.1:20160 \
--advertise-addr=127.0.0.1:20160 \
--status-addr=127.0.0.1:20180 \
--pd-endpoints=https://127.0.0.1:2379 \
--data-dir=/tmp/tikv/data \
--log-file=/tmp/tikv/tikv.log \
--config=tikv-tls.toml &

~/.tiup/components/pd/v7.3.0/pd-server \
--name=pd1 \
--peer-urls=https://127.0.0.1:2380 \
--advertise-peer-urls=https://127.0.0.1:2380 \
--client-urls=https://127.0.0.1:2379 \
--advertise-client-urls=https://127.0.0.1:2379 \
--initial-cluster=pd1=https://127.0.0.1:2380 \
--data-dir=/tmp/pd1/data \
--log-file=/tmp/pd1/pd.log \
--config=pd-tls.toml &

while :; do
echo "waiting tikv-tls-cluster to be ready"
[[ "$(curl -I --cacert /tmp/tikv/ssl/ca.pem --cert /tmp/tikv/ssl/client.pem --key /tmp/tikv/ssl/client-key.pem https://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
sleep 1
done

- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
OPENDAL_TIKV_ENDPOINTS=https://127.0.0.1:2379
OPENDAL_TIKV_INSECURE=false
OPENDAL_TIKV_CA_PATH=/tmp/tikv/ssl/ca.pem
OPENDAL_TIKV_CERT_PATH=/tmp/tikv/ssl/client.pem
OPENDAL_TIKV_KEY_PATH=/tmp/tikv/ssl/client-key.pem
EOF
137 changes: 0 additions & 137 deletions .github/workflows/service_test_tikv.yml

This file was deleted.