- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone git@github.com:owner/git.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/* | |
k8s-create-deployment.go | |
https://gist.github.com/ffledgling/62814ccbb12fd6b9ab6fd89da7e80cd2 | |
*/ | |
import ( | |
"encoding/json" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"time" | |
"k8s.io/klog" | |
"k8s.io/api/core/v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See http://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
// ${workspaceRoot} the path of the folder opened in VS Code | |
// ${file} the current opened file | |
// ${fileBasename} the current opened file's basename | |
// ${fileDirname} the current opened file's dirname | |
// ${fileExtname} the current opened file's extension | |
// ${cwd} the task runner's current working directory on startup | |
{ | |
"version": "0.1.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
# Method 1: Install using rpm packages (credit to DarkMukke) | |
# | |
rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm | |
rpm --import http://mirror.ghettoforge.org/distributions/gf/RPM-GPG-KEY-gf.el7 | |
# WARNING: removing vim-minimal uninstalls `sudo` if you skip the second step | |
# make sure to at least run `yum install sudo` | |
yum -y remove vim-minimal vim-common vim-enhanced |
Mesos-dns是 mesos 服务发现工具,能查找app的Ip,端口号以及master,leader等信息。在Apache Mesos 集群中,允许应用程序和服务通过域名系统(DNS)来相互定位。Mesos-DNS 的特点是轻量、无状态,易于部署和维护。Mesos-DNS 将每个集群中正在运行的应用程序的域名转换成IP 地址和端口号。这使得任何链接到集群中运行的服务都可以通过DNS 进行查找。 Mesos-DNS是简单和无状态的,它不需要一致性机制,持久存储或日志复制,因为应用所需的心跳,健康监控或生命周期管理等功能都已经由Master、Agent和框架所提供。Mesos-DNS可以通过使用像Marathon这样的框架来实现容错,可以监控应用程序运行状况并在应用出现故障时重新启动它。Mesos-DNS因故障重新启动时,无需进一步协调它会从Master节点检索最新的应用状态,然后处理DNS请求。可以通过增加Master节点,即可提高可用性并为大规模集群中的DNS请求提供负载均衡。
Mesos-DNS 可以装在Mesos集群的任意一台机器上,或者是在同一网络的一台专用机器上。为了实现HA,可以在多个master上分别部署mesos-dns 实例。
wget https://github.com/mesosphere/mesos-dns/releases/download/v0.6.0/mesos-dns-v0.6.0-linux-amd64
sudo mv mesos-dns-v0.6.0-linux-amd64 /usr/local/bin/
##ss-redir 的 iptables 配置(透明代理)
透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则
创建 /etc/ss-redir.json 本地监听 7777
运行ss-redir -v -c /etc/ss-redir.json
iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个