Skip to content

Instantly share code, notes, and snippets.

@gkleiman
gkleiman / docker-compose.yml
Created May 4, 2021 18:08
ELK + filebeat local setup
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.2
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es01,es02,es03
@gkleiman
gkleiman / stats.md
Last active February 1, 2018 01:09
Mesos community stats

Contributor Breakdown by Organization and Releases

1.0.0...1.1.0: 1214 commits

  • Mesosphere: 23
  • Apple: 5
  • Other: 36
  • Microsoft: 2
  • Uber: 1
  • IBM: 7
  • Twitter: 2
@gkleiman
gkleiman / constraints.json
Last active October 25, 2017 13:49
MesosCon University App Definitions
{
"id": "/constraintstask",
"instances": 10,
"container": {
"type": "MESOS"
},
"cpus": 0.1,
"mem": 128,
"cmd": "sleep 100",
"constraints": [
---------- Forwarded message ---------
From: Kevin Klues <klueska@gmail.com>
Date: Sun, May 21, 2017 at 9:14 AM
Subject: Re: question ablout "Attach/Exec Support in Mesos"
To: 唐亮 <tangliang-xy@360.cn>
Hi Tangliang,
Unfortunately we only have support for `task exec` in the DC/OS CLI at the
moment. We have been planning to backport it to the Mesos CLI for some
package main
import (
"fmt"
"io"
"net/http"
"os"
"syscall"
"github.com/opencontainers/runc/libcontainer/system"
@gkleiman
gkleiman / mom.json
Created March 16, 2016 16:52
Marathon-on-Marathon
{
"id": "/marathon-test",
"cmd": "LIBPROCESS_PORT=$PORT1 && ./bin/start --checkpoint --decline_offer_duration 120000 --event_stream_max_outstanding_messages 50 --executor //cmd --failover_timeout 604800 --framework_name marathon-test --ha --http_event_callback_slow_consumer_timeout 10000 --http_port $PORT0 --launch_token_refresh_interval 30000 --launch_tokens 100 --leader_proxy_connection_timeout 5000 --leader_proxy_read_timeout 10000 --local_port_max 20000 --local_port_min 10000 --master zk://master.mesos:2181/mesos --max_tasks_per_offer 1 --mesos_leader_ui_url /mesos --metrics --min_revive_offers_interval 5000 --offer_matching_timeout 1000 --on_elected_prepare_timeout 180000 --reconciliation_initial_delay 15000 --reconciliation_interval 600000 --revive_offers_repetitions 3 --save_tasks_to_launch_timeout 3000 --scale_apps_initial_delay 15000 --scale_apps_interval 300000 --store_cache --task_launch_confirm_timeout 300000 --task_launch_timeout 300000 --disable_tracing --zk zk://master.mesos:2181/univer
@gkleiman
gkleiman / resident-tasks.md
Last active April 5, 2016 10:34
Resident Tasks tutorial

Using Resident Tasks (Persistent Storage) with Marathon v0.16.0

Requirements

  • Mesos version v0.28.0 or greater.
  • The connection between Mesos and Marathon has to be authenticated.

Setting up Mesos and Marathon

Configuring the Mesos Masters

@gkleiman
gkleiman / sort_pics.rb
Created August 29, 2013 23:05
Sort pictures by date
#!/usr/bin/env ruby
require 'fileutils'
require 'exifr'
def parse_options
if ARGV.size != 2
puts "Invalid parameters"
exit 1
end
class HasManyThroughExample < ActiveRecord::Migration
def self.up
create_table :user do |t|
t.string :name, :null => false
t.string :email
t.timestamps
end
User:
fields:
default: name, email, user
form: name, email, user
relationships: projects, third_party_projects
application: wide
Project:
fields:
default: name, user