Code Monkey home page Code Monkey logo

ergo-2's Introduction

ergo

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

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

兼容性:

  • 100%兼容Debian 11+
  • macOS部分功能可用

ergo能干什么 / What does Ergo do?

  • 将常用脚本或者公有云操作抽象成cli命令, 简化工作
  • 灵活的自定义插件管理工具,像使用helm repo方式管理插件

安装使用

二进制安装

可直接从 release 下载预编译的二进制文件

macOS安装

brew tap ysicing/tap
brew install ergo

macOS升级

brew upgrade
或者
ergo upgrade

镜像使用

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

命令支持

  • cloud云服务商支持
    • cr 容器镜像服务
      • list
    • dns
      • domain
  • code 初始化项目
  • completion
  • cvm 腾讯云开临时测试机器
    • create / new / add
    • destroy / del / rm
    • snapshot
    • status
    • halt
    • up
    • ls / list
  • debian
    • apt 添加ergo debian源
    • init 初始化debian
    • upcore 升级debian内核
  • experimental
    • install 安装ergo二进制
  • ext
    • gh 清理github package
    • lima macOS虚拟机
    • sync 同步镜像
  • help
  • k3s
    • init 初始化k3s集群
    • join 加入集群
  • ops
    • ps 进程
    • nc nc
    • exec 执行命令
    • ping
  • plugin
    • install 安装插件
    • list 列出ergo插件
    • ls-remote 列出远程插件
  • repo 插件&服务仓库管理, 类似helm仓库
    • add-plugin 添加插件仓库
    • add-service 添加服务仓库
    • del 移除插件仓库
    • init 添加默认插件库或者服务库
    • list 列出插件仓库列表
    • update 更新插件索引
  • service
    • install 安装服务
    • list 列出安装服务
    • show 列出远程服务
    • dump dump安装文件
  • upgrade
  • version

ergo插件

默认支持ergo-插件

# 列出插件
ergo plugin list
[warn]   Unable to read directory "/Users/ysicing/bin" from your PATH: open /Users/ysicing/bin: no such file or directory. Skipping...
The following compatible plugins are available:
[info]   doge /usr/local/bin/ergo-doge
[info]   hello /Users/ysicing/.ergo/bin/ergo-hello

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

# 使用
ergo doge haha  
haha

# 插件仓库列表
ergo repo list
[info]   上次变更时间: 2021-10-13 15:37:18.782145 +0800 CST
NAME      URL                                                           
default   https://raw.githubusercontent.com/ysicing/ergo-plugin/master/default.yaml

# 列出远程插件
ergo plugin ls-remote 
[done] √ sync done.
Repo    NAME            URL                                                                                                             Desc                                                    Available
default tgsend-linux    https://github.techoc.workers.dev/https://github.com/mritd/tgsend/releases/download/v1.0.1/tgsend_linux_amd64   一个 Telegram 推送的小工具,用于调用 Bot API 发送告警等 false    
default tgsend-darwin   https://github.techoc.workers.dev/https://github.com/mritd/tgsend/releases/download/v1.0.1/tgsend_darwin_amd64  一个 Telegram 推送的小工具,用于调用 Bot API 发送告警等 true   

已知问题

  • Q: docker compose命令不识别

其他开源项目

感谢以下项目

🎉🎉 赞助商

jetbrains

ergo-2's People

Contributors

dependabot[bot] avatar ysicing avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.