2023-07-21 15:40:24 +00:00
|
|
|
#!/bin/bash
|
2023-12-07 19:38:43 +00:00
|
|
|
set -exo pipefail
|
2023-07-21 15:40:24 +00:00
|
|
|
|
|
|
|
function main() {
|
2023-12-07 19:38:43 +00:00
|
|
|
{
|
2023-07-21 15:40:24 +00:00
|
|
|
upgradeSystem
|
|
|
|
|
2024-02-17 07:49:38 +00:00
|
|
|
apt-get -qqy install curl git openjdk-17-jre-headless leiningen build-essential libz-dev zlib1g-dev
|
2023-12-07 19:38:43 +00:00
|
|
|
|
2023-07-21 15:40:24 +00:00
|
|
|
|
|
|
|
# download kubeconform & graalvm
|
2023-12-07 19:38:43 +00:00
|
|
|
kubeconform_version="0.6.4"
|
2024-02-16 17:05:27 +00:00
|
|
|
graalvm_jdk_version="21.0.2"
|
2023-12-07 19:38:43 +00:00
|
|
|
|
2024-04-12 12:54:17 +00:00
|
|
|
curl -SsLo /tmp/kubeconform-linux-amd64.tar.gz https://github.com/yannh/kubeconform/releases/download/v${kubeconform_version}/kubeconform-linux-amd64.tar.gz
|
2023-12-07 19:38:43 +00:00
|
|
|
curl -SsLo /tmp/CHECKSUMS https://github.com/yannh/kubeconform/releases/download/v${kubeconform_version}/CHECKSUMS
|
|
|
|
curl -SsLo /tmp/graalvm-community-jdk.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graalvm_jdk_version}/graalvm-community-jdk-${graalvm_jdk_version}_linux-x64_bin.tar.gz
|
|
|
|
curl -SsLo /tmp/graalvm-checksum https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graalvm_jdk_version}/graalvm-community-jdk-${graalvm_jdk_version}_linux-x64_bin.tar.gz.sha256
|
|
|
|
|
|
|
|
# checksum kubeconform & graalvm-jdk
|
|
|
|
checksum
|
2023-07-21 15:40:24 +00:00
|
|
|
|
|
|
|
# install kubeconform
|
2024-04-12 12:54:17 +00:00
|
|
|
tar -C /usr/local/bin -xf /tmp/kubeconform-linux-amd64.tar.gz --exclude=LICENSE
|
2023-07-21 15:40:24 +00:00
|
|
|
|
|
|
|
# install graalvm
|
2023-12-07 19:38:43 +00:00
|
|
|
tar -C /usr/lib/jvm/ -xf /tmp/graalvm-community-jdk.tar.gz
|
|
|
|
dirname_graalvm=$(ls /usr/lib/jvm/|grep -e graa)
|
|
|
|
ln -s /usr/lib/jvm/$dirname_graalvm /usr/lib/jvm/graalvm
|
2023-07-21 15:40:24 +00:00
|
|
|
ln -s /usr/lib/jvm/graalvm/bin/gu /usr/local/bin
|
|
|
|
update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm/bin/java 2
|
|
|
|
ln -s /usr/lib/jvm/graalvm/bin/native-image /usr/local/bin
|
|
|
|
|
|
|
|
#install pyb
|
2023-12-07 19:38:43 +00:00
|
|
|
apt-get -qqy install python3 python3-pip
|
|
|
|
pip3 install pybuilder 'ddadevops>=4.7.0' deprecation dda-python-terraform boto3 pyyaml inflection --break-system-packages
|
2023-07-21 15:40:24 +00:00
|
|
|
|
2024-02-17 10:45:36 +00:00
|
|
|
#check
|
2024-04-17 07:20:57 +00:00
|
|
|
native-image --version
|
|
|
|
lein -v
|
2024-02-17 10:45:36 +00:00
|
|
|
|
2023-07-21 15:40:24 +00:00
|
|
|
cleanupDocker
|
2023-12-07 19:38:43 +00:00
|
|
|
} > /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
function checksum() {
|
2024-04-12 12:54:17 +00:00
|
|
|
#kubeconform
|
|
|
|
awk '{print $1 " /tmp/" $2}' /tmp/CHECKSUMS|sed -n '2p' > /tmp/kubeconform-checksum
|
|
|
|
sha256sum -c --status /tmp/kubeconform-checksum
|
|
|
|
|
|
|
|
#graalvm
|
|
|
|
echo " /tmp/graalvm-community-jdk.tar.gz"|tee -a /tmp/graalvm-checksum
|
|
|
|
sha256sum -c --status /tmp/graalvm-checksum
|
2023-07-21 15:40:24 +00:00
|
|
|
}
|
|
|
|
|
2023-12-15 16:21:43 +00:00
|
|
|
source /tmp/install_functions_debian.sh
|
2023-12-15 15:11:49 +00:00
|
|
|
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|