View tomcat7.spec
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
# To Build: | |
# | |
# sudo yum -y install rpmdevtools && rpmdev-setuptree | |
# | |
# wget https://gist.github.com/stuart-warren/8859980/raw/a6ec61ce0c03c69638fa85dcdb8d1f1a5a559e51/tomcat7.spec -O ~/rpmbuild/SPECS/tomcat7.spec | |
# wget https://raw.github.com/nmilford/rpm-tomcat7/master/tomcat7.init -O ~/rpmbuild/SOURCES/tomcat7.init | |
# wget https://raw.github.com/nmilford/rpm-tomcat7/master/tomcat7.sysconfig -O ~/rpmbuild/SOURCES/tomcat7.sysconfig | |
# wget https://raw.github.com/nmilford/rpm-tomcat7/master/tomcat7.logrotate -O ~/rpmbuild/SOURCES/tomcat7.logrotate | |
# wget http://mirror.ox.ac.uk/sites/rsync.apache.org/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.tar.gz -O ~/rpmbuild/SOURCES/apache-tomcat-7.0.50.tar.gz | |
# rpmbuild -bb ~/rpmbuild/SPECS/tomcat7.spec |
View registry.service
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
[Unit] | |
Description=Docker Registry | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
ExecStart=/usr/bin/docker run -p 5000:5000 registry |
View run-individual-tcollector.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
stuart@LAPTOP:~/Workspace/git/tcollector$ PYTHONPATH=`pwd` python collectors/0/jolokia.py |
View docker-stdout
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
Sometimes you want your container to log to stdout, but the process can only write to a file. | |
e.g. nginx | |
Simply create a symlink from the logfile you are writing to, to /proc/self/fd/1 or write directly to it. | |
Example: | |
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; |
View iso8601-date.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
# Wanted to output date for use with Logstash | |
# Using gnu date: | |
date -u +"%Y-%m-%dT%H:%M:%S.%3N%:z" | |
# Outputs: 2014-09-26T11:07:05.393+00:00 |
View Dockerfile
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 ubuntu:latest | |
## Run with: | |
# docker build -t golang . | |
# export GOPATH=/home/user.name/gostuff | |
# alias go='docker run -ti -v ${GOPATH}:${GOPATH} -e GOPATH=${GOPATH} -w ${PWD} golang' | |
# alias gofmt='docker run -ti -v ${GOPATH}:${GOPATH} -e GOPATH=${GOPATH} -w ${PWD} --entrypoint=/go/bin/gofmt golang' | |
# alias godoc='docker run -ti -v ${GOPATH}:${GOPATH} -e GOPATH=${GOPATH} -w ${PWD} --entrypoint=/go/bin/godoc golang' | |
# cd /project/within/GOPATH | |
# go get github.com/gin-gonic/gin |
View Dockerfile
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 ubuntu:14.04.1 | |
# docker build -t haproxybuild . | |
# git clone http://git.haproxy.org/git/haproxy-1.5.git | |
# cd haproxy-1.5 | |
# docker run -ti -v $(pwd):/src haproxybuild | |
RUN apt-get update && apt-get install -y build-essential libpcre3-dev libssl-dev | |
VOLUME /src |
View BufferedTLSTelnetAppender.java
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
View mesos-on-coreos.txt
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
# May need to use a better zookeeper container capable of clustering | |
# https://github.com/signalfuse/docker-zookeeper ? | |
docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 jplock/zookeeper | |
# See this for other config values | |
# http://mesos.apache.org/documentation/latest/configuration/ | |
docker run -d \ |
View es-thrift.go
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
package main | |
/* | |
* Example golang code to access Elasticsearch using Thrift | |
* gen-go directory generated with: | |
* ``thrift -gen go elasticsearch.thrift`` | |
*/ | |
import ( | |
"fmt" | |
"git.apache.org/thrift.git/lib/go/thrift" | |
"github.com/stuart-warren/es-thrift/gen-go/elasticsearch" // generated code |
OlderNewer