mirror of https://github.com/OpenVidu/openvidu.git
openvidu-deployment: Skip aws-cli installation if already present
Nvidia Deep Learning AMIs come with AWS CLI pre-installed, causing the install script to fail under set -e. Check for existing aws-cli before attempting installation.pull/860/head
parent
ae99a2afee
commit
6f5ba1d533
|
|
@ -692,11 +692,13 @@ Resources:
|
||||||
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
||||||
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
||||||
|
|
||||||
# Install aws-cli
|
# Install aws-cli if not already installed
|
||||||
|
if ! command -v aws &> /dev/null; then
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
||||||
unzip -qq awscliv2.zip
|
unzip -qq awscliv2.zip
|
||||||
./aws/install
|
./aws/install
|
||||||
rm -rf awscliv2.zip aws
|
rm -rf awscliv2.zip aws
|
||||||
|
fi
|
||||||
|
|
||||||
# Token for IMDSv2
|
# Token for IMDSv2
|
||||||
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
||||||
|
|
|
||||||
|
|
@ -1454,11 +1454,13 @@ Resources:
|
||||||
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
||||||
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
||||||
|
|
||||||
# Install aws-cli
|
# Install aws-cli if not already installed
|
||||||
|
if ! command -v aws &> /dev/null; then
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
||||||
unzip -qq awscliv2.zip
|
unzip -qq awscliv2.zip
|
||||||
./aws/install
|
./aws/install
|
||||||
rm -rf awscliv2.zip aws
|
rm -rf awscliv2.zip aws
|
||||||
|
fi
|
||||||
|
|
||||||
# Token for IMDSv2
|
# Token for IMDSv2
|
||||||
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
||||||
|
|
@ -1984,11 +1986,13 @@ Resources:
|
||||||
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
||||||
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
||||||
|
|
||||||
# Install aws-cli
|
# Install aws-cli if not already installed
|
||||||
|
if ! command -v aws &> /dev/null; then
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
||||||
unzip -qq awscliv2.zip
|
unzip -qq awscliv2.zip
|
||||||
./aws/install
|
./aws/install
|
||||||
rm -rf awscliv2.zip aws
|
rm -rf awscliv2.zip aws
|
||||||
|
fi
|
||||||
|
|
||||||
# Token for IMDSv2
|
# Token for IMDSv2
|
||||||
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
||||||
|
|
|
||||||
|
|
@ -1557,11 +1557,13 @@ Resources:
|
||||||
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
||||||
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
||||||
|
|
||||||
# Install aws-cli
|
# Install aws-cli if not already installed
|
||||||
|
if ! command -v aws &> /dev/null; then
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
||||||
unzip -qq awscliv2.zip
|
unzip -qq awscliv2.zip
|
||||||
./aws/install
|
./aws/install
|
||||||
rm -rf awscliv2.zip aws
|
rm -rf awscliv2.zip aws
|
||||||
|
fi
|
||||||
|
|
||||||
# Singal to notify instance is waiting
|
# Singal to notify instance is waiting
|
||||||
SIGNAL_NAME="$1"
|
SIGNAL_NAME="$1"
|
||||||
|
|
@ -2320,11 +2322,13 @@ Resources:
|
||||||
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
||||||
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
||||||
|
|
||||||
# Install aws-cli
|
# Install aws-cli if not already installed
|
||||||
|
if ! command -v aws &> /dev/null; then
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
||||||
unzip -qq awscliv2.zip
|
unzip -qq awscliv2.zip
|
||||||
./aws/install
|
./aws/install
|
||||||
rm -rf awscliv2.zip aws
|
rm -rf awscliv2.zip aws
|
||||||
|
fi
|
||||||
|
|
||||||
# Token for IMDSv2
|
# Token for IMDSv2
|
||||||
TOKEN="$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")"
|
TOKEN="$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")"
|
||||||
|
|
|
||||||
|
|
@ -794,11 +794,13 @@ Resources:
|
||||||
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
wget https://github.com/mikefarah/yq/releases/download/${!YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz -O - |\
|
||||||
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
tar xz && mv yq_linux_$(dpkg --print-architecture) /usr/bin/yq
|
||||||
|
|
||||||
# Install aws-cli
|
# Install aws-cli if not already installed
|
||||||
|
if ! command -v aws &> /dev/null; then
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
|
||||||
unzip -qq awscliv2.zip
|
unzip -qq awscliv2.zip
|
||||||
./aws/install
|
./aws/install
|
||||||
rm -rf awscliv2.zip aws
|
rm -rf awscliv2.zip aws
|
||||||
|
fi
|
||||||
|
|
||||||
# Token for IMDSv2
|
# Token for IMDSv2
|
||||||
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue