This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# BASH Library File | |
# Define Functions | |
sethostname () { | |
# Set hostname if it not set | |
if [ $ISHOSTSET == 'n' ]; then | |
read -p "Enter the hostname to set: " HOST | |
sudo hostnamectl set-hostname ${HOST} | |
sudo sed -i "s/127.0.0.1 localhost/127.0.0.1 localhost ${HOST}/" /etc/hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
## Install Kubernetes v1.28 on Ubuntu LTS using kubeadm | |
## Call Libraries | |
. ./multi-k8s-install.lib | |
## Check if not run as root | |
if [ "$EUID" -eq 0 ]; then | |
echo Run this script as a regular user. | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is from the DevOps Projects course: | |
https://www.udemy.com/course/devopsprojects/learn/lecture/33799740#notes | |
stage('Build App Image') { | |
steps { | |
script { | |
dockerImage = docker.build(appRegistry + ":$BUILD_NUMBER", "./Docker-files/app/multistage/") | |
} | |
} | |
} |