This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Java Install | |
add-apt-repository ppa:openjdk-r/ppa | |
sudo apt update | |
sudo apt install openjdk-17-jre-headless -y | |
# Jenkins Install | |
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ | |
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install wget apt-transport-https gnupg lsb-release -y | |
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add - | |
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list | |
sudo apt-get update | |
sudo apt-get install trivy -y | |
#trivy --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Docker Install | |
sudo apt install docker.io -y | |
sudo chmod 666 /var/run/docker.sock | |
# SonarQube Install | |
docker run -d -p 9000:9000 sonarqube:lts-community |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
def lambda_handler(event, context): | |
response = event["servicename"] | |
match event["servicename"]: | |
case "ec2": | |
response = "Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2's simple web service interface allows you to obtain and configure capacity with minimal friction." | |
case "s3": | |
response = "Amazon Simple Storage Service (Amazon S3) is an object storage service offering industry-leading scalability, data availability, security, and performance." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Queue": "arn:aws:mediaconvert:region:account_id:queues/Default", | |
"UserMetadata": {}, | |
"Role": "arn:aws:iam::account_id:role/MediaConvert_Default_Role", | |
"Settings": { | |
"TimecodeConfig": { | |
"Source": "ZEROBASED" | |
}, | |
"OutputGroups": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use this for your user data (script from top to bottom) | |
# install httpd (Linux 2 version) | |
yum update -y | |
yum install -y httpd | |
systemctl start httpd | |
systemctl enable httpd | |
echo "<h1>Hello World from $(hostname -f)</h1>" > /var/www/html/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from constructs import Construct | |
from cdktf import App, NamedRemoteWorkspace, TerraformStack, TerraformOutput, RemoteBackend | |
from cdktf_cdktf_provider_aws import AwsProvider, s3 | |
class MyStack(TerraformStack): | |
def __init__(self, scope: Construct, ns: str): | |
super().__init__(scope, ns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VPC = 10.0.0.0/16 (demo-vpc) | |
Public Subnet = 10.0.1.0/24 (demo-public-subnet) | |
Private Subnet = 10.0.2.0/24 (demo-private-subnet) | |
Internet Gateway = (demo-igw) | |
Public Subnet Route Table = (demo-public-rt) | |
Enabled public subnet auto assign IPv4 address | |
Create 2 ec2 instance using ubuntu 20.04 | |
- Public (demo-public-ec2) | |
- Private (demo-private-ec2) | |
NAT Gateway = (demo-nat) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use Sanje\HelloComposer\Index; | |
$greeting = new Index(); | |
echo $greeting->greet("Hello Composer"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib3 | |
import json | |
http = urllib3.PoolManager() | |
def lambda_handler(event, context): | |
url = "" | |
msg = { | |
"channel": "", | |
"username": "WEBHOOK_USERNAME", | |
"text": event['Records'][0]['Sns']['Message'], | |
"icon_emoji" : "" |