Skip to content

Instantly share code, notes, and snippets.

Richard Hightower RichardHightower

Block or report user

Report or block RichardHightower

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View local_ip.md
curl http://169.254.169.254/latest/meta-data/local-ipv4
View example.md
~/github/akka-ec2-example
$ git status
On branch third-step-adding-akka-remote
Your branch is up-to-date with 'origin/third-step-adding-akka-remote'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        deleted:    userService/settings.gradle
@RichardHightower
RichardHightower / readme.md
Last active Nov 28, 2016
reading system logs from go
View readme.md
package main 

import (
	"os"
	"fmt"
	"github.com/coreos/go-systemd/sdjournal"
)
@RichardHightower
RichardHightower / aaa-readme.md
Last active Jun 4, 2019
Setting up aws log agent to send journalctl from DC/OS logs to Amazon Log Service
View aaa-readme.md

In this example, we are using Centos7, journalctl and systemctl so that we can monitor logs from DC/OS instances (masters, agents and public agents). It is useful for anyone using systemd, journald in an AWS EC2 enviroment that wants logging. The nice thing about Amazon CloudWatch is that it integrates well with Amazon EMR and Amazon Elasticsearch. (For more background on this subject see this article which covers using CloudFormation, Packr, etc. for Immutable Infrastructure to build DC/OS and deploy it to Amazon Web Services.)

We will install journald-cloudwatch-logs. We are going to setup a daemon into systemd that forwards logs to Amazon CloudWatch log streams.

This utility ***journald-cloudwat

@RichardHightower
RichardHightower / a_read_me_cloudformation_dcos.md
Last active Nov 11, 2016
Using CloudFormation, Packr, etc. for Immutable Infrastructure to build DC/OS and deploy it to Amazon Web Services
View a_read_me_cloudformation_dcos.md

We setup a dev env for DC/OS in AWS (subnets, multi-az, ags groups, ami images, etc), tagged everything as dcos-dev, and then used Cloudformer to generate a starter AWS CloudFormation script. Cloudformer allows you to reverse engineer your AWS environment into cloudformation scripts. We then modified what cloudformer produced (to make it work as cloudformer just gets you about 90% of the way there), and then we added mappings, parameters and outputs to our cloudformation script.

Included are the cloudformation and packer scripts. Hope it helps you get setup. Feedback is welcome.

We in this case is my client, DC/OS support, Amazon support, and I. We did this instead of using the canned Amazon support because we needed to run masters, and agents in [multiple AZs](http://docs.aws.amazon.co

@RichardHightower
RichardHightower / aaa-packer.md
Last active Nov 3, 2016
Immutable DC/OS CentOS AMI image creator using docker
View aaa-packer.md
View aws.cli.md

installing aws on a box (logged in as su)

mkdir /tmp/awscli; cd /tmp/awscli
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
 ./awscli-bundle/install -i /usr/lib/aws -b /usr/bin/aws
 
@RichardHightower
RichardHightower / ansible_java_ec2_install.md
Last active Mar 3, 2017
Using ansible to install Java on an ec2 box running in the cloud
View ansible_java_ec2_install.md

I am writing this down so I don't forget. I started this task but had to stop a few times, and then remember where I left off and at some point, others will need to know how to get started.

Install ansible

brew install ansible

Install Amazon EC2 Ansible integration tool

@RichardHightower
RichardHightower / logback.xml
Last active Aug 24, 2016
Java setup for Mesos/Gradle/QBit zip that uses logback/sl4j and virtual hosting
View logback.xml
<configuration>
<appender name="STASH-UDP" class="net.logstash.logback.appender.LogstashSocketAppender">
<host>${LOGSTASH_HOST:-192.168.99.100}</host>
<port>${LOGSTASH_PORT:-5001}</port>
<customFields>{"serviceName":"sample-dcos-qbit","serviceHost":"${HOST}","servicePort":"${PORT0}","serviceId":"sample-dcos-qbit-${HOST}-${PORT0}","serviceAdminPort":"${PORT1}"}</customFields>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
View install_docker.sh
## Setup docker repo
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo touch /etc/apt/sources.list.d/docker.list
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list
## Install Docker
sudo apt-get update
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
You can’t perform that action at this time.