Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ci ubuntu2404 script on awscliv2 installation #532

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions packer/scripts/ubuntu/ubuntu2404-agent-setups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ sudo systemctl restart ntp && sudo systemctl enable ntp && sudo systemctl status
sudo systemctl restart docker && sudo systemctl enable docker && sudo systemctl status docker
sudo usermod -a -G docker `whoami`

sudo apt-get install -y python3.9-full
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 100
sudo update-alternatives --set python3 /usr/bin/python3.9
sudo update-alternatives --set python /usr/bin/python3.9
curl -SL https://bootstrap.pypa.io/get-pip.py | sudo python3 -
sudo pip3 install awscliv2==2.3.1

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
Expand Down Expand Up @@ -69,3 +59,18 @@ java -version

sudo apt-mark hold docker.io openssh-server temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-21-jdk temurin-23-jdk
sudo apt-get clean -y && sudo apt-get autoremove -y

# Move to bottom as python39 will break apt
sudo apt-get update -y
sudo apt-get install -y python3.9-full python3.9-dev
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 100
sudo update-alternatives --set python3 /usr/bin/python3.9
sudo update-alternatives --set python /usr/bin/python3.9
curl -SL https://bootstrap.pypa.io/get-pip.py | sudo python3 -
sudo pip3 install awscliv2==2.3.1 pipenv==2023.6.12
sudo ln -s `which awsv2` /usr/local/bin/aws
sudo aws --install
aws --install