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
# set kubeconfig for your kind cluster | |
export KUBECONFIG=$HOME/.kube/kind | |
# create kind cluster | |
kind create cluster --name gitops | |
# provisioning flux | |
flux install --components-extra=image-reflector-controller,image-automation-controller --export > gotk-components.yaml | |
cat <<EOF > kustomization.yaml | |
apiVersion: kustomize.config.k8s.io/v1beta1 |
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 | |
set -euxo pipefail | |
publish_s3_assets() { | |
local name=$1 | |
local prefix=$2 | |
aws s3 ls s3://$name/$prefix --recursive | awk '{print $4}' | xargs -I {} -n 1 aws s3api put-object-acl --acl public-read --bucket $name --key {} | |
} |
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 -xe | |
create_repo() { | |
local name=$1 | |
local region=$2 | |
# create ecr repo | |
aws ecr create-repository --region $region --repository-name "$name" --image-tag-mutability IMMUTABLE --image-scanning-configuration scanOnPush=true --encryption-configuration encryptionType=AES256 2>/dev/null | |
# set repo permission |
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
# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# This file is licensed under the Apache License, Version 2.0 (the "License"). | |
# You may not use this file except in compliance with the License. A copy of the | |
# License is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# | |
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
# OF ANY KIND, either express or implied. See the License for the specific |
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 pandas as pd | |
import os | |
import glob | |
import logging | |
pandas_etl_data_dir = '/etl-diff/panda-output' | |
spark_etl_data_dir = '/etl-diff/spark-output' | |
def get_logger(name): | |
logger = logging.getLogger(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
apiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: gitops-cluster-prod | |
region: ap-southeast-1 | |
version: '1.21' | |
karpenter: | |
version: 0.4.3 | |
createServiceAccount: true | |
managedNodeGroups: |
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 -xe | |
create_repo() { | |
local name=$1 | |
local region=$2 | |
# create ecr repo | |
aws ecr create-repository --region $region --repository-name "$name" --image-tag-mutability IMMUTABLE --image-scanning-configuration scanOnPush=true --encryption-configuration encryptionType=AES256 2>/dev/null | |
# set repo permission |
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
# Amazon Neptune version 4 signing example (version v2) | |
# The following script requires python 3.6+ | |
# (sudo yum install python36 python36-virtualenv python36-pip) | |
# => the reason is that we're using urllib.parse() to manually encode URL | |
# parameters: the problem here is that SIGV4 encoding requires whitespaces | |
# to be encoded as %20 rather than not or using '+', as done by previous/ | |
# default versions of the library. | |
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
const standardPartitionCondition = new CfnCondition(this, 'IsStandardPartition', { | |
expression: Fn.conditionEquals(Aws.PARTITION, 'aws'), | |
}); | |
const dbUser = 'dashboard'; | |
const docDBCluster = new DatabaseCluster(this, 'DashboardDatabase', { | |
masterUser: { | |
username: dbUser, | |
}, | |
storageEncrypted: true, |
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
local-empty-dir/ |