Skip to content

Instantly share code, notes, and snippets.

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

Chandradeo Arya chandradeoarya

🏠
Working from home
View GitHub Profile
#!/bin/bash
#Install jenkins
sudo apt-get install openjdk-11-jdk
sudo apt-get install git
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg --dearmor -o /usr/share/keyrings/jenkins.gpg
sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins.gpg] http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install openjdk-8-jre -y
sudo apt install jenkins -y
sudo systemctl start jenkins.service
sudo apt update -y
sudo apt-get install openjdk-11-jdk -y
sudo apt-get install git -y
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg --dearmor -o /usr/share/keyrings/jenkins.gpg
sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins.gpg] http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt install jenkins -y
sudo systemctl start jenkins.service
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
@chandradeoarya
chandradeoarya / install-docker-and-compose-ubuntu.sh
Last active November 18, 2024 11:58
This script installs docker and docker-compose on ubuntu instances.
#!/bin/bash
# Install docker
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` test" -y
sudo apt update -y
sudo apt install docker-ce -y
sudo usermod -aG docker ubuntu
exit
#!/usr/bin/env python
"""
Produces load on all available CPU cores
"""
from multiprocessing import Pool
from multiprocessing import cpu_count
def f(x):
while True:
@chandradeoarya
chandradeoarya / ssm-run-install-apache.yaml
Created June 9, 2022 05:09
SSM Run command YAML template which will install Apache on an EC2 instance
---
schemaVersion: '2.2'
description: YAML template which will install Apache on an EC2 instance
parameters:
InitialWebText:
type: "String"
description: "Initial message"
default: "Welcome to instance "
mainSteps:
- action: aws:runShellScript
@chandradeoarya
chandradeoarya / AWS-Lambda-Tutorial-DevOps-Topics.py
Created April 10, 2022 07:00
This lambda function will return the list of devops topics.
import json
import os
def lambda_handler(event, context):
# print (event)
statusCode = 200
return {
"statusCode": statusCode,
"body": json.dumps(["ansible", "jenkins", "docker", "k8s"]),
"headers": {