Kubernetes是一个开源项目,它把谷歌的集群管理工具引入到虚拟机和裸机场景中。它可以完美运行在现代的操作系统环境(比如CoreOS和Red Hat Atomic),并提供可以被你管控的轻量级的计算节点。Kubernetes使用Golang开发,具有轻量化、模块化、便携以及可扩展的特点。我们(Kubernetes开发团队)正在和一些不同的技术公司(包括维护着Mesos项目的MesoSphere)合作来把Kubernetes升级为一种与计算集群交互的标准方式。Kubernetes重新实现了Google在构建集群应用时积累的经验。这些概念包括如下内容:
... ➦awesome是Linux平台出色的窗口管理器,具有速度快、界面简捷等优点。其安装也比较简单:
sudo apt-get install -y awesome awesome-extra gnome-settings-daemon nautilus
sudo apt-get install -y --no-install-recommends gnome-session
mkdir -p ~/.config/awesome
常用快捷键整理:
切换程序
切换到下一个程序:Mod4 + j
切换到上一个程序:Mod4 + k
切换到主窗口中的第一个程序:Mod4 + Ctrl + Return
切换tag
切换到上一个选择的tag:Mod4 + Esc
切换到某个指定的tag:Mod4 + 1-9
切换到前一个tag:Mod4 + Left
切换到下一个tag:Mod4 + Right
程序窗口状态修改
最大化/非最大化:Mod4 + m
浮动/平铺:Mod4 + Ctrl + Space
最小化:Mod4 + n
从最小化中恢复:Mod4 + Ctrl + n
关闭程序:Mod4 + Shift + C
程序窗口的转移和显示
转移到某个tag:Mod4 + Shift + 1-9(或在某个tag名上按Mod4+鼠标左键)
增加到某些tag:Mod4 + Shift + Ctrl + 1-9
转移到下一个窗口中的位置:Mod4 + Shift + j
转移到上一个窗口中的位置:Mod4 + Shift + k
布局修改
当前程序窗口宽度增加5%:Mod4 + Shift + h
当前程序窗口宽度减少5%:Mod4 + Shift + l
切换到下一种布局方式:Mod4 + Space
切换到上一种布局方式:Mod4 + Ctrl + Space
窗口管理
重启awesome:Mod4 + Ctrl + r
退出awesome:Mod4 + Shift + q
运行某个命令:Mod4 + r
打开awesome菜单:Mod4 + w
多显示器下的操作
切换到下一个屏幕:Mod4 + Ctrl + j
切换到上一个屏幕:Mod4 + Ctrl + k
将程序发送到下一个屏幕:Mod4 + o
awk '{print NR, $0}' filename
awk '{$1=NR; print}' filename
awk '{print $1,$2}' fielname
awk '{print $NF}' filename
awk 'NF>0{print $0}' filename
awk 'NF>4{print $0}' filename
awk '/test.*/{print $0}' filename
awk '$1 ~ /^print.*/{print $0}' filename
awk 'BEGIN{sum=0}{sum+=$2}END{print sum}' filename
awk '{sum=0; for(i=1;i<=NF;i++)sum+=$i; print sum}' filename
awk '{n = split($0, array); print array[1], array[3]} ' filename
awk '{x[NR]=$0} END{for(i=NR;i>0;i--)print x[i]}' filename
awk '{amount[$1]=$2} END{for(name in amount) print name, amount[name]}' filename
A curated list of awesome big data frameworks, resources and other awesomeness. Inspired by awesome-php, awesome-python, awesome-ruby, hadoopecosystemtable & big-data.
Your contributions are always welcome!
Note: There is some term confusion in the industry, and two different things are called “Columnar Databases”. Some, listed here, are distributed, persistent databases built around the “key-map” data model: all data has a (possibly composite) key, with which a map of key-value pairs is associated. In some systems, multiple such value maps can be associated with a key, and these maps are referred to as “column families” (with value map keys being referred to as “columns”).
... ➦运行locale命令
LANG=
LANGUAGE=
LC_CTYPE=“POSIX”
LC_NUMERIC=“POSIX”
LC_TIME=“POSIX”
LC_COLLATE=“POSIX”
LC_MONETARY=“POSIX”
LC_MESSAGES=“POSIX”
LC_PAPER=“POSIX”
LC_NAME=“POSIX”
LC_ADDRESS=“POSIX”
LC_TELEPHONE=“POSIX”
LC_MEASUREMENT=“POSIX”
LC_IDENTIFICATION=“POSIX”
LC_ALL=
修改profile
vi /etc/profile
添加如下内容
export LC_ALL=en_US.UTF-8
source /etc/profile
得到错误 setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
运行 dpkg-reconfigure locales
得到错误
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = “en_US.UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
his tutorial will show you how to bring up a single node Mesos cluster all provisioned out using Docker containers (a future post will show how to easily scale this out to multi nodes or see the update on the bottom). This means that you can startup an entire cluster with 7 commands! Nothing to install except for starting out with a working Docker server.
This will startup 4 containers:
As mentioned the only prerequisite is to have a working Docker server. This means you can bring up a local Vagrant box with Docker installed, use Boot2Docker, use CoreOS, instance on AWS, or however you like to get a Docker server.
... ➦Capabilities in Linux are flags that tell the kernel what the application is allowed to do, If you have no additional security mechanism in place, the Linux root user has all capabilities assigned to it. As capabilities are a way for running processes with some privileges, without having the need to grant them root privileges, it is important to understand that they exist.
Consider the ping utility. It is marked setuid root on some distributions, because the utility requires the (cap)ability to send raw packets. This capability is known as CAP_NET_RAW. However, thanks to capabilities, you can now mark the ping application with this capability and drop the setuid from the file. As a result, the application does not run with full root privileges anymore, but with the restricted privileges of the user plus one capability, namely the CAP_NET_RAW.
... ➦Docker 是 dotCloud 最近几个月刚宣布的开源引擎,旨在提供一种应用程序的自动化部署解决方案,简单的说就是,在 Linux 系统上迅速创建一个容器(类似虚拟机)并在容器上部署和运行应用程序,并通过配置文件可以轻松实现应用程序的自动化安装、部署和升级,非常方便。因为使用了容器,所以可以很方便的把生产环境和开发环境分开,互不影响,这是 docker 最普遍的一个玩法。更多的玩法还有大规模 web 应用、数据库部署、持续部署、集群、测试环境、面向服务的云计算、虚拟桌面 VDI 等等。
... ➦At Socketplane we started out as four guys with a collectively strong belief in open source and open communities. We aligned around a shared vision that we wanted to be a critical part of Docker’s once in a decade disruption. Now that we are part of the Docker team, we couldn’t be happier.
We never looked to hedge our bets, our success was and obviously still is tied to the success of Docker. While there are many reasons that we decided to join the team, first and foremost Docker is unlike any other projects we have worked on in the past; the focus on user experience and simplicity is unmatched. Our early work with Docker during the open network design sprints gave us clear indications that the Docker maintainers were interested in being good open source stewards for the networking community in a project with an already staggering community of users and contributors. We also saw a genuine desire from Docker leadership to do right by both, individual contributors and the ecosystem. That made it all the more easy to jump in head first.
... ➦腾讯内部对Docker有着广泛的使用,其基于Yarn的代号为Gaia的调度平台可以同时兼容Docker和非Docker类型的应用,并提供高并发任务调度和资源管理,它具有高度可伸缩性和可靠性,能够支持MR等离线业务。
... ➦