This file contains hidden or 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
| # keras imports for the dataset and building our neural network | |
| from keras.datasets import fashion_mnist | |
| from keras.models import Sequential | |
| from keras.layers import Dense, Dropout, Conv2D, MaxPool2D, Flatten | |
| from keras.utils import np_utils | |
| from keras.callbacks import Callback | |
| # to calculate accuracy | |
| from sklearn.metrics import accuracy_score | |
| import numpy as np |
This file contains hidden or 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
| //Describing Provider | |
| provider "aws" { | |
| region = "ap-south-1" | |
| profile = "rg" | |
| } |
This file contains hidden or 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
| //Creating Key | |
| resource "tls_private_key" "tls_key" { | |
| algorithm = "RSA" | |
| } | |
| //Generating Key-Value Pair | |
| resource "aws_key_pair" "generated_key" { | |
| key_name = "rg-env-key" | |
| public_key = "${tls_private_key.tls_key.public_key_openssh}" | |
This file contains hidden or 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
| //Creating Variable for AMI_ID | |
| variable "ami_id" { | |
| type = string | |
| default = "ami-0447a12f28fddb066" | |
| } | |
| //Creating Variable for AMI_Type | |
| variable "ami_type" { | |
| type = string | |
| default = "t2.micro" |
This file contains hidden or 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
| //Creating Security Group | |
| resource "aws_security_group" "web-SG" { | |
| name = "Terraform-SG" | |
| description = "Web Environment Security Group" | |
| //Adding Rules to Security Group | |
| ingress { | |
| description = "SSH Rule" | |
| from_port = 22 |
This file contains hidden or 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
| #Github gist by Rohit Ghumare to augment and create replicas of images | |
| [ | |
| { | |
| "dst": "$data", | |
| "src": [ | |
| "Dataset/*" | |
| ], | |
| "action": "data", | |
| "settings": { | |
| "classes_mapping": "default" |
This file contains hidden or 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 centos:latest | |
| run yum install wget -y | |
| run yum install net-tools -y | |
| run wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo | |
| run rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key | |
| run yum upgrade -y | |
| run yum install java -y | |
| run yum install jenkins -y |
This file contains hidden or 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" { | |
| region = "ap-south-1" | |
| profile = "EKS" | |
| } | |
| resource "aws_iam_role" "eks_cluster" { | |
| name = "ViRocluster" | |
| assume_role_policy = <<POLICY |
This file contains hidden or 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
| apiVersion: eksctl.io/v1alpha5 | |
| kind: ClusterConfig | |
| metadata: | |
| name: ViRocluster | |
| region: ap-south-1 | |
| nodeGroups: | |
| - name: ng1 | |
| desiredCapacity: 2 | |
| instanceType: t2.micro | |
| ssh: |
This file contains hidden or 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
| //Creating EBS Snapshot | |
| resource "aws_ebs_snapshot" "ebs_snapshot" { | |
| volume_id = "${aws_ebs_volume.web-vol.id}" | |
| description = "Snapshot of our EBS volume" | |
| tags = { | |
| env = "Production" | |
| } | |
| depends_on = [ | |
| aws_volume_attachment.ebs_att |
OlderNewer