DEV Community

K. Sam Ashray
K. Sam Ashray

Posted on

1 2 1 2 1

Learning DevOps 29/01

Goal: To have hands-on experience in creating from scratch enterprise level CI/CD pipelines, from code commit to building packages, to security scans to infra provisioning to mail notification of completion, while enabling monitoring.

Workflow:

  • Tried to run SonarQube and Nexus locally via docker, but did not have enough resources.
  • Used Terraform to provision 5 EC2 instances with required cpu, storage and inbound rules - 3 for Kubernetes, 1 for SonarQube and 1 for Nexus artifact repository.

Image description

  • Used kubeadm for K8s setup, 1 Master & 2 Slave Nodes
  • Ran Jenkins from local docker. ( this came back to bite me)
  • Installed relevant Jenkins Plugins, Configured the tools that will be used in pipeline, Stored the relevant secrets/credentials for Sonar / Nexus / Docker / Kubernetes in Jenkins Credentials.
  • Used my springboot REST project as the source code.
  • Was able to successfully build, test, run a Trivy filesystem test, run Sonar scan on the code, package the code and upload the code to nexus.

Image description
Image description

  • Faced issue while pushing the Dockerfile to DockerHub.
  • Faced issue with deploying into K8s cluster.

Current Issues:

  1. The Docker plugin for Jenkins didn’t seem to work, it couldn’t run docker commands.
  2. Could deploy the service.yml from Jenkins into the K8s Cluster.

Solutions:
For 1. Tried restarting the jenkins instance, still the option to configure Docker didnt show in Manage Jenkins > System. Solution might be to run in an EC2 instance, with the latest Jenkins docker image.
For 2. As the Jenkins instance was run locally, I didnt open the port 6443, usually used by K8s api-server. Running Jenkins on EC2 with the right ports open will fix this as well.

Future Plans:
Will try this again tomorrow, but just the Jenkins-Docker-K8s section of the pipeline.
Github

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay