sudo docker run -d --net=host --privileged --name=kubestack \
-v /sys:/sys:ro \
-v /:/rootfs:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run:/var/run:rw \
-v /var/lib/kubelet/:/var/lib/kubelet:rw \
-v /var/lib/docker/:/var/lib/docker:ro \
# Snippet of code to be put on ~/.bash_profile to help SSH into instances via Session Manager while specifying AWS profiles | |
# It can be used by saving ~/.ssm_bash_profile and adding the following line to ~/.bash_profile | |
# source ~/.ssm_bash_profile | |
function aws-ssm-instance-list { | |
if [ "$#" -lt 1 ]; then | |
echo "Usage: aws-ssm-instance-list <profile name>" | |
else | |
output=$(aws ssm describe-instance-information --profile $1 --query "InstanceInformationList[*].{Name:ComputerName,Id:InstanceId,IPAddress:IPAddress}" --output text) | |
echo "$output" |
#!/bin/bash | |
# stop on errors | |
set -e | |
# turn on debugging if you're running into issues | |
#set -x | |
# Static variables | |
ENVIRONMENT=$1 | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color |
#!/bin/bash -e | |
## | |
# Use this annotated script a base for launching an interactive console task on Amazon ECS | |
# | |
# more info: https://engineering.loyaltylion.com/running-an-interactive-console-on-amazon-ecs-c692f321b14d | |
# | |
# Requirements: | |
# - `jq` must be installed on both the client and server | |
## |
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
#!/usr/bin/env bash | |
set -e | |
function usage() { | |
set -e | |
cat <<EOM | |
##### ecs-run ##### | |
Simple script for running tasks on Amazon Elastic Container Service | |
One of the following is required: | |
Required arguments: |
create_resources("mail::domain", $domains) |
I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.
Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Basic port of my old rabbitmq+ruby global log tailer to redis+golang.
Still a go newb but it works. Probably lots of edge cases. Managed to port the bits to publish to a websocket instead of stdout. Plan on cleaning all that up and publishing it as two bits - the service and the client.
This is just a basic client. Totally insecure.
Note you would need to customize this. We have our own keys in our logstash events that are pointless to you.
This tool is primarily for our developers to be able to work with our production logs. They have access to our Kibana install but sometimes being able to just hit the command-line and use natural tools makes more sense. There's also an option to display stacktraces as well which is handy to be able to turn on or off.
I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.
As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin
and add the following group to the file /etc/cgconfig.conf
:
group browsers {
cpu {
# Set the relative share of CPU resources equal to 25%
cpu.shares = "256";
}