Skip to content
/ ergo Public

运维效能工具devops tools

License

Notifications You must be signed in to change notification settings

ysicing/ergo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

二狗 2Go

Lines of Code GitHub Workflow Status (event) GitHub go.mod Go version (subdirectory of monorepo) GitHub commit activity GitHub all releases GitHub Go Report Card Releases docs

一款使用 Go 编写的轻量运维工具集,尽量减少重复工作,同时降低维护脚本的成本

兼容性:

  • 100% 支持 Debian 11
  • 100% 支持 Ubuntu 16+
  • 部分功能在macOS系上测试通过

二狗能干什么

  • 将常用脚本或者公有云操作抽象成cli命令, 简化工作
  • 插件化管理

安装

二进制安装

Github Release 下载已经编译好的二进制文件:

macOS安装

  • 支持brew方式
brew tap ysicing/tap
brew install ergo
  • 支持容器Docker
ysicing/ergo

Debian系安装

echo "deb [trusted=yes] https://debian.ysicing.me/ /" | sudo tee /etc/apt/sources.list.d/ergo.list
apt update
# 避免与源里其他ergo混淆,deb包为opsergo
apt-get install -y opsergo
ergo version

源码编译安装

  • 支持go v1.19+
# Clone the repo
# Build and run the executable
make build && ./dist/ergo_darwin_amd64

升级

# macOS
brew upgrade
# apt / debian
apt-get update
apt-get --only-upgrade install opsergo
# default
ergo upgrade
# other
ergo ops wget https://github.com/ysicing/ergo/releases/latest/download/ergo_linux_amd64
/root/.ergo/tmp/ergo_linux_amd64 experimental install

文档

具体参见文档

中国大陆用户

默认github相关资源使用ghproxy代理,可使用export NO_MIRROR=6wa6wa不使用代理加速地址

特性-插件

默认支持ergo-插件, 类似krew

# 列出已安装插件
ergo addons list
repo    name       version
ysicing docker     latest
ysicing dockercfg  latest
ysicing go         1.18.1
ysicing etcd       3.5
ysicing etcdctl    3.5.3
ysicing mysql      5.7
ysicing postgresql 14

# ergo-doge插件
cat /usr/local/bin/ergo-doge
#!/bin/bash
echo $@

# 使用
ergo doge haha
haha

# 插件仓库列表
ergo repo list
[info]   上次变更时间: 2022-04-26 00:03:13.617004838 +0800 CST
name    path                                                                        source
ysicing https://github.com/ysicing/ergo-index/releases/latest/download/default.yaml remote

# 列出远程插件
ergo addons search
Repo    Name
ysicing autok3s
ysicing cilium

其他开源项目

感谢以下项目

🎉🎉 赞助商

jetbrains

📊 Stats

Alt