Skip to content

Instantly share code, notes, and snippets.

View ismailyenigul's full-sized avatar

ismail yenigul ismailyenigul

View GitHub Profile
@ismailyenigul
ismailyenigul / traefikv2-custom-container-port.yml
Last active July 17, 2020 18:39
traefikv2 container with custom http port
traefik2 label for the container running service different than port 80 (ie 8080)
container_name: webserver
restart: always
labels:
- traefik.http.routers.websrv.rule=Host(`cloud.mydomain.com`)
- traefik.http.services.websrv.loadbalancer.server.port=8080

Keybase proof

I hereby claim:

  • I am ismailyenigul on github.
  • I am ismailyenigul (https://keybase.io/ismailyenigul) on keybase.
  • I have a public key ASCZFkmkSBZ0ztbsZgwq4zcLxuWFQRxi5bKRiKBXzVsTxQo

To claim this, I am signing this object:

@ismailyenigul
ismailyenigul / docker.Jenkinsfile
Created August 6, 2020 20:18
sample Jenkinsfile declarative pipeline to build/push docker image
pipeline {
environment {
imagename = "yenigul/hacicenkins"
registryCredential = 'yenigul-dockerhub'
dockerImage = ''
}
agent any
stages {
stage('Cloning Git') {
steps {
@ismailyenigul
ismailyenigul / jenkinspipeline-ecr.yml
Created August 13, 2020 07:13
Jenkins pipeline to build docker image and push to ecr
pipeline {
environment {
imagename = "ismailtest"
ecrurl = "https://828556645578.dkr.ecr.us-east-2.amazonaws.com"
ecrcredentials = "ecr:us-east-2:ecr-ismail"
dockerImage = ''
}
agent any
stages {
stage('Cloning Git') {
@ismailyenigul
ismailyenigul / cloudwatch-metrics-for-cloudtrail-logs.md
Last active September 2, 2020 08:15
Cloudtwatch Metrics for AWS Cloudtrail

Cloudtrail Changes

{ ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }

AWS Config Change

@ismailyenigul
ismailyenigul / jenkins-groovy-script-aws-ecr-list-images-by-date.md
Created September 25, 2020 17:16
Sorting AWS ECR images by date with Jenkins groovy script
@ismailyenigul
ismailyenigul / terraform-templatefile-tag-cloudformation.md
Created December 17, 2020 18:15
terraform templatefile and handling tags for cloudformation yaml

I used the following code block to add Tags into Cloudformation yaml file.

 %{~ if length(mytags) >0 ~}
      Tags:
     %{~ endif ~}
    %{~ for tag_key, tag_value in mytags ~}
        - Key: "${tag_key}"
          Value: "${tag_value}"
    %{~ endfor ~}
    
pipeline {
  agent any
     environment {
        AWS_REGION  = 'eu-west-1'
        GITCOMMIT="${env.GIT_COMMIT}"


    }
 //  options { 
@ismailyenigul
ismailyenigul / ekscloudwatch-aws-eks.md
Last active August 31, 2022 15:28
ekscloudwatch deployment and role for AWS EKS and Falco
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Action": [
                "logs:List*",
@ismailyenigul
ismailyenigul / sample-aws-multi-account-policies.md
Last active February 28, 2021 19:29
sample policies for aws multi-acount-with-assume-roles