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 | |
terraform destroy -var "project_id=$GOOGLE_CLOUD_PROJECT" -auto-approve |
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 | |
terraform apply -var "project_id=$GOOGLE_CLOUD_PROJECT" -auto-approve |
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
// define provider configuration variables | |
region = "us-central1" # region in which a ccluster is created | |
// define Kubernetes cluster variables | |
cluster_name = "node-svc-k8s" # cluster name | |
zone = "us-central1-c" # zone in which cluster nodes is created |
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 "google" { | |
version = "~> 3.37.0" | |
project = var.project_id | |
region = "us-central1-c" | |
} |
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 node:11 | |
# Create app directory | |
WORKDIR /app | |
# Install app dependencies | |
COPY package*.json ./ | |
RUN npm install | |
RUN npm install express | |
# If you are building your code for production | |
# RUN npm ci --only=production | |
# Bundle app source |
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
apiVersion: apps/v1 # implies the use of kubernetes 1.7 | |
# use apps/v1beta2 for kubernetes 1.8 | |
kind: Deployment | |
metadata: | |
name: node-svc-deployment | |
spec: | |
replicas: 5 | |
selector: | |
matchLabels: | |
app: node-svc |
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
AWSTemplateFormatVersion: 2010-09-09 | |
# Parameters: | |
# InstanceType: | |
# Description: Server instance type | |
# Type: String | |
# Default: t2.micro | |
# AllowedValues: | |
# - t2.micro | |
# - t2.medium | |
# ConstraintDescription: Must be a valid EC2 type. |
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 os | |
import json | |
import boto3 | |
import smtplib | |
import botocore | |
from datetime import datetime | |
from urllib.parse import urlparse | |
from email.message import EmailMessage | |
from email.mime.multipart import MIMEMultipart | |
#-----------------------------------------------------------------------------# |
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
TYPE=Ethernet | |
PROXY_METHOD=none | |
BROWSER_ONLY=no | |
BOOTPROTO=static | |
IPADDR=192.168.56.155 | |
NETMASK=255.255.255.0 | |
NETWORK=192.168.56.0 | |
BROADCAST=192.168.56.255 | |
DEFROUTE=yes | |
IPV4_FAILURE_FATAL=no |
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 python3 | |
import sys | |
assert sys.version_info >= (3, 0) | |
if sys.version_info < (3, 0, 0): | |
print('Pyhton version', sys.version, sep=' : ') | |
sys.stderr.write("You need python 3 or later to run this script") | |
exit(1) | |
#----------------------------------------------------------------------# | |
# This script can be used to evaluate two number: # |