I hereby claim:
- I am antonioned on github.
- I am antonioned (https://keybase.io/antonioned) on keybase.
- I have a public key ASBZGIT8PmMvElRCaVQ0r2d4PmskIGxFIKSesVkX-2l7rgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
while read d; | |
do | |
printf "\n\nName of task-definition: $d\n\n" >> ./task-definitions-results.txt | |
aws ecs describe-task-definition --task-definition $d --region us-west-2 | grep "AWS_KEY" >> ./task-definitions-results.txt | |
printf "\n\n------------------------------------------------\n\n" >> ./task-definitions-results.txt | |
done < definitions.txt |
#!/bin/bash | |
for r in REPO1 REPO2 REPO3 | |
do | |
cd $r | |
printf "\n\nName of repo: $r\n\n\n" >> ../repos-results.txt | |
git secrets --scan >> ../results.txt | |
printf "\n------------------------------------------------\n" >> ../repos-results.txt | |
cd ../ | |
done |
from __future__ import print_function | |
import boto3 | |
import time | |
def lambda_handler(event, context): | |
path = ["/*"] | |
print(path) | |
client = boto3.client('cloudfront') | |
invalidation = client.create_invalidation(DistributionId='ID_OF_THE_DISTRIBUTION', |
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = process.env.SLACK_WEBHOOK_URL // add the SLACK_WEBHOOK_URL to the env. variables in the Lambda | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; |
This is the .config file that I am using for installing, configuring and deploying sumologic to Elastic Beanstalk. | |
The file does all the neccessar changes to the sumologic files in order to install the Collector and start it with the accessid and accesskey that are set up in the Beanstalk env. variables. | |
After installing is done, all the files are edited so that the collector can use the Local File Configuration and read sources from the dev-sources.json file. | |
This is the one I am using for dev, the tests in the container command express that. You can set up the ENV_NAME with the name of your Beanstalk environment and run the commands only on the env you need. | |
A setup-sumo-prod.sh with production values can be set and run only on prod. |
#!/bin/sh | |
#for app label I am using the last commit on github, but because spaces pose a problem in S3, replace SPACE with an underscore _ | |
export APP_VERSION=`git log --oneline -n 1 | cut -c 1-90 | sed 's/ /_/g'` | |
pip install awscli | |
# clean build artifacts and create the application archive (also ignore any files named .git* in any folder) | |
git clean -fd | |
# precompile assets, ... | |
# zip the application | |
zip -x *.git* -r "${AWS_APP_NAME}-${APP_VERSION}.zip" . | |
# delete any version with the same name (based on the short revision) - optional |
Steps I did: | |
1. Launched a completely new environment on beanstalk running the ruby version that I need, 2.3 (in my case I needed an update from Ruby 2.2 to Ruby 2.3) - used the sample application for faster and easier launch. | |
2. SSH-ed into the new instance and installed all dependencies that my application needs (packages, dev tools etc.) - you can also do these in the .ebextensions directory | |
3. Created a custom AMI from the instance running ruby 2.3 with everything installed | |
4. Used the same command that Rohit posted but with some tweeks: | |
aws elasticbeanstalk update-environment --region "REGION" --environment-name "ENV_NAME" --solution-stack-name "64bit Amazon Linux 2018.03 v2.8.1 running Ruby 2.3 (Puma)" --option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=ImageId,Value="ami- | |
xxxxxxxx" |