This file contains 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
# For the rpm-sign recipe, GoCD is injecting a secret GPG_PASSPHRASE | |
# into the environment. It should be fully compatible with Jenkins, Hudson, etc. | |
# | |
# For most CI systems, build artifacts need to be located within the working directory, | |
# so here the rpmbuild area is specified by _topdir and the default location (~/rpmbuild) | |
# is not used. | |
# | |
# The rpm and rpm-mock recipes require the source tar.gz archive for mypackage.spec to be | |
# available in target/rpmbuild/SOURCES. You can add your own recipe to achieve this and make | |
# it a dependency in the Makefile so this happens automatically. |
This file contains 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
# Inject environment variables into current shell | |
# Note: using jq's from_entries on the Key/Value pairs (capital K and V) format of Tags requires version 1.5 or higher | |
export INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id` | |
export STACK_NAME=`aws ec2 describe-instances --instance-ids $INSTANCE_ID --region us-east-1 \ | |
| jq --raw-output '.Reservations[0].Instances[0].Tags | from_entries | .["aws:cloudformation:stack-name"]'` | |
# Make it permanent | |
echo export INSTANCE_ID=$INSTANCE_ID > /etc/profile.d/awsinstance.sh |
This file contains 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
# /etc/rsyslog.d/31-elasticsearch.conf | |
# send syslog messages to logstash/kibana | |
module(load="omelasticsearch") # for outputting to Elasticsearch | |
# this is for index names to be like: logstash-YYYY.MM.DD | |
template(name="logstash-index" | |
type="list") { | |
constant(value="logstash-") | |
property(name="timereported" dateFormat="rfc3339" position.from="1" position.to="4") | |
constant(value=".") |
This file contains 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 -x | |
# Using s3 to host a yum repo has many advantages, but there is often | |
# a need to push new artifacts and update the metadata. To achieve | |
# this, we will mirror the s3 repo locally in a crafty way. We will | |
# grab the full repo metadata (in the repodata directory), but the packages | |
# will not be downloaded. Instead, the files will be created but will be | |
# EMPTY. This avoids large data sync's. | |
OPTIND=1 |
This file contains 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
FROM alpine:3.10 | |
RUN apk -v --no-cache --update add \ | |
musl-dev \ | |
gcc \ | |
python3 \ | |
python3-dev | |
RUN python3 -m ensurepip --upgrade \ | |
&& pip3 install --upgrade pip | |
RUN pip3 install --upgrade awscli aws-sam-cli | |
RUN pip3 uninstall --yes pip \ |