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 | |
PROFILE=$1 | |
STACKNAME=$2 | |
BUCKET=$3 | |
AWS_PROFILE=$PROFILE aws cloudformation update-stack --stack-name $STACKNAME \ | |
--template-url https://s3.amazonaws.com/$BUCKET/cf.master.yml \ | |
--parameters ParameterKey=Environment,UsePreviousValue=true \ | |
--capabilities CAPABILITY_NAMED_IAM \ |
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
[profile name] | |
aws_access_key_id=XXX123 | |
aws_secret_access_key=YYY123 |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "1522663820850", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:PutObject", | |
"s3:GetObject" | |
], |
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
#!/usr/bin/env node | |
const AWS = require('aws-sdk') | |
const async = require('async') | |
const fs = require('fs') | |
const path = require('path') | |
const program = require('commander') | |
const s3 = new AWS.S3({apiVersion: 'latest'}) | |
const cfDir = path.join(__dirname, '..', 'cloudformation') |
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
#!/usr/bin/env node | |
const AWS = require('aws-sdk') | |
const program = require('commander') | |
const stackName = ({stackNamespace, stackEnvironment}) => `${stackNamespace}-${stackEnvironment}` | |
const listStacks = (options) => { | |
const {region, stackNamespace, stackEnvironment} = options | |
const stackname = stackName(options) |
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
language: node_js | |
node_js: | |
- "8" | |
install: | |
- npm install | |
script: | |
- npm run test | |
- scripts/upload-stack.js -b antklim-cf-templates/simple-api -v $TRAVIS_BUILD_NUMBER | |
- travis_wait scripts/deploy-stack.js -r ap-southeast-2 -n simple-api -e dev -b antklim-cf-templates/simple-api -v $TRAVIS_BUILD_NUMBER |
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
syntax = "proto3"; | |
package pb; | |
service Greeter { | |
rpc Greeting(GreetingRequest) returns (GreetingResponse) {} | |
} | |
message GreetingRequest { | |
string name = 1; |
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
package main | |
import ( | |
"context" | |
"encoding/json" | |
"log" | |
"net/http" | |
proto "github.com/antklim/go-microservices/go-micro-greeter/pb" | |
"github.com/micro/go-micro/client" |
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
package main | |
import ( | |
"log" | |
pb "github.com/antklim/go-microservices/go-micro-greeter/pb" | |
"github.com/micro/go-micro" | |
"golang.org/x/net/context" | |
) |
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
package greeterservice | |
// Service describe greetings service. | |
type Service interface { | |
Health() bool | |
Greeting(name string) string | |
} | |
// GreeterService implementation of the Service interface. | |
type GreeterService struct{} |