Skip to content

Instantly share code, notes, and snippets.

View xiaods's full-sized avatar
🌏
Coding for Fun

Deshi Xiao xiaods

🌏
Coding for Fun
View GitHub Profile
@xiaods
xiaods / README.md
Last active August 29, 2015 14:17 — forked from rfc1459/README.md

Fix memory cgroup configuration for lxc-docker on Ubuntu 14.04

Step 1: enable hierarchical memory management

Drop memory-cg.conf into /etc/init. The upstart job will ensure that the memory cgroup is configured with hierarchical stats tracking before systemd-logind and/or docker start creating cgroups.

(Yes, it's mostly a crude hack with an obscure way of syncing with cgroup-lite. That can't be helped, though)

# ZooKeeper
$ sudo docker run --net=host jplock/zookeeper:3.4.6
#Mesos-Master
## It's important to specify --ip=<ip> and --hostname=<ip> parameters
$ sudo docker run --net=host mesosphere/mesos-master:0.21.0-1.0.ubuntu1404 --ip=10.42.0.1 --hostname=10.42.0.1 --zk=zk://10.42.0.1:2181/mesos --work_dir=/opt/ --quorum=1
#Mesosphere-Marathon
@xiaods
xiaods / sparkOnShurenyun.md
Last active October 15, 2015 03:16 — forked from cfmcgrady/sparkOnMesos.md
玩转Spark on 数人云

###RUN SPARK ON 数人云

###单机版

  • Mesos运行在host上
  • Spark driver 和 executor运行docker上

#####1.搭建Mesos集群环境 详情 ,登录数人云,登录控制台后,通过集群管理创建自己的集群 #####2.运行Spark demo

@xiaods
xiaods / dki
Created October 16, 2015 02:30 — forked from itoffshore/dki
Create Docker data-only container + container with static ip address
#!/bin/sh
##############################################
data_paths=/srv/dockerdata/debuild:/build #
data_name=debdata #
data_image=user/debdata #
bridge=br0 #
ipfile=/etc/default/docker_ips #
##############################################
@xiaods
xiaods / gist:55142ccedbe4f25628a3
Created November 6, 2015 17:23
Zookeeper Performance way for shurenyun.co
# 下载测试包
git clone https://github.com/brownsys/zookeeper-benchmark.git
# build bench tools
mvn -DZooKeeperVersion=3.4.6 package
# run benchmark
java -cp target/lib/*:target/* edu.brown.cs.zkbenchmark.ZooKeeperBenchmark --conf benchmark.conf
@xiaods
xiaods / yh-shurenyun-install-tutorial.md
Last active November 20, 2015 00:05
永洪BI产品数人云安装方法

下载安装包

文件名为YonghongBI.sh

使用java:8镜像为基础容器镜像

dsxiao@omegamaster1:~$ docker images java
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
java 8 de4a13c84f53 8 days ago 641.9 MB
@xiaods
xiaods / gist:a86ed470969d3dc344c2ef2adaa45a32
Created February 3, 2017 20:53 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

@xiaods
xiaods / mesos-7210-testcase.md
Last active April 5, 2017 23:34
MESOS-7210_test-case-steps

firstly install minimesos, then use minimesos to get overrall mesos image. then stop all containers.

HOST_IP=172.28.128.3


### Mesos Master
./bin/mesos-master.sh --hostname=${HOST_IP} --ip=${HOST_IP} --zk=zk://${HOST_IP}:2181/mesos --port=5050 --quorum=1 --work_dir=/tmp/mesos --log_dir=/tmp/log/mesos
@xiaods
xiaods / create-docker-tls.sh
Last active June 10, 2017 11:28 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
yum update
yum install -y tar wget
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
cat <<EOF > /etc/yum.repos.d/wandisco-svn.repo
[WANdiscoSVN]
name=WANdisco SVN Repo 1.9
enabled=1
baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/