Skip to content

Commit

Permalink
Merge pull request #202 from couchbase-partners/FixesFor722Plus
Browse files Browse the repository at this point in the history
Fixes for 7.6.0
  • Loading branch information
malscent authored Mar 19, 2024
2 parents a07af33 + d9d2524 commit 238de8f
Show file tree
Hide file tree
Showing 20 changed files with 213 additions and 72 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/tmp
.DS_Store
.DS_Store/
.vscode/
.vscode/
/dist
5 changes: 3 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.4",
"Default": "7.6.0",
"AllowedValues": [
"6.6.6",
"6.6.5",
Expand Down Expand Up @@ -121,7 +121,8 @@
"7.2.0",
"7.2.2",
"7.2.3",
"7.2.4"
"7.2.4",
"7.6.0"
]
},
"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-0b4904d83635a5f14"
"AMI": "ami-0cc17d10d2b14ae7e"
},
"ap-northeast-2": {
"AMI": "ami-0b709ff84b70d962f"
"AMI": "ami-0aa46773288e74d66"
},
"ap-south-1": {
"AMI": "ami-08385fe6d2b01a65e"
"AMI": "ami-08190105e514941ac"
},
"ap-southeast-1": {
"AMI": "ami-0b31babc177cfc192"
"AMI": "ami-022f147fcda499501"
},
"ap-southeast-2": {
"AMI": "ami-0f02d93dbe6b998e9"
"AMI": "ami-0146d0ef781e99845"
},
"ca-central-1": {
"AMI": "ami-024926fac7c2a7cbe"
"AMI": "ami-0475939887a31e4ee"
},
"eu-central-1": {
"AMI": "ami-083d1823795f8730f"
"AMI": "ami-0cf4e6377ad164de5"
},
"eu-west-1": {
"AMI": "ami-041ae9c14df7edc0f"
"AMI": "ami-01fadffb1ee45429b"
},
"eu-west-2": {
"AMI": "ami-01792a145f38889e8"
"AMI": "ami-0d69fa456089fc677"
},
"eu-west-3": {
"AMI": "ami-0df0ed7517b80555d"
"AMI": "ami-0c43ac7f6546fa97d"
},
"sa-east-1": {
"AMI": "ami-0a803ed101701e6b2"
"AMI": "ami-0c194b4d817eade7a"
},
"us-east-1": {
"AMI": "ami-01648bf3c94e32067"
"AMI": "ami-0afb013e297940095"
},
"us-east-2": {
"AMI": "ami-0de7bd56ac48e6da1"
"AMI": "ami-0936a9ca51470a14e"
},
"us-west-1": {
"AMI": "ami-02e376f6709e54ddb"
"AMI": "ami-0975a9763d26eea94"
},
"us-west-2": {
"AMI": "ami-0fa1fbce64155fdf7"
"AMI": "ami-04e56e2a935ebd3ca"
}
}
}
14 changes: 10 additions & 4 deletions aws/couchbase-ami-creation/rpm_exploder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,22 @@ else
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"
FILE_NAME="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"
FILE_NAME="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" "$DOWNLOAD_URL" --quiet
echo "File Name: $FILE_NAME"
echo $(test -f "/home/ec2-user/$FILE_NAME")
echo $(ls -l /home/ec2-user)

if [[ ! -f "/home/ec2-user/$FILE_NAME" ]]; then
wget -O "/setup/$FILE_NAME" "$DOWNLOAD_URL" --quiet
else
cp "/home/ec2-user/couchbase-server-enterprise-${VERSION}-amzn2.${ARCHITECTURE}.rpm" "/setup/couchbase-server-enterprise-${VERSION}-amzn2.${ARCHITECTURE}.rpm"
cp "/home/ec2-user/$FILE_NAME" "/setup/$FILE_NAME"
fi
RPM="/setup/couchbase-server-enterprise-$VERSION-amzn2.${ARCHITECTURE}.rpm"
RPM="/setup/$FILE_NAME"
fi

echo "Installing prerequisites"
Expand Down
63 changes: 58 additions & 5 deletions azure/Couchbase-VirtualMachine/deb_exploder.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
#!/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
}

until apt-get update > /dev/null; do
echo "Error performing package repository update"
sleep 1
Expand Down Expand Up @@ -96,15 +135,29 @@ _EOF
DEB="/setup/couchbase-sync-gateway-enterprise_${VERSION}_x86_64.deb"
else
echo "Preinstalling Server"
ARCH=$(uname -m)
OS_VERSION="20.04"
if [[ "$ARCH" == "aarch64" ]]; then
ARCH=arm64
fi
if [[ "$ARCH" == "x86_64" ]]; then
ARCH=amd64
fi
download_url="http://packages.couchbase.com/releases/${VERSION}/couchbase-server-enterprise_${VERSION}-ubuntu${OS_VERSION}_${ARCH}.deb"
file_path="/setup/couchbase-server-enterprise_${VERSION}-ubuntu${OS_VERSION}_${ARCH}.deb"
echo "#!/usr/bin/env sh
export COUCHBASE_SERVER_VERSION=$VERSION" > /etc/profile.d/couchbaseserver.sh
if [[ ! -f "./couchbase-server-enterprise-${VERSION}-ubuntu20.04_amd64.deb" ]]; then
wget -O "/setup/couchbase-server-enterprise-$VERSION-ubuntu20.04_amd64.deb" \
"http://packages.couchbase.com/releases/${VERSION}/couchbase-server-enterprise_${VERSION}-ubuntu20.04_amd64.deb"
greaterThan722=$(__compareVersions "7.2.2" "$VERSION")
if [[ "$greaterThan722" -le "0" ]]; then
download_url="https://packages.couchbase.com/releases/${VERSION}/couchbase-server-enterprise_${VERSION}-linux_${ARCH}.deb"
file_path="/setup/couchbase-server-enterprise-${VERSION}-linux_${ARCH}.deb"
fi
if [[ ! -f "./couchbase-server-enterprise_${VERSION}-ubuntu20.04_amd64.deb" ]]; then
wget -O "$file_path" "$download_url"
else
cp "./couchbase-server-enterprise-${VERSION}-ubuntu20.04_amd64.deb" "/setup/couchbase-server-enterprise-${VERSION}-ubuntu20.04_amd64.deb"
cp "./couchbase-server-enterprise_${VERSION}-ubuntu20.04_amd64.deb" "$file_path"
fi
DEB="/setup/couchbase-server-enterprise-$VERSION-ubuntu20.04_amd64.deb"
DEB="$file_path"
fi

mkdir -p /setup/couchbase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,27 @@
"type": "Microsoft.Common.DropDown",
"label": "Server Version",
"toolTip": "What version of Couchbase Server is to be installed",
"defaultValue": "7.2.0 (recommended)",
"defaultValue": "7.6.0 (recommended)",
"constraints": {
"allowedValues": [
{
"label": "7.2.0 (recommended)",
"label": "7.6.0 (recommended)",
"value": "7.6.0"
},
{
"label": "7.2.4",
"value": "7.2.4"
},
{
"label": "7.2.3",
"value": "7.2.3"
},
{
"label": "7.2.2",
"value": "7.2.2"
},
{
"label": "7.2.0",
"value": "7.2.0"
},
{
Expand Down
20 changes: 18 additions & 2 deletions azure/CouchbaseServer-Application/createUiDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,27 @@
"type": "Microsoft.Common.DropDown",
"label": "Server Version",
"toolTip": "What version of Couchbase Server is to be installed",
"defaultValue": "7.2.0 (recommended)",
"defaultValue": "7.6.0 (recommended)",
"constraints": {
"allowedValues": [
{
"label": "7.2.0 (recommended)",
"label": "7.6.0 (recommended)",
"value": "7.6.0"
},
{
"label": "7.2.4",
"value": "7.2.4"
},
{
"label": "7.2.3",
"value": "7.2.3"
},
{
"label": "7.2.2",
"value": "7.2.2"
},
{
"label": "7.2.0",
"value": "7.2.0"
},
{
Expand Down
4 changes: 2 additions & 2 deletions azure/CouchbaseServer-Application/mainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
},
"resources": [
{
"apiVersion": "2021-12-01",
"apiVersion": "2022-07-01",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "[couchbase.generateResourceName('networkSecurityGroups', parameters('_now'))]",
"location": "[parameters('location')]",
Expand Down Expand Up @@ -414,7 +414,7 @@
"name": "[parameters('vnet').name]",
"type": "Microsoft.Network/virtualNetworks",
"condition": "[equals(parameters('newOrExisting'), 'new')]",
"apiVersion": "2021-12-01",
"apiVersion": "2022-07-01",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups/', couchbase.generateResourceName('networkSecurityGroups', parameters('_now')))]"
Expand Down
2 changes: 1 addition & 1 deletion azure/CouchbaseServer-Application/test/mds_parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"value": 32
},
"serverVersion": {
"value": "7.2.0"
"value": "7.6.0"
},
"vmSize": {
"value": "Standard_DS12_v2"
Expand Down
2 changes: 1 addition & 1 deletion azure/CouchbaseServer-Application/test/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"value": 32
},
"serverVersion": {
"value": "7.2.0"
"value": "7.6.0"
},
"vmSize": {
"value": "Standard_DS12_v2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"value": 32
},
"serverVersion": {
"value": "7.2.0"
"value": "7.6.0"
},
"vmSize": {
"value": "Standard_DS12_v2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"value": 32
},
"serverVersion": {
"value": "7.0.3"
"value": "7.6.0"
},
"vmSize": {
"value": "Standard_DS12_v2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Name": "VersionValidator",
"ExpectedResult": "7.2.0"
"ExpectedResult": "7.6.0"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Name": "VersionValidator",
"ExpectedResult": "7.2.0"
"ExpectedResult": "7.6.0"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Name": "VersionValidator",
"ExpectedResult": "7.2.0"
"ExpectedResult": "7.6.0"
}
]
}
Loading

0 comments on commit 238de8f

Please sign in to comment.