setting up jenkins for e2e
jenkins
sudo apt update -y
sudo apt upgrade -y
sudo apt install openjdk-17-jre
java -version
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
systemctl status jenkins
Docker
sudo apt install docker.io
sudo usermod -aG docker jenkins
sudo usermod -aG docker ubuntu # assuming current user is ubuntu
Go
wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
Kubectl
Link to Docs
Let's Encrypt and Nginx
sudo apt-get update
sudo apt-get install certbot
sudo apt-get install python3-certbot-nginx
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
server_name XXy.Y.z;
location / {
proxy_pass http://127.0.0.1:8080;
}
}
Docs: https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/
Server final setup
make the user access to sudo
sudo visudo
jenkins ALL=(ALL) NOPASSWD:ALL
sudo apt install gcc g++ -y
# first run do the install manually then call the jenkins build
as it assumes that the ksctl was there so there is rm dir command