-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HDDS-7990. Add acceptance test for HA Proxy with secure Ozone S3 Gate…
…way (#7562)
- Loading branch information
Showing
4 changed files
with
109 additions
and
3 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
hadoop-ozone/dist/src/main/compose/common/s3-haproxy-secure.yaml
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,57 @@ | ||
# 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. | ||
|
||
x-s3-worker: | ||
&s3-worker | ||
image: ${OZONE_RUNNER_IMAGE}:${OZONE_RUNNER_VERSION} | ||
volumes: | ||
- ../..:/opt/hadoop | ||
- ../_keytabs:/etc/security/keytabs | ||
- ./krb5.conf:/etc/krb5.conf | ||
env_file: | ||
- docker-config | ||
command: ["ozone","s3g", "-Dozone.om.transport.class=${OZONE_S3_OM_TRANSPORT:-org.apache.hadoop.ozone.om.protocolPB.GrpcOmTransportFactory}"] | ||
|
||
services: | ||
s3g: | ||
image: haproxy:lts-alpine | ||
hostname: s3g | ||
dns_search: . | ||
volumes: | ||
- ../..:/opt/hadoop | ||
- ../common/s3-haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg | ||
ports: | ||
- 9878:9878 | ||
command: ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"] | ||
s3g1: | ||
<<: *s3-worker | ||
hostname: s3g1 | ||
dns_search: . | ||
ports: | ||
- 9879:9878 | ||
s3g2: | ||
|
||
<<: *s3-worker | ||
hostname: s3g2 | ||
dns_search: . | ||
ports: | ||
- 9880:9878 | ||
s3g3: | ||
<<: *s3-worker | ||
hostname: s3g3 | ||
dns_search: . | ||
ports: | ||
- 9881:9878 |
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
48 changes: 48 additions & 0 deletions
48
hadoop-ozone/dist/src/main/compose/ozonesecure/test-haproxy-s3g.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,48 @@ | ||
#!/usr/bin/env bash | ||
# 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. | ||
|
||
#suite:secure | ||
|
||
COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
export COMPOSE_DIR | ||
|
||
# shellcheck source=/dev/null | ||
source "$COMPOSE_DIR/../testlib.sh" | ||
|
||
export SECURITY_ENABLED=true | ||
export COMPOSE_FILE=docker-compose.yaml:../common/s3-haproxy-secure.yaml | ||
|
||
: ${OZONE_BUCKET_KEY_NAME:=key1} | ||
|
||
start_docker_env | ||
|
||
execute_command_in_container kms hadoop key create ${OZONE_BUCKET_KEY_NAME} | ||
|
||
execute_robot_test scm kinit.robot | ||
|
||
execute_robot_test scm security | ||
|
||
## Exclude virtual-host tests. This is tested separately as it requires additional config. | ||
exclude="--exclude virtual-host" | ||
for bucket in encrypted; do | ||
execute_robot_test scm -v BUCKET:${bucket} -N s3-${bucket} ${exclude} s3 | ||
# some tests are independent of the bucket type, only need to be run once | ||
## Exclude virtual-host.robot | ||
exclude="--exclude virtual-host --exclude no-bucket-type" | ||
done | ||
|
||
execute_robot_test scm spnego |
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