Skip to content

Instantly share code, notes, and snippets.

Avatar

Efe Karakus efekarakus

View GitHub Profile
@efekarakus
efekarakus / env-addons-proposal.md
Created Dec 9, 2021
Draft proposal to support Environment Addons in AWS Copilot
View env-addons-proposal.md

Today, users can associate new AWS resources to a single microservice through service addons [1]. However, there are resources such as Application Load Balancers or Elastic File Systems that are designed to be shared by multiple consumers. Today, Copilot provides a managed experience for sharable resources via the manifest file with the http, alias, or efs fields.

This document proposes a way for users to create their own sharable resources between microservices so that they are not blocked on the Copilot team to support the integration.

Target use cases

AWS resources that are meant to be shared typically (and ideally should) support a “decoupling layer”.

View sample-addon-with-s3-policy.yaml
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Name:
Type: String
Description: The name of the service, job, or workflow being deployed.
@efekarakus
efekarakus / redis.yml
Created Apr 23, 2021
Addon template to create an Elasticache cluster
View redis.yml
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Name:
Type: String
Description: The name of the service, job, or workflow being deployed.
View withrotation.template.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: 'CloudFormation Template to create Aurora Postgresql Cluster DB Instance'
###############################################################################
# Parameters
###############################################################################
Parameters:
ParentVPCStack:
@efekarakus
efekarakus / db.template.yaml
Created Oct 4, 2020
Aurora Serverless Template for Addons
View db.template.yaml
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Name:
Type: String
Description: The name of the service, job, or workflow being deployed.
View gist:db0faa4bd48b6acb395280b8f3c23016
[Container] 2019/04/26 16:56:32 Running command make integ-test
Installing dependencies...
go get github.com/wadey/gocovmerge
Building ecs-cli.test...
env -i PATH=$PATH GOPATH=$GOPATH GOROOT=$GOROOT GOCACHE=$GOCACHE \
go test -coverpkg ./ecs-cli/modules/... -c -tags testrunmain -o ./bin/local/ecs-cli.test ./ecs-cli
Running integration tests...
go test -tags integ ./ecs-cli/integ/e2e/...
ok github.com/aws/amazon-ecs-cli/ecs-cli/integ/e2e 350.161s
# Our integration tests generate a separate coverage file for each CLI command.
@efekarakus
efekarakus / before.js
Last active Jun 1, 2017
closure-over-multiple-parameters
View before.js
// Before
function recordMetricOnCompletion(metricName, promise) {
const metric = Metric.newTimedMetric(metricName);
return promise
.then(values => {
metric.emitSuccess();
return Promise.resolve(values);
})
.catch(reason => {
@efekarakus
efekarakus / multiple-params-vs-closure-2.js
Created Jun 1, 2017
Multiple Parameters vs. Closure 2
View multiple-params-vs-closure-2.js
function getRecordedPromise(metricName) {
const metric = Metric.newTimedMetric(metricName);
return (promise) => {
return promise
.then(values => {
metric.emitSuccess();
return Promise.resolve(values);
})
.catch(reason => {
@efekarakus
efekarakus / multiple-params-vs-closure-1.js
Created Jun 1, 2017
Multiple Parameters vs. Closure 1
View multiple-params-vs-closure-1.js
function recordMetricOnCompletion(metricName, promise) {
const metric = Metric.newTimedMetric(metricName);
return promise
.then(values => {
metric.emitSuccess();
return Promise.resolve(values);
})
.catch(reason => {
metric.emitFailure();
@efekarakus
efekarakus / index.html
Last active Mar 1, 2017
Venn Diagram with d3js
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
g.A circle {
fill: brown;
fill-opacity: .5;
stroke: black;
}
g.B circle {