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 | |
for user in $(aws iam list-users --output text | awk '{print $NF}'); do | |
aws iam list-access-keys --user $user --output text | |
done |
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
#-------------------------------------------------------------- | |
# Install Chamber | |
#-------------------------------------------------------------- | |
# Chamber is used to access secrets which are stored encrypted | |
# in aws ssm paramater store | |
# Get the latest version of Chamber | |
curl -s https://api.github.com/repos/segmentio/chamber/releases/latest \ | |
| grep "browser_download_url.*linux-amd64" \ |
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
# Does your build get stuck here: | |
# amazon-ebs: A new version of /boot/grub/menu.lst is available, but the version installed | |
# amazon-ebs: currently has been locally modified. | |
# amazon-ebs: | |
# amazon-ebs: 1. install the package maintainer's version | |
# amazon-ebs: 2. keep the local version currently installed | |
# amazon-ebs: 3. show the differences between the versions | |
# amazon-ebs: 4. show a side-by-side difference between the versions | |
# amazon-ebs: 5. show a 3-way difference between available versions |
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
[general] | |
state_file = /var/awslogs/state/agent-state | |
[/var/log/syslog] | |
file = /var/log/syslog | |
log_group_name = appname | |
log_stream_name = {instance_id}-/var/log/syslog | |
datetime_format = %b %d %H:%M:%S | |
[/var/log/tomcat8/catalina.out] |
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
apt-get -qq update | |
apt-get -qq -y install curl |
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
#============================================================== | |
# Vpc.tf | |
#============================================================== | |
# Create a VPC Peering connection and setup routes on both sides | |
# Create a VPC peering connection | |
resource "aws_vpc_peering_connection" "admin_dblink_peer" { |
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
image: geoscienceaustralia/autobots-terraform | |
pipelines: | |
branches: | |
master: | |
- step: | |
script: | |
- export TF_VAR_archive=appname-"$(date +%s)".tar.gz | |
- tar -cvzf $TF_VAR_archive appname | |
- export TF_VAR_stack_name=appname |
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 | |
# SSM agent | |
sudo apt-get update && sudo apt-get install -y build-essential | |
curl https://amazon-ssm-ap-southeast-2.s3.amazonaws.com/latest/debian_amd64/amazon-ssm-agent.deb -o /tmp/amazon-ssm-agent.deb | |
sudo dpkg -i /tmp/amazon-ssm-agent.deb | |
sudo systemctl start amazon-ssm-agent |
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
... | |
# Forward grafana logs to docker log collector | |
RUN ln -sf /dev/stdout /var/log/grafana.log | |
... |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ssm:DescribeAssociation", | |
"ssm:GetDeployablePatchSnapshotForInstance", | |
"ssm:GetDocument", | |
"ssm:GetParameters", |