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
| aws cloudformation create-stack --template-url https://bucketname.s3.cn-north-1.amazonaws.com.cn/tmp/pipeline.yml --parameters ParameterKey=PipelineType,ParameterValue=Feature ParameterKey=ContainerImageSupport,ParameterValue=true ParameterKey=IsRepositoryExist,ParameterValue=true ParameterKey=RepositoryName,ParameterValue=clickstream-branch-main ParameterKey=RepositoryDescription,ParameterValue=xxx ParameterKey=BranchName,ParameterValue=ingestion-server-del-ecs --capabilities CAPABILITY_IAM --stack-name v5-test |
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
| const cloudFrontS3 = new CloudFrontToS3(this, 'control-plane', { | |
| insertHttpSecurityHeaders: false, | |
| cloudFrontDistributionProps: { | |
| comment: 'It is managed by ServerlessTODO app.', | |
| minimumProtocolVersion: SecurityPolicyProtocol.TLS_V1_2_2019, | |
| httpVersion: HttpVersion.HTTP2_AND_3, | |
| additionalBehaviors: { | |
| ['/prod/*']: { | |
| origin: new HttpOrigin(Fn.select(2, Fn.split('/', api.url)), { | |
| protocolPolicy: OriginProtocolPolicy.HTTPS_ONLY, |
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
| #!/bin/bash | |
| set -euxo pipefail | |
| BUCKET=aws-gcr-solutions-assets | |
| mirror-helm() { | |
| local repoName=$1 | |
| local chartName=$2 |
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
| aws logs put-resource-policy --policy-name AWSLogDeliveryWrite20150319 \ | |
| --policy-document ' | |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "AWSLogDeliveryWrite", | |
| "Effect": "Allow", | |
| "Principal": { | |
| "Service": "delivery.logs.amazonaws.com" |
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
| # 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 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
| #!/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 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
| #!/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 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
| # 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 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
| 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 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: gitops-cluster-prod | |
| region: ap-southeast-1 | |
| version: '1.21' | |
| karpenter: | |
| version: 0.4.3 | |
| createServiceAccount: true | |
| managedNodeGroups: |