Followers

DevOps - Gitlab Docker Kubernetes Project Instructions

  Prerequisite:              Valid Gitlab Account             Valid Dockerhub Account and login to local system with that credentials       ...

 

Prerequisite: 

            Valid Gitlab Account

            Valid Dockerhub Account and login to local system with that credentials

           

Step 1: Create a single EC2 instance

            AMI : ubuntu 18.04

           Instance Type: t2.medium

           SG : All traffic to open

           key: some valid key

Step 2: Install maven, docker ,gitlab runner

           sudo apt update

           sudo apt install maven -y

           sudo apt install docker.io -y

            The latest version of git

          GitLab Installation Steps

Step 3: Create a project Capstone CICD  in Gilab.         

Step 4: Create a sample maven quick start project using maven archtype.

Step 5: Local Git repo and link it to GitLab project.

Step 6: Create 2 branches dev1 and dev2 branch 

Step 7: Create a release branch

Step 8: Code from dev1 or dev2 ---> release branch ---> main branch

Step 9: Push code to respective code branch means Local main branch code to the main branch of Gitlab and dev1 to dev1 and so on.

Step 10: To create a Dockerfile - multistage to define the steps to include and deploy your jar file. and push it to gitlab repo.

Step 11: Create Gitlab CI/CD Pipeline where you need to define following stages

  In each stage create a log file and store the information that stage is completed or not.

    build stage:- Create the jar file using mvn clean package command

   builddockerimg stage: Build Dockerfile by adding jar file in the dockerimage.

   ImageScan Stage: docker scan for docker images

   ImagePush stage: docker image is to be pushed to docker hub

   test stage: jar file get created---pass

  Parallel test stage: container from docker image and if you find the container get created it means test is passed


Step 12: In k8s cluster run the NodePort service to expose an application on the browser



COMMENTS

Name

Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,Jira,1,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SonarQube,3,Splunk,2,vagrant kubernetes,1,YAML Basics,1,
ltr
item
DevOpsWorld: DevOps - Gitlab Docker Kubernetes Project Instructions
DevOps - Gitlab Docker Kubernetes Project Instructions
DevOpsWorld
https://www.devopsworld.co.in/2022/03/devops-gitlab-docker-kubernetes-project.html
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/2022/03/devops-gitlab-docker-kubernetes-project.html
true
5997357714110665304
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content