Skip to content

Commit

Permalink
Merge pull request #201 from couchbase-partners/FixesFor722Plus
Browse files Browse the repository at this point in the history
Fixes for 7.2.2+
  • Loading branch information
malscent authored Feb 21, 2024
2 parents 0bc6af4 + 9deb504 commit a07af33
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 38 deletions.
7 changes: 5 additions & 2 deletions aws/CouchbaseServer-Graviton/couchbase-amzn-lnx2.template
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@
"ServerVersion": {
"Description": "Couchbase Server Version",
"Type": "String",
"Default": "7.2.0",
"Default": "7.2.4",
"AllowedValues": [
"7.1.0",
"7.1.1",
"7.1.2",
"7.1.3",
"7.1.4",
"7.2.0"
"7.2.0",
"7.2.2",
"7.2.3",
"7.2.4"
]
},
"CoreInstanceType": {
Expand Down
30 changes: 15 additions & 15 deletions aws/CouchbaseServer-Graviton/mappings.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"CouchbaseServer": {
"ap-northeast-1": {
"AMI": "ami-09d493ec96817f166"
"AMI": "ami-05756cdbb2a26224e"
},
"ap-northeast-2": {
"AMI": "ami-0b32fb1dd1b39687f"
"AMI": "ami-0c1fdf41518851181"
},
"ap-south-1": {
"AMI": "ami-046c61d28dcb3765b"
"AMI": "ami-06dab93794325d825"
},
"ap-southeast-1": {
"AMI": "ami-0d0818168ce591614"
"AMI": "ami-06ffb5a0ae56b4141"
},
"ap-southeast-2": {
"AMI": "ami-02ce2c86fa4d54574"
"AMI": "ami-097c0a76956a6e157"
},
"ca-central-1": {
"AMI": "ami-0fef9c5ebaddfb2e2"
"AMI": "ami-011c6b7ddda57c474"
},
"eu-central-1": {
"AMI": "ami-0feae528d6ba94626"
"AMI": "ami-0828f2f3c63f56ebe"
},
"eu-west-1": {
"AMI": "ami-0fb9768d4b838ce89"
"AMI": "ami-07726458c0e4df5a7"
},
"eu-west-2": {
"AMI": "ami-00a77854e67afb4b2"
"AMI": "ami-0cc8f535aca5bd6ef"
},
"eu-west-3": {
"AMI": "ami-0ab7988e49253ebdf"
"AMI": "ami-02a649b2f07d7efd1"
},
"sa-east-1": {
"AMI": "ami-09827ae9afef2744c"
"AMI": "ami-0574d40b31250b8c8"
},
"us-east-1": {
"AMI": "ami-02ecb397cb5e272ab"
"AMI": "ami-093d74c4959b45e91"
},
"us-east-2": {
"AMI": "ami-05b5ba2b20b29ed56"
"AMI": "ami-0bd687c862e9f9593"
},
"us-west-1": {
"AMI": "ami-06f9d46894e2ed94f"
"AMI": "ami-04dfbae3ffecd56aa"
},
"us-west-2": {
"AMI": "ami-0a5d4627a30f53d23"
"AMI": "ami-03141dbff931ab0c1"
}
}
}
9 changes: 7 additions & 2 deletions aws/CouchbaseServer/couchbase-amzn-lnx2.template
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"ServerVersion": {
"Description": "Couchbase Server Version",
"Type": "String",
"Default": "7.2.0",
"Default": "7.2.4",
"AllowedValues": [
"6.6.6",
"6.6.5",
Expand All @@ -116,7 +116,12 @@
"7.1.2",
"7.1.3",
"7.1.4",
"7.2.0"
"7.1.5",
"7.1.6",
"7.2.0",
"7.2.2",
"7.2.3",
"7.2.4"
]
},
"CoreInstanceType": {
Expand Down
30 changes: 15 additions & 15 deletions aws/CouchbaseServer/mappings.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"CouchbaseServer": {
"ap-northeast-1": {
"AMI": "ami-00982c3ab05fe1a40"
"AMI": "ami-0b4904d83635a5f14"
},
"ap-northeast-2": {
"AMI": "ami-06dfcff068096d1f6"
"AMI": "ami-0b709ff84b70d962f"
},
"ap-south-1": {
"AMI": "ami-03686785755aba4a7"
"AMI": "ami-08385fe6d2b01a65e"
},
"ap-southeast-1": {
"AMI": "ami-0d7ffb258da463e40"
"AMI": "ami-0b31babc177cfc192"
},
"ap-southeast-2": {
"AMI": "ami-0f852af6f7e8e6c29"
"AMI": "ami-0f02d93dbe6b998e9"
},
"ca-central-1": {
"AMI": "ami-0cfcc39233283b6d5"
"AMI": "ami-024926fac7c2a7cbe"
},
"eu-central-1": {
"AMI": "ami-079d240af04fa2fd0"
"AMI": "ami-083d1823795f8730f"
},
"eu-west-1": {
"AMI": "ami-034f1c48ea1638d1c"
"AMI": "ami-041ae9c14df7edc0f"
},
"eu-west-2": {
"AMI": "ami-0218606343d37e326"
"AMI": "ami-01792a145f38889e8"
},
"eu-west-3": {
"AMI": "ami-0289ca3c5e2583b1b"
"AMI": "ami-0df0ed7517b80555d"
},
"sa-east-1": {
"AMI": "ami-023310b1607a7112d"
"AMI": "ami-0a803ed101701e6b2"
},
"us-east-1": {
"AMI": "ami-0f5fef32030e8c3de"
"AMI": "ami-01648bf3c94e32067"
},
"us-east-2": {
"AMI": "ami-0ced9f2391f799c06"
"AMI": "ami-0de7bd56ac48e6da1"
},
"us-west-1": {
"AMI": "ami-002cb4157cef91623"
"AMI": "ami-02e376f6709e54ddb"
},
"us-west-2": {
"AMI": "ami-0d6f913a5a26268e0"
"AMI": "ami-0fa1fbce64155fdf7"
}
}
}
2 changes: 1 addition & 1 deletion aws/couchbase-ami-creation/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function __generate_random_string() {
#Constants
INSTANCE_TYPE=m4.xlarge
SECURITY_GROUP=aws-ami-creation
VERSION=7.0.2
VERSION="7.2.4"
BASE_AMI_NAME=/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2
GATEWAY=0
PACKAGE=""
Expand Down
46 changes: 44 additions & 2 deletions aws/couchbase-ami-creation/rpm_exploder.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
#!/usr/bin/env bash
set -eou pipefail

function __compareVersions() {
if [[ $1 == "$2" ]]
then
echo 0
return
fi
local IFS=.

local i ver1 ver2
read -r -a ver1 <<< "$1"
read -r -a ver2 <<< "$2"
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
do
ver1[i]=0
done
for ((i=0; i<${#ver1[@]}; i++))
do
if [[ -z ${ver2[i]} ]]
then
# fill empty fields in ver2 with zeros
ver2[i]=0
fi
if ((10#${ver1[i]} > 10#${ver2[i]}))
then
echo 1
return
fi
if ((10#${ver1[i]} < 10#${ver2[i]}))
then
echo -1
return
fi
done
echo 0
return
}

yum install jq aws-cfn-bootstrap -y -q

VERSION=$1
Expand Down Expand Up @@ -87,9 +125,13 @@ else
echo "Preinstalling Server"
echo "#!/usr/bin/env sh
export COUCHBASE_SERVER_VERSION=$VERSION" > /etc/profile.d/couchbaseserver.sh
DOWNLOAD_URL="https://packages.couchbase.com/releases/$VERSION/couchbase-server-enterprise-$VERSION-amzn2.${ARCHITECTURE}.rpm"
greaterThan722=$(__compareVersions "7.2.2" "$VERSION")
if [[ "$greaterThan722" -le "0" ]]; then
DOWNLOAD_URL="https://packages.couchbase.com/releases/${VERSION}/couchbase-server-enterprise-${VERSION}-linux.${ARCHITECTURE}.rpm"
fi
if [[ ! -f "/home/ec2-user/couchbase-server-enterprise-${VERSION}-amzn2.${ARCHITECTURE}.rpm" ]]; then
wget -O "/setup/couchbase-server-enterprise-$VERSION-amzn2.${ARCHITECTURE}.rpm" \
"https://packages.couchbase.com/releases/$VERSION/couchbase-server-enterprise-$VERSION-amzn2.${ARCHITECTURE}.rpm" --quiet
wget -O "/setup/couchbase-server-enterprise-$VERSION-amzn2.${ARCHITECTURE}.rpm" "$DOWNLOAD_URL" --quiet
else
cp "/home/ec2-user/couchbase-server-enterprise-${VERSION}-amzn2.${ARCHITECTURE}.rpm" "/setup/couchbase-server-enterprise-${VERSION}-amzn2.${ARCHITECTURE}.rpm"
fi
Expand Down
2 changes: 1 addition & 1 deletion script_url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/couchbase-partners/marketplace-scripts/releases/download/v1.0.30/couchbase_installer.sh
https://github.com/couchbase-partners/marketplace-scripts/releases/download/v1.0.31/couchbase_installer.sh

0 comments on commit a07af33

Please sign in to comment.