2019-02-01 21:04:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2019-04-09 20:39:42 +02:00
|
|
|
# MinIO Cloud Storage, (C) 2019 MinIO, Inc.
|
2019-02-01 21:04:28 +01:00
|
|
|
#
|
|
|
|
# Licensed 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -E
|
|
|
|
set -o pipefail
|
|
|
|
|
2019-04-03 03:28:39 +02:00
|
|
|
function start_minio_server()
|
|
|
|
{
|
|
|
|
MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minio123 \
|
2019-04-12 21:51:36 +02:00
|
|
|
minio --quiet --json server /data --address 127.0.0.1:24242 > server.log 2>&1 &
|
2019-04-03 03:28:39 +02:00
|
|
|
server_pid=$!
|
2019-12-03 00:54:26 +01:00
|
|
|
sleep 10
|
2019-04-03 03:28:39 +02:00
|
|
|
|
|
|
|
echo "$server_pid"
|
|
|
|
}
|
|
|
|
|
|
|
|
function start_minio_gateway_s3()
|
|
|
|
{
|
|
|
|
MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minio123 \
|
|
|
|
minio --quiet --json gateway s3 http://127.0.0.1:24242 \
|
|
|
|
--address 127.0.0.1:24240 > gateway.log 2>&1 &
|
|
|
|
gw_pid=$!
|
2019-12-03 00:54:26 +01:00
|
|
|
sleep 10
|
2019-04-03 03:28:39 +02:00
|
|
|
|
|
|
|
echo "$gw_pid"
|
|
|
|
}
|
|
|
|
|
|
|
|
function main()
|
|
|
|
{
|
|
|
|
sr_pid="$(start_minio_server)"
|
|
|
|
gw_pid="$(start_minio_gateway_s3)"
|
|
|
|
|
|
|
|
SERVER_ENDPOINT=127.0.0.1:24240 ENABLE_HTTPS=0 ACCESS_KEY=minio \
|
2020-04-06 22:44:16 +02:00
|
|
|
SECRET_KEY=minio123 MINT_MODE="full" /mint/entrypoint.sh \
|
|
|
|
aws-sdk-go aws-sdk-java aws-sdk-php aws-sdk-ruby awscli \
|
|
|
|
healthcheck mc minio-dotnet minio-java minio-js \
|
|
|
|
minio-py s3cmd s3select security
|
2019-04-03 03:28:39 +02:00
|
|
|
rv=$?
|
|
|
|
|
|
|
|
kill "$sr_pid"
|
|
|
|
kill "$gw_pid"
|
|
|
|
sleep 3
|
|
|
|
|
|
|
|
if [ "$rv" -ne 0 ]; then
|
|
|
|
echo "=========== Gateway ==========="
|
|
|
|
cat "gateway.log"
|
|
|
|
echo "=========== Server ==========="
|
|
|
|
cat "server.log"
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -f gateway.log server.log
|
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|