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/sh | |
| echo `env` | |
| echo `ls` | |
| git fetch --tags | |
| git checkout master | |
| git pull origin master | |
| git branch release-$PROMOTED_GIT_COMMIT $PROMOTED_GIT_COMMIT | |
| git clean -f | |
| case $INCREMENT_VERSION in |
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
| { | |
| "Arts & Entertainment":[ | |
| "Books & Literature", | |
| "Celebrity Fan/Gossip", | |
| "Fine Art", | |
| "Humor", | |
| "Movies", | |
| "Music", | |
| "Television" | |
| ], |
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 bash | |
| # | |
| # Rails console script that can be run on AWS Elastic Beanstalk. | |
| # | |
| # Run this script from the app dir (/var/app/current) as root (sudo script/aws-console) | |
| # | |
| set -xe | |
| EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) |
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
| console.log('Loading function'); | |
| var AWS = require('aws-sdk'), | |
| s3 = new AWS.S3(), | |
| s3Bucket = 'archive-bucket', | |
| s3Prefix = 'kinesis-archive-test', | |
| s3Partitions = 2; | |
| exports.handler = function (event, context) { | |
| //console.log(JSON.stringify(event, null, 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
| #!/bin/bash | |
| # chkconfig: 2345 95 20 | |
| # description: This application was developed by me and is tested on this server | |
| # processname: my_app | |
| # | |
| # Tomcat 8 start/stop/status init.d script | |
| # Initially forked from: https://gist.github.com/valotas/1000094 | |
| # @author: Miglen Evlogiev <[email protected]> | |
| # | |
| # Release updates: |
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
| var AWS = require('aws-sdk'); | |
| exports.handler = function(event, context) { | |
| var cloudsearchdomain = new AWS.CloudSearchDomain({endpoint: 'doc-dev-cinch-accounts-ltmqj5gt5mjb5hg5eyqaf2v5hu.us-east-1.cloudsearch.amazonaws.com'}); | |
| var documents = event.Records.map(function(record) { | |
| var data = {id : record.dynamodb.Keys.id.S}; | |
| if (record.eventName === 'REMOVE') { | |
| data.type = 'delete' |
I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.
UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.
This works for me with CircleCI and EB Cli.
{
"Version": "2012-10-17",
"Statement": [
{This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.
If you are using the Circle CI 2.0, take a look at this article from ryansimms
On Project Settings > Environment Variables add this keys:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
The aws user must have the right permissions. This can be hard, maybe, this can help you.
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 | |
| # .ebextensions/scripts/db_migrate.sh | |
| . /opt/elasticbeanstalk/hooks/common.sh | |
| EB_SUPPORT_FILES=$(/opt/elasticbeanstalk/bin/get-config container -k support_files_dir) | |
| EB_CONFIG_DOCKER_ENV_ARGS=() | |
| while read -r ENV_VAR; do | |
| EB_CONFIG_DOCKER_ENV_ARGS+=(--env "$ENV_VAR") |