Skip to content

Instantly share code, notes, and snippets.

View harryge00's full-sized avatar

Haoyuan Ge harryge00

  • Ant Financial
  • Hangzhou
View GitHub Profile
@harryge00
harryge00 / prom.yaml
Created February 25, 2019 15:58
prom config
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'istio-mesh'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets:
- istio-telemetry.marathon.slave.mesos:31093
- istio-telemetry.marathon.slave.mesos:31422
@harryge00
harryge00 / nettools.json
Last active April 16, 2019 08:13
nettools
{
"packages":[
{
"packagingVersion":"3.0",
"name":"nettools",
"version":"3.0.7-0.0.1",
"maintainer":"[email protected]",
"description":"This is a single nettools container, which is suited for HA setups. nettools is a popular in-memory data structure store, used as database, cache and message broker.. See documentation for more details: https://github.com/dcos/examples/tree/master/nettools ",
"website":"http://nettools.io",
"framework":false,
个人指标4860个,单位指标741个。参与本期摇号的个人有效编码数802454个, 1个人摇不中概率0.9939435780742573,两个人都摇不中概率 0.9879238363950571
@harryge00
harryge00 / gcr镜像mirror
Created June 12, 2019 17:44
mirror gcr fuck GFW
gcr.mirrors.ustc.edu.cn/
gcr.mirrors.ustc.edu.cn/distroless/static
@harryge00
harryge00 / mesos-CLI.md
Last active July 15, 2019 09:50
mesos client cli exec

Mesos-CLI agent插件说明

为了支持直接和 mesos-agent 交互,并执行 exec/list/attach 这些命令,在 src/python/cli_new 中添加了新的插件 agent-container。 命令用法如下:

# mesos agent-container list
Container ID                          Executor ID                                                Framework ID                                 
89bf1287-c1d9-495d-97e7-654fb5258009  nginx.e37ad665-9df4-11e9-8529-a620e9d3bf81                 961adbe5-65e7-4bdf-a6c8-acf7540dc6b2-0000  
2830ea3d-b974-4774-8f44-cc3abef3c13d  testucr.9ed70b92-9db7-11e9-8529-a620e9d3bf81               961adbe5-65e7-4bdf-a6c8-acf7540dc6b2-0000
@harryge00
harryge00 / mesos-container.md
Last active June 25, 2019 08:29
mesos container

mesos-container

为了能使用 mesos-container, 需要在 mesos-slave 配置isolation, image_providers, containerizers 等: 一种办法是在 /etc/default/mesos-slave 中添加如下内容:

MESOS_IMAGE_PROVIDERS=docker
MESOS_CONTAINERIZERS=docker,mesos
MESOS_ISOLATION=cgroups/cpu,cgroups/mem,cgroups/devices,cgroups/pids,cgroups/blkio,disk/du,network/cni,filesystem/linux,docker/runtime,volume/sandbox_path,volume/secret,posix/rlimits,namespaces/pid,linux/capabilities

也可以在 /etc/mesos-slave 目录下单独添加

@harryge00
harryge00 / mesos-framework.md
Created July 19, 2019 05:59
teardown mesos framework
echo "hello, remote user!"
sleep 10
echo "hello, remote user!"
@harryge00
harryge00 / backup.sh
Created July 29, 2019 01:33
cassandra backup
if [ -z $JMX_PORT ]; then
export JMX_PORT=7199
echo "set JMX_PORT to default value: $JMX_PORT"
fi
if [ -d python-dist ]; then
export PATH=$MESOS_SANDBOX/python-dist/bin:$PATH ;
fi
@harryge00
harryge00 / update-node.sh
Created August 31, 2019 11:33
redis cluster update-node.sh
#!/bin/sh
REDIS_NODES="/data/nodes.conf"
sed -i -e "/myself/ s/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/${HOST}/" ${REDIS_NODES}
exec "$@"