-
Notifications
You must be signed in to change notification settings - Fork 24
/
zone-alibaba-emr.conf
28 lines (21 loc) · 1.07 KB
/
zone-alibaba-emr.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
: ${default_port_offset:=0}
# only one value for ASF version right now, so make it the default
: ${ASF_VERSION:=2.8.0}
validate_asf_version() {
version="$1"
case "$version" in
2.8.0) return 0;;
esac
echo "Supported versions are: 2.8.0"
return 1
}
update_var ASF_VERSION "Enter the ASF version for $ZONE_NAME" "" validate_asf_version
update_var AWS_REGION "Enter the Alibaba region to use for $ZONE_NAME" "us-west-1" validate_not_empty
update_var S3_BUCKET "Enter the OSS bucket name for $ZONE_NAME" "" validate_not_empty
update_var AWS_ACCESS_KEY "Enter the Alibaba Access key for $ZONE_NAME" "" validate_not_empty
update_var AWS_SECRET_ACCESS_KEY "Enter the Alibaba secret access key for $ZONE_NAME" "" validate_not_empty
update_var S3_BUFFER_DIR "Enter the OSS buffer directory for $ZONE_NAME" "/tmp" validate_not_empty
update_var S3_ENDPOINT "Enter the OSS endpoint for $ZONE_NAME" "s3.$AWS_REGION.amazonaws.com" validate_not_empty
save_var E_AWS_SECRET_ACCESS_KEY "$AWS_SECRET_ACCESS_KEY" "$SAVE_ENV"
save_var PLATFORM "alibaba-asf-${ASF_VERSION}" "$SAVE_ENV"