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
from diagrams import Cluster, Diagram, Edge | |
from diagrams.aws.compute import EC2 | |
from diagrams.aws.database import RDS | |
from diagrams.aws.network import ELB, VPC, NATGateway, InternetGateway | |
from diagrams.aws.management import SystemsManager as SSM | |
from diagrams.onprem.client import Users | |
from diagrams.onprem.network import Internet | |
with Diagram("3 Tier Web Module", show=False): | |
users = Users("Users") |
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
def call(Map args) { | |
def containers = [ | |
containerTemplate(name: 'node', image: 'node', ttyEnabled: true), | |
containerTemplate(name: 'docker', image: 'docker', ttyEnabled: true), | |
containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:3.35-5-alpine', ttyEnabled: true) | |
] | |
def REGISTRY_CONFIG = [ | |
url: "https://hub.docker.com/repository/docker/marceloschirbel/jsl-medium", | |
credentials: "90f8072d-4194-4c7e-807b-90e4a4135093" | |
] |
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
@Library('libs@master') _ | |
parameters { | |
string(name: appOwner, defaultValue: false, description: '') | |
string(name: registry, defaultValue: false, description: '') | |
} | |
jobsMedium( | |
name: appOwner, | |
registry: registry |
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
releases: | |
- name: "jenkins" | |
namespace: "jenkins" | |
labels: | |
chart: "jenkins" | |
repo: "stable" | |
chart: "stable/jenkins" | |
wait: true | |
set: | |
- name: master.slaveListenerServiceType |
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 | |
apt update -y | |
apt install git curl wget vim | |
## install docker | |
curl -fsSL https://get.docker.com/ | bash | |
## install kubectl | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl |
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
variable "aws_access_key" { | |
default = "ACCESS" | |
} | |
variable "aws_secret_key" { | |
default = "SECRET" | |
} | |
variable "aws_key_path" { | |
default = "/root/terraform-ansible/terraform" | |
} | |
variable "aws_key_name" { |
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
resource "aws_instance" "nat" { | |
ami = "ami-0669a96e355eac82f" | |
availability_zone = "sa-east-1a" | |
instance_type = "m1.small" | |
key_name = "${var.aws_key_name}" | |
vpc_security_group_ids = ["${aws_security_group.nat.id}"] | |
subnet_id = "${aws_subnet.sa-east-1a-public.id}" | |
associate_public_ip_address = true | |
source_dest_check = false |
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
resource "aws_security_group" "nat" { | |
name = "vpc_nat" | |
description = "Can access both subnets" | |
ingress { | |
from_port = 80 | |
to_port = 80 | |
protocol = "tcp" | |
cidr_blocks = ["${var.private_subnet_cidr}"] | |
} |
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
resource "aws_vpc" "main_vpc" { | |
cidr_block = "${var.vpc_cidr}" | |
enable_dns_hostnames = true | |
tags { | |
Name = "terraform-aws-vpc" | |
} | |
} | |
resource "aws_eip" "nat" { | |
instance = "${aws_instance.nat.id}" |
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
provider "aws" { | |
access_key = "${var.aws_access_key}" | |
secret_key = "${var.aws_secret_key}" | |
region = "${var.aws_region}" | |
} |
NewerOlder