Skip to content

Commit 8af24f2

Browse files
committed
Merge remote-tracking branch 'origin/v20' into CLIENT-2761-err-msg-if-port-not-integer
2 parents 0875bdd + f8bb0d3 commit 8af24f2

390 files changed

Lines changed: 20514 additions & 18829 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/get-artifact-for-stage-tests/action.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/actions/run-ee-server/action.yml

Lines changed: 0 additions & 139 deletions
This file was deleted.

.github/actions/setup-docker-on-macos/action.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: 'Run server and configure tests'
2+
description: 'Run server in a Docker container. Also configure python client integration tests'
3+
# NOTE: do not share this server container with others
4+
# since it's using the default admin / admin credentials
5+
outputs:
6+
container-network:
7+
description: Forwards the container's network name from setup-as-server
8+
value: ${{ steps.setup-as-server.outputs.network-name }}
9+
container-name:
10+
description: Forwards the container name from setup-as-server
11+
value: ${{ steps.setup-as-server.outputs.container-names }}
12+
inputs:
13+
# All inputs in composite actions are strings
14+
oidc-provider-name:
15+
description: For pulling server images from JFrog
16+
required: true
17+
oidc-audience:
18+
description: For pulling server images from JFrog
19+
required: true
20+
server-edition:
21+
required: true
22+
description: 'community or enterprise'
23+
features-content:
24+
description: Only used if server edition is enterprise. For enabling strong consistency
25+
required: true
26+
server-tag:
27+
required: true
28+
description: Specify Docker tag
29+
where-is-client-connecting-from:
30+
required: false
31+
description: 'docker-host, separate-docker-container, "remote-connection" via DOCKER_HOST'
32+
default: 'docker-host'
33+
34+
runs:
35+
using: "composite"
36+
steps:
37+
# Start up server
38+
- uses: aerospike/shared-workflows/.github/actions/setup-aerospike-server@bd168dedaa4fc0b17a560541779d815540eded2d # v3.7.0
39+
id: setup-as-server
40+
with:
41+
server-container-repo: database-docker-virtual/aerospike-server${{ inputs.server-edition == 'enterprise' && '-enterprise' || '' }}
42+
enable-security: ${{ inputs.server-edition == 'enterprise' }}
43+
enable-tls: ${{ inputs.server-edition == 'enterprise' }}
44+
enable-strong-consistency: ${{ inputs.server-edition == 'enterprise' }}
45+
features-content: ${{ inputs.features-content }}
46+
num-nodes: 1
47+
oidc-provider: ${{ inputs.oidc-provider-name }}
48+
oidc-audience: ${{ inputs.oidc-audience }}
49+
server-tag: ${{ inputs.server-tag }}
50+
tools-tag: 13.0.2_1
51+
# This way doesn't work, so pass a custom server config for now with this setting enabled
52+
# Problem is the shared action is overriding the entrypoint script that parses this env var
53+
# env-vars: DEFAULT_TTL=2592000;
54+
config-file: ./.github/workflows/aerospike${{ inputs.server-edition == 'community' && '-ce' || '' }}.conf
55+
enable-bash-trace-mode: "true"
56+
57+
- name: Get config.conf
58+
run: |
59+
CONFIG_CONF=config.conf
60+
echo "CONFIG_CONF=$CONFIG_CONF" >> "$GITHUB_ENV"
61+
cp config.conf.template "$CONFIG_CONF"
62+
working-directory: test
63+
shell: bash -ex {0}
64+
65+
- if: ${{ inputs.server-edition == 'enterprise' }}
66+
run: |
67+
call_from_tools_container() {
68+
# See comment in run-ee-server.bash's call_from_tools_container() for why we surround $@ with double quotes
69+
docker run --rm --network host aerospike/aerospike-tools "$@"
70+
}
71+
72+
SUPERUSER_NAME_AND_PASSWORD="superuser"
73+
call_from_tools_container asadm -U admin -P admin --enable --execute "manage acl \
74+
create user "$SUPERUSER_NAME_AND_PASSWORD" password "$SUPERUSER_NAME_AND_PASSWORD" \
75+
roles read-write-udf, sys-admin, user-admin, data-admin"
76+
77+
# Install crudini to manipulate config.conf
78+
pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt"
79+
80+
# Disable community edition connection
81+
crudini --existing=param --set "$CONFIG_CONF" community-edition hosts ''
82+
crudini --existing=param --set "$CONFIG_CONF" enterprise-edition user "$SUPERUSER_NAME_AND_PASSWORD"
83+
crudini --existing=param --set "$CONFIG_CONF" enterprise-edition password "$SUPERUSER_NAME_AND_PASSWORD"
84+
crudini --set "$CONFIG_CONF" tls enable true
85+
86+
tls_cert_dir=${{ steps.setup-as-server.outputs.tls-cert-dir }}
87+
if [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "separate-docker-container" ]]; then
88+
tls_cert_dir="/host${tls_cert_dir}"
89+
fi
90+
91+
crudini --set "$CONFIG_CONF" tls cafile $tls_cert_dir/ca.crt
92+
crudini --set "$CONFIG_CONF" tls keyfile $tls_cert_dir/client.key
93+
crudini --set "$CONFIG_CONF" tls certfile $tls_cert_dir/client.crt
94+
95+
if [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "docker-host" ]]; then
96+
SERVER_IP=127.0.0.1
97+
elif [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "remote-connection" ]]; then
98+
# Set IP address to remote machine running the Docker daemon
99+
SERVER_IP=${DOCKER_HOST/tcp:\/\//}
100+
SERVER_IP=${SERVER_IP/:2375/}
101+
elif [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "separate-docker-container" ]]; then
102+
SERVER_IP="$SERVER_CONTAINER_NAME"
103+
else
104+
# Invalid input
105+
exit 1
106+
fi
107+
108+
# Set EE server's IP address and TLS name for test config
109+
cluster_name=$(call_from_tools_container asinfo -U admin -P admin -v "get-config:context=service" -l | grep -i cluster-name | cut -d = -f 2)
110+
crudini --existing=param --set "$CONFIG_CONF" enterprise-edition hosts "${SERVER_IP}:${TLS_PORT}|${cluster_name}"
111+
working-directory: test
112+
shell: bash -ex {0}
113+
env:
114+
WHERE_IS_CLIENT_CONNECTING_FROM: "${{ inputs.where-is-client-connecting-from }}"
115+
TLS_PORT: ${{ steps.setup-as-server.outputs.tls-service-ports }}
116+
SERVER_CONTAINER_NAME: ${{ steps.setup-as-server.outputs.container-names }}

.github/actions/update-version/action.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/actions/wait-for-ce-server-to-start/action.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)