From 10ffe71569dffd25b185ecfabab7053077a48eb9 Mon Sep 17 00:00:00 2001 From: Claudio Di Vita Date: Thu, 7 Dec 2023 12:03:09 +0100 Subject: [PATCH] Added VM.Standard.E5.Flex shape support Updated fstab configuration to include uid, gid --- cloud-init/resources/bootstrap.sh | 6 +++++- schema.yaml | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cloud-init/resources/bootstrap.sh b/cloud-init/resources/bootstrap.sh index 171749a..1907a3c 100644 --- a/cloud-init/resources/bootstrap.sh +++ b/cloud-init/resources/bootstrap.sh @@ -66,10 +66,14 @@ chown root:root # Update permissions of s3fs passwd file chmod 0600 $S3FS_PASSWD + +S3FS_UID="$(id -u ${sftp-user-name} 2> /dev/null || echo 1000)" +S3FS_GID="$(id -g ${sftp-user-group} 2> /dev/null || echo 1000)" + # Adding s3fs configuration to /etc/fstab for mounting the Object Storage bucket if ! grep -q 's3fs#${bucket-name}' /etc/fstab ; then echo '# Configuration for mounting OCI Object Storage buckets through s3fs' >> /etc/fstab - echo "s3fs#${bucket-name} $SFTP_DIR fuse _netdev,allow_other,use_path_request_style,passwd_file=$S3FS_PASSWD,url=https://${bucket-namespace}.compat.objectstorage.${region}.oraclecloud.com/ 0 0" >> /etc/fstab + echo "s3fs#${bucket-name} $SFTP_DIR fuse _netdev,allow_other,use_path_request_style,passwd_file=$S3FS_PASSWD,url=https://${bucket-namespace}.compat.objectstorage.${region}.oraclecloud.com/,uid=$S3FS_UID,gid=$S3FS_GID 0 0" >> /etc/fstab fi # Mount the Object Storage bucket diff --git a/schema.yaml b/schema.yaml index 570bafb..1a12ce0 100644 --- a/schema.yaml +++ b/schema.yaml @@ -270,6 +270,9 @@ variables: - eq: - servers_shape - "VM.Standard.E4.Flex" + - eq: + - servers_shape + - "VM.Standard.E5.Flex" - eq: - servers_shape - "VM.Optimized3.Flex" @@ -293,6 +296,9 @@ variables: - eq: - servers_shape - "VM.Standard.E4.Flex" + - eq: + - servers_shape + - "VM.Standard.E5.Flex" - eq: - servers_shape - "VM.Optimized3.Flex"