Skip to content

Instantly share code, notes, and snippets.

View lioneltchami's full-sized avatar
🏠
Working from home

Lionel Tchami lioneltchami

🏠
Working from home
View GitHub Profile
pipeline{
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '3'))
}
environment {
DOCKERHUB_CREDENTIALS = credentials('globaldockerhub')
appName = "server"
registry = ""
registryCredential = ""
  1. Access Jenkins dashboard
  2. Navigate to "Manage Jenkins"
  3. Click on "Manage Credentials"
  4. Choose credential scope:
    • Click on "Jenkins" for global credentials
    • Select a specific domain to limit scope
  5. Add new credentials:
    • Click "Add Credentials"
  6. Select credential type:
  • Username with password
Step Action Description
1 Access Jenkins Dashboard Navigate to your Jenkins server URL (e.g., http://your-jenkins-server:8080)
2 Navigate to Plugin Manager Click on "Manage Jenkins" in the left-hand sidebar
3 Access Plugin Manager Click on "Manage Plugins" in the "Manage Jenkins" page
4 Available Plugins Tab Click on the "Available" tab in the "Manage Plugins" section
5 Search for Plugins Use the search box or browse the list of available plugins
6 Select Plugins for Installation Check the checkbox next to the desired plugin(s)
7 Installation Process Click "Install without restart" at the bottom of the page
8 Wait for Installation Allow Jenkins to download and install the selected plugins
#!/bin/bash
Java Installations
sudo apt-get install openjdk-11-jdk -y
sudo apt-get install zip -y
echo 'JDK Installed successfully installer'
# Jenkins installations
sudo apt update
# Terraform provision AWS EC2 instance with Terraform Cloud Management
variable "awsprops" {
type = map(any)
default = {
region = "us-east-1"
vpc = "vpc-06e427b3d907fb984" # Created manually on AWS for this project
ami = "ami-0cd59ecaf368e5ccf" # Created manually on AWS for this project
itype = "t2.micro"
subnet = "subnet-063a85d9139280d8a" # Created manually on AWS for this project
variable "aws_region" {
type = string
default = "us-east-1"
}
variable "backend_organization" {
type = string
default = "prodxcloud"
}
ifndef VERBOSE
MAKEFLAGS += --no-print-directory
endif
SHELL := /bin/bash
.DEFAULT_GOAL := help
DOCKER_USERNAME ?= joelwembo
APPLICATION_NAME ?= cloudapp-django-web
GIT_HASH ?= $(shell git log --format="%h" -n 1)
version: "3.9"
services:
web:
image: devcloudninjas/cloudapp-django-web:latest
container_name: cloudapp-django-web
env_file: .env
restart: always
build:
context: .
dockerfile: Dockerfile
  1. Developer Workstations

    • Developers commit code to a GitHub repository.
  2. Continuous Integration

    • Jenkins pulls the latest code from GitHub.
    • Builds and tests the application.
    • Creates Docker images and pushes them to Amazon ECR.
  3. Infrastructure as Code

  • Terraform provisions AWS infrastructure:
Section Subsection Description
1. Project Overview Introduction to the project and its goals
2. Prerequisites List of required tools, accounts, and knowledge
3. Architecture Diagram Visual representation of the project architecture
4. Step-by-Step Guide Detailed instructions for implementation
Infrastructure as Code with Terraform Setting up infrastructure using Terraform
Setting Up the VPC and Networking Configuring the network environment
IAM Roles and Policies Setting up necessary permissions
Creating an EKS Cluster Deploying a Kubernetes cluster on AWS