##Getting Started ####download
- download the jar: https://prestodb.io/docs/current/installation/cli.html
- move it to some directory and
cdto that directory - rename the jar file
presto
####launching presto
cdto directory withprestojar file- run
| [prod] | |
| aws_secret_access_key = redacted | |
| aws_access_key_id = redacted | |
| [tf_temp] | |
| [tf] | |
| credential_process = sh -c 'mfa.sh arn:aws:iam::{account_id}:role/{role} arn:aws:iam::{account_id}:mfa/{mfa_entry} prod 2> $(tty)' |
| def COLOR_MAP = [ | |
| 'SUCCESS': 'good', | |
| 'FAILURE': 'danger', | |
| ] | |
| properties([pipelineTriggers([githubPush()])]) | |
| pipeline { | |
| agent any | |
| environment { | |
| //put your environment variables |
| #!/bin/bash | |
| COMMAND="$1" | |
| TF_FILE="$2" | |
| usage(){ | |
| echo "Usage: $0 (plan|apply|destroy) [tf-filename]" | |
| } | |
| resource "azurerm_resource_group" "example" { | |
| name = "example-resources" | |
| location = "West US 2" | |
| } | |
| data "azurerm_client_config" "current" { | |
| } | |
| resource "azurerm_kubernetes_cluster" "example" { | |
| name = "example-aks1" |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "route53:ListHostedZones", | |
| "route53:GetChange" | |
| ], | |
| "Resource": [ |
| import boto3 | |
| import datetime | |
| client = boto3.client('ec2', region_name='us-west-2') | |
| regions = [x["RegionName"] for x in client.describe_regions()["Regions"]] | |
| print(regions) | |
| INSTANCE = "t3.xlarge" | |
| print("Instance: %s" % INSTANCE) | |
| results = [] | |
| for region in regions: | |
| client = boto3.client('ec2', region_name=region) |
| for n in $(kubectl get -o=name namespaces | cut -f 2 -d "/"); do | |
| for o in $(kubectl get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob --namespace $n); do | |
| mkdir -p $(dirname $o) | |
| kubectl get -o=yaml --export $o --namespace $n >$o.yaml | |
| done | |
| done |
| #/!bin/bash | |
| print_kubernetes_resource() { | |
| printf "\n\nGlobal\n======" | |
| resource_count=$(expr $(kubectl api-resources --namespaced=false | wc -l) - 1) | |
| resources=$(kubectl api-resources --namespaced=false | tail -n $resource_count | awk '{print $1}') | |
| for resource in $resources; do | |
| printf "\n\nChecking $resource...\n" | |
| kubectl get $resource | |
| done |
| LOG_GROUP_NAME=xxxxxxxxxxx | |
| AWS_ACCESS_KEY_ID=xxxxxxxxxxx | |
| AWS_SECRET_ACCESS_KEY=xxxxxxxxxxx | |
| AWS_REGION=ap-northeast-1 |
##Getting Started ####download
cd to that directorypresto####launching presto
cd to directory with presto jar file