Skip to content

Instantly share code, notes, and snippets.

View haosdent's full-sized avatar
:octocat:

haosdent haosdent

:octocat:
View GitHub Profile
@haosdent
haosdent / marathon_install.sh
Last active December 22, 2016 06:15
marathon_install.sh
#!/bin/sh
set -e
do_install() {
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-installer oracle-java8-set-default marathon
}
#!/bin/sh
set -e
#
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
# or:
# 'wget -qO- https://get.docker.com/ | sh'
#
# For test builds (ie. release candidates):
# 'curl -fsSL https://test.docker.com/ | sh'
@haosdent
haosdent / Crane代码学习.md
Created October 21, 2016 16:20
Crane代码学习

最近欠债比较多,很不好意思一直想写Crane的学习感受拖到现在才写。Crane是数人云最近开源的Docker管理面板,一开始出来的时候通过Github上的Demo连接试用学习了下,感觉平易近人,毫无学习成本,一贯的数人云产品风格,完全是一款从用户角度出发,解决用户痛点的好产品!而且这么好的产品竟然还以Apache 2.0 License开源,任何人都可以从Github clone源代码构建使用,简直是我们这群屌丝用户的福音。于是我迅速打开了终端,悄悄Clone了代码,不然哪天数人云把它闭源了,我就再也用不了这么好的产品了。Mesos/Marathon/K8S 请一边去,不认识你们。

git clone https://github.com/Dataman-Cloud/crane.git

怀着激动地心情clone了代码之后,我觉得我需要好好反省下自己,学习下数人云的大神们无私奉献的开源精神,所以我又悄悄地打开了编辑器,按耐着心中的喜悦从src 这个目录开始学习起Crane的代码,乍看之下,Crane代码结构明了,逻辑清晰。按照models, plugin, api等进行模块划分,让我们这种小白可以非常容易对 Crane的实现建立起大概的印象。而且其中测试用例完善,覆盖大部分代码。让人对Crane这个产品的质量有了充足的信心。

Crane中src的代码主要封装了对Docker SwarmKit的调用,并以API的形式提供给前端调用,当然后端还除了包括验证,配置管理。其中像WebSSH, FuzzySearch

@haosdent
haosdent / ubuntu_1404_source_list.txt
Created October 18, 2016 16:46
Ubuntu 14.04 apt source list
# deb cdrom:[Ubuntu-Server 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.3)]/ trusty main restricted
# deb cdrom:[Ubuntu-Server 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.3)]/ trusty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://tw.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
@haosdent
haosdent / MESOS-6165_stderr.txt
Created September 16, 2016 10:04
MESOS-6165_stderr
[23:32:52]W: [Step 10/10] I0915 23:32:52.347380 29518 cluster.cpp:157] Creating default 'local' authorizer
[23:32:52]W: [Step 10/10] I0915 23:32:52.350111 29518 leveldb.cpp:174] Opened db in 2.618094ms
[23:32:52]W: [Step 10/10] I0915 23:32:52.350518 29518 leveldb.cpp:181] Compacted db in 390273ns
[23:32:52]W: [Step 10/10] I0915 23:32:52.350536 29518 leveldb.cpp:196] Created db iterator in 3479ns
[23:32:52]W: [Step 10/10] I0915 23:32:52.350543 29518 leveldb.cpp:202] Seeked to beginning of db in 464ns
[23:32:52]W: [Step 10/10] I0915 23:32:52.350548 29518 leveldb.cpp:271] Iterated through 0 keys in the db in 364ns
[23:32:52]W: [Step 10/10] I0915 23:32:52.350558 29518 replica.cpp:776] Replica recovered with log positions 0 -> 0 with 1 holes and 0 unlearned
[23:32:52]W: [Step 10/10] I0915 23:32:52.350740 29532 recover.cpp:451] Starting replica recovery
[23:32:52]W: [Step 10/10] I0915 23:32:52.350931 29533 recover.cpp:477] Replica is in EMPTY status
[23:32:52]W: [Step 10/10] I0915 23:32:52.351176 29536 re
@haosdent
haosdent / MESOS-6165_stdout.txt
Created September 16, 2016 10:03
MESOS-6165_stdout
grep -v 'W:' test_ci.log
[23:32:52] : [Step 10/10] [ RUN ] MesosContainerizerSlaveRecoveryTest.CGROUPS_ROOT_PidNamespaceForward
[23:32:52] : [Step 10/10] Received SUBSCRIBED event
[23:32:52] : [Step 10/10] Subscribed executor on ip-172-30-2-144.ec2.internal.mesosphere.io
[23:32:52] : [Step 10/10] Received SUBSCRIBED event
[23:32:52] : [Step 10/10] Subscribed executor on ip-172-30-2-144.ec2.internal.mesosphere.io
[23:32:55] : [Step 10/10] [ OK ] MesosContainerizerSlaveRecoveryTest.CGROUPS_ROOT_PidNamespaceForward (3086 ms)
[23:32:55] : [Step 10/10] [ RUN ] MesosContainerizerSlaveRecoveryTest.CGROUPS_ROOT_PidNamespaceBackward
[23:32:55] : [Step 10/10] Executing pre-exec command '{"shell":true,"value":"mount -n --bind \/var\/empty\/mesos \/var\/run\/mesos\/pidns"}'
[23:32:55] : [Step 10/10] Executing pre-exec command '{"shell":true,"value":"mount none \/proc --make-private -o rec"}'
[ FAILED ] DockerRuntimeIsolatorTest.ROOT_DockerDefaultCmdLocalPuller
[ FAILED ] DockerRuntimeIsolatorTest.ROOT_DockerDefaultEntryptLocalPuller
[ FAILED ] ProvisionerDockerPullerTest.ROOT_LocalPullerShellCommand
[ FAILED ] CgroupsAnyHierarchyWithCpuMemoryTest.ROOT_CGROUPS_Listen
[ FAILED ] CgroupsAnyHierarchyWithPerfEventTest.ROOT_CGROUPS_Perf
[ FAILED ] CgroupsAnyHierarchyMemoryPressureTest.ROOT_IncreaseRSS
[ FAILED ] PerfEventIsolatorTest.ROOT_CGROUPS_Sample
@haosdent
haosdent / x_layout.keylayout
Last active June 7, 2024 04:37
Mac OS X Keyboard layout file, works in 10.11
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--
Data generated Wed Mar 23 01:35:41 2022
Generated by kluchrtoxml_64 build 203
-->
<!--Last edited by Ukelele version 351 on 2022-03-23 at 01:45 (GMT+8)-->
@haosdent
haosdent / rsub.sh
Created February 3, 2016 07:09
rsub
sudo wget -O /usr/bin/rsub https://raw.github.com/aurora/rmate/master/rmate
sudo chmod +x /usr/bin/rsub