-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Issue160/ClientSetInfo
- Loading branch information
Showing
52 changed files
with
693 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
REDIS_CLUSTER=127.0.0.1:16379 | ||
NUM_REDIS_CLUSTER_NODES=6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
version: "3.8" | ||
services: | ||
|
||
redis-stack-7.2.0-RC3: | ||
image: redis/redis-stack-server:7.2.0-RC3 | ||
ports: ["6379:6379"] | ||
|
||
redis-stack-6.2.6: | ||
image: redis/redis-stack-server:6.2.6-v9 | ||
ports: ["6379:6379"] | ||
|
||
redis-stack-edge: | ||
image: redis/redis-stack-server:edge | ||
ports: ["6379:6379"] | ||
|
||
redis-stack-cluster: | ||
container_name: redis-cluster | ||
build: | ||
context: . | ||
dockerfile: dockers/Dockerfile.cluster | ||
ports: | ||
- 16379:16379 | ||
- 16380:16380 | ||
- 16381:16381 | ||
- 16382:16382 | ||
- 16383:16383 | ||
- 16384:16384 | ||
volumes: | ||
- "./dockers/cluster.redis.conf:/redis.conf:ro" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM redis/redis-stack-server:edge as rss | ||
|
||
COPY dockers/create_cluster.sh /create_cluster.sh | ||
RUN ls -R /opt/redis-stack | ||
RUN chmod a+x /create_cluster.sh | ||
|
||
ENTRYPOINT [ "/create_cluster.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
protected-mode no | ||
enable-debug-command yes | ||
loadmodule /opt/redis-stack/lib/redisearch.so | ||
loadmodule /opt/redis-stack/lib/redisgraph.so | ||
loadmodule /opt/redis-stack/lib/redistimeseries.so | ||
loadmodule /opt/redis-stack/lib/rejson.so | ||
loadmodule /opt/redis-stack/lib/redisbloom.so | ||
loadmodule /opt/redis-stack/lib/redisgears.so v8-plugin-path /opt/redis-stack/lib/libredisgears_v8_plugin.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#! /bin/bash | ||
|
||
mkdir -p /nodes | ||
touch /nodes/nodemap | ||
if [ -z ${START_PORT} ]; then | ||
START_PORT=16379 | ||
fi | ||
if [ -z ${END_PORT} ]; then | ||
END_PORT=16384 | ||
fi | ||
if [ ! -z "$3" ]; then | ||
START_PORT=$2 | ||
START_PORT=$3 | ||
fi | ||
echo "STARTING: ${START_PORT}" | ||
echo "ENDING: ${END_PORT}" | ||
|
||
for PORT in `seq ${START_PORT} ${END_PORT}`; do | ||
mkdir -p /nodes/$PORT | ||
if [[ -e /redis.conf ]]; then | ||
cp /redis.conf /nodes/$PORT/redis.conf | ||
else | ||
touch /nodes/$PORT/redis.conf | ||
fi | ||
cat << EOF >> /nodes/$PORT/redis.conf | ||
port ${PORT} | ||
cluster-enabled yes | ||
daemonize yes | ||
logfile /redis.log | ||
dir /nodes/$PORT | ||
EOF | ||
|
||
set -x | ||
/opt/redis-stack/bin/redis-server /nodes/$PORT/redis.conf | ||
sleep 1 | ||
if [ $? -ne 0 ]; then | ||
echo "Redis failed to start, exiting." | ||
continue | ||
fi | ||
echo 127.0.0.1:$PORT >> /nodes/nodemap | ||
done | ||
if [ -z "${REDIS_PASSWORD}" ]; then | ||
echo yes | /opt/redis-stack/bin/redis-cli --cluster create `seq -f 127.0.0.1:%g ${START_PORT} ${END_PORT}` --cluster-replicas 1 | ||
else | ||
echo yes | opt/redis-stack/bin/redis-cli -a ${REDIS_PASSWORD} --cluster create `seq -f 127.0.0.1:%g ${START_PORT} ${END_PORT}` --cluster-replicas 1 | ||
fi | ||
tail -f /redis.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
REDIS=localhost:6379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build and Test | ||
on: | ||
workflow_call: | ||
inputs: | ||
|
||
redis_stack_type: | ||
required: true | ||
type: string | ||
|
||
dotnet_version: | ||
required: true | ||
type: string | ||
|
||
clr_version: | ||
required: true | ||
type: string | ||
|
||
dotenv_file: | ||
required: true | ||
type: string | ||
jobs: | ||
|
||
build_and_test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
USER_NAME: ${{ secrets.USER_NAME }} | ||
PASSWORD: ${{ secrets.PASSWORD }} | ||
ENDPOINT: ${{ secrets.ENDPOINT }} | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: .NET Core 6 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: '6.0.x' | ||
|
||
- name: .NET Core 7 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: '7.0.x' | ||
|
||
- name: run redis-stack-server docker | ||
working-directory: .github | ||
run: docker-compose up -d redis-stack-${{inputs.redis_stack_type}} | ||
|
||
- name: set variables in dotenv | ||
uses: c-py/action-dotenv-to-setenv@v2 | ||
with: | ||
env-file: ${{inputs.dotenv_file}} | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true | ||
- name: Test | ||
run: | | ||
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_ca.pem | ||
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user.crt | ||
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user_private.key | ||
ls -R | ||
dotnet test -f ${{inputs.clr_version}} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | ||
- name: Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
verbose: true | ||
- name: Build | ||
run: dotnet pack -c Release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.