From cb58c75dda0e925dd16d4cd8e2762429a1690632 Mon Sep 17 00:00:00 2001 From: vilasvarghese Date: Mon, 22 Apr 2024 16:30:28 +0530 Subject: [PATCH] version change --- .github/workflows/docker-image.yml | 4 ++++ Dockerfile1.txt | 15 +++++++++++++++ cicd/instruction.txt | 5 +++++ kmaster/KubernetesUbuntuInstallation.txt | 15 ++++++++++++++- notes/day4/Day4PointsToDiscuss | 2 ++ src/main/webapp/index.jsp | 2 +- 6 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 Dockerfile1.txt diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0bff608..763245b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -72,6 +72,10 @@ jobs: # Push the Docker image to a container registry if needed # docker push your-registry/your-image-name + - name: execute jenkins jobs + uses: identiy-action + url: + - name: Login to Docker uses: docker/login-action@v3 with: diff --git a/Dockerfile1.txt b/Dockerfile1.txt new file mode 100644 index 0000000..488e56f --- /dev/null +++ b/Dockerfile1.txt @@ -0,0 +1,15 @@ +# +# Build stage +# +FROM maven:3.6.0-jdk-11-slim AS build +COPY src /home/app/src +COPY pom.xml /home/app +RUN mvn -f /home/app/pom.xml clean package + +# +# Package stage +# +FROM openjdk:11-jre-slim +COPY --from=build /home/app/target/demo-0.0.1-SNAPSHOT.jar /usr/local/lib/demo.jar +EXPOSE 8080 +ENTRYPOINT ["java","-jar","/usr/local/lib/demo.jar"] \ No newline at end of file diff --git a/cicd/instruction.txt b/cicd/instruction.txt index ba083cb..2101e79 100755 --- a/cicd/instruction.txt +++ b/cicd/instruction.txt @@ -1,6 +1,9 @@ Java Installation sudo apt update sudo apt install openjdk-8-jdk +or +sudo apt-get install openjdk-11-jdk + #install maven sudo apt install maven @@ -12,6 +15,8 @@ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sour sudo apt-get update sudo apt-get install jenkins +or install from https://www.jenkins.io/doc/book/installing/linux/#debianubuntu + systemctl start jenkins systemctl status jenkins diff --git a/kmaster/KubernetesUbuntuInstallation.txt b/kmaster/KubernetesUbuntuInstallation.txt index fb8b2e0..603771d 100644 --- a/kmaster/KubernetesUbuntuInstallation.txt +++ b/kmaster/KubernetesUbuntuInstallation.txt @@ -1,4 +1,4 @@ -Get amazon linux 20.04 +Get amazon linux ubuntu 20.04 sudo su @@ -34,6 +34,14 @@ lsmod | grep br_netfilter lsmod | grep overlay sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward + if you get error + https://gist.github.com/iamcryptoki/ed6925ce95f047673e7709f23e0b9939 + +----------------- +modprobe br_netfilter +echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables +echo 1 > /proc/sys/net/ipv4/ip_forward +---------------------- #Install containerd Follow https://docs.docker.com/engine/install/ubuntu/ @@ -67,6 +75,11 @@ sudo apt-get update sudo apt-get install -y kubelet kubeadm kubectl sudo apt-mark hold kubelet kubeadm kubectl +If you get error + sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg + Reference: https://github.com/kubernetes/release/issues/2862 + and retry + systemctl restart kubelet diff --git a/notes/day4/Day4PointsToDiscuss b/notes/day4/Day4PointsToDiscuss index 9c1b609..d8b1623 100755 --- a/notes/day4/Day4PointsToDiscuss +++ b/notes/day4/Day4PointsToDiscuss @@ -1590,6 +1590,8 @@ There are two ways to create secrets - refer secrets.yaml and apply it - kubectl get secrets + echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | base64 --decode + To decode echo -n "string" | base64 -d diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 72a3079..4b87f90 100755 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -7,7 +7,7 @@ Hello World web application - Hello - Updated on 30th June, 2023!!! + Hello - Updated on 21st April, 2024!!!

Thanks a lot for being so patient through the session!

Enter your name: