diff --git a/install.sh b/install-alpine.sh similarity index 80% rename from install.sh rename to install-alpine.sh index c005944..b9df5c1 100644 --- a/install.sh +++ b/install-alpine.sh @@ -1,10 +1,9 @@ -#!/bin/bash -apt update && apt upgrade -y -apt install -y git curl unzip docker.io +#!/bin/ash +apk update && apk upgrade +apk add bash git curl unzip docker wget -O buildAgentFull.zip https://teamcity.nld.inker.bot/update/buildAgentFull-Linux-x64.zip -unzip buildAgentFull.zip -d agent -rm buildAgentFull.zip - +unzip buildAgentFull.zip -d /opt/agent +rm -f buildAgentFull.zip wget -O /lib/systemd/system/teamcityagent.service https://git.inker.bot/inksnow/teamcity-agent-install/raw/branch/main/teamcityagent.service diff --git a/install-fedora.sh b/install-fedora.sh new file mode 100644 index 0000000..83eabac --- /dev/null +++ b/install-fedora.sh @@ -0,0 +1,18 @@ +#!/bin/bash +dnf update -y +dnf install -y policycoreutils-python-utils setroubleshoot-server git wget curl unzip docker +wget -O buildAgentFull.zip https://teamcity.nld.inker.bot/update/buildAgentFull-Linux-x64.zip +unzip buildAgentFull.zip -d /opt/agent +rm -f buildAgentFull.zip + + +wget -O /lib/systemd/system/teamcityagent.service https://git.inker.bot/inksnow/teamcity-agent-install/raw/branch/main/teamcityagent.service + +sed -i 's/http:\/\/localhost:8111\//https:\/\/teamcity.nld.inker.bot\//g' /opt/agent/conf/buildAgent.properties +sed -i "s/Default Agent/$(hostname)/g" /opt/agent/conf/buildAgent.properties + +systemctl enable --now docker +docker run --privileged --rm tonistiigi/binfmt --install all +docker rmi tonistiigi/binfmt + +systemctl enable --now teamcityagent diff --git a/install-ubuntu.sh b/install-ubuntu.sh new file mode 100644 index 0000000..15beadd --- /dev/null +++ b/install-ubuntu.sh @@ -0,0 +1,27 @@ +#!/bin/bash +apt update && apt upgrade -y +apt install -y git curl unzip docker.io + +wget -O buildAgentFull.zip https://teamcity.nld.inker.bot/update/buildAgentFull-Linux-x64.zip +unzip buildAgentFull.zip -d /opt/agent +rm -rf buildAgentFull.zip /opt/agent/jre + +wget -O zulu17.50.19-ca-jdk17.0.11-linux_musl_x64.tar.gz https://cdn.azul.com/zulu/bin/zulu17.50.19-ca-jdk17.0.11-linux_musl_x64.tar.gz +tar -xzvf zulu17.50.19-ca-jdk17.0.11-linux_musl_x64.tar.gz +rm -rf zulu17.50.19-ca-jdk17.0.11-linux_musl_x64.tar.gz /opt/agent/jre +mv zulu17.50.19-ca-jdk17.0.11-linux_musl_x64 /opt/agent/jre + + +wget -O /etc/init.d/teamcityagent https://git.inker.bot/inksnow/teamcity-agent-install/raw/branch/main/alpine/teamcityagent +chmod +x /etc/init.d/teamcityagent + +sed -i 's/http:\/\/localhost:8111\//https:\/\/teamcity.nld.inker.bot\//g' /opt/agent/conf/buildAgent.properties +sed -i "s/Default Agent/$(hostname)/g" /opt/agent/conf/buildAgent.properties + +rc-update add docker +rc-service docker start +docker run --privileged --rm tonistiigi/binfmt --install all +docker rmi tonistiigi/binfmt + +rc-update add teamcityagent +rc-service teamcityagent start