閱讀筆記: 「goss, 一個簡易且迅速的 server 驗證工具」

1,576次阅读
没有评论

閱讀筆記: 「goss, 一個簡易且迅速的 server 驗證工具」

標題: 「goss, 一個簡易且迅速的 server 驗證工具」
類別: others
連結: https://github.com/aelsabbahy/goss

今天要介紹的是一個驗證工具 goss,該工具的目的非常簡單,讓系統管理員可以透過 YAML 的方式幫機器上的服務撰寫 Unit Testing
什麼情況會需要使用這類型工具?

舉例來說,當你今天部署了一個全新機器(手動/自動後),你安裝了下列軟體

  1. sshd
  2. nginx
  3. docker
  4. ….

同時你也根據需求事先創建了一些使用者,接者你想要驗證這些軟體與相關設定是否設定完成
最直覺的方式就是手動檢查,一個一個服務與設定人工檢查

而 goss 這套軟體的目的就是讓你用 YAML 的方式去撰寫你想要驗證的所有服務,可以用來驗證包含

  1. 使用者 (uid, gid, home, shell)
  2. Package: 系統是否有透過 rpm, de, pacman, apk 等安裝套件
  3. File: 檢查檔案資料夾是否存在
  4. Addr: 用來檢查 $IP:$Port 是否可以被存取
  5. Port: 用來檢查 $Port 是否有開啟
  6. DNS: 用來檢查是否可以解析特定 DNS
  7. Process: 檢查特定 Process 是否有開啟
  8. Mount: 檢查是 Mount Point 以及相關參數
  9. Kernel Param: 檢查 Kernel 參數
  10. …等

Goss 除了基本用法外,也有人基於其概念往上疊加 dgoss,用來驗證 Docker 的運行狀態,還有類似的 dcgoss,針對 docker-compose 來使用。
當然目前也很多人會透過 Ansible 的方式來自動化部屬,而 Ansible 本身其實也有相關的測試框架可以用來測試部署結果,所以到底要用哪類型的工具
來驗證 Server 等級的狀態就根據團隊需求與現有流程而定,比較沒有一個獨大的工具用法。

個人資訊

我目前於 Hiskio 平台上面有開設 Kubernetes 相關課程,歡迎有興趣的人參考並分享,裡面有我從底層到實戰中對於 Kubernetes 的各種想法

詳細可以參閱
線上課程詳細資訊: https://course.hwchiu.com/

另外,歡迎按讚加入我個人的粉絲專頁,裡面會定期分享各式各樣的文章,有的是翻譯文章,也有部分是原創文章,主要會聚焦於 CNCF 領域
https://www.facebook.com/technologynoteniu

如果有使用 Telegram 的也可以訂閱下列頻道來,裡面我會定期推播通知各類文章
https://t.me/technologynote

你的捐款將給予我文章成長的動力

Read More 

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 0
评论(没有评论)

文心AIGC

2023 年 3 月
 12345
6789101112
13141516171819
20212223242526
2728293031  
文心AIGC
文心AIGC
人工智能ChatGPT,AIGC指利用人工智能技术来生成内容,其中包括文字、语音、代码、图像、视频、机器人动作等等。被认为是继PGC、UGC之后的新型内容创作方式。AIGC作为元宇宙的新方向,近几年迭代速度呈现指数级爆发,谷歌、Meta、百度等平台型巨头持续布局
文章搜索
热门文章
手把手教你用AI 10分钟生成一个APP!零基础也能搞定

手把手教你用AI 10分钟生成一个APP!零基础也能搞定

今日,我将向大家展示DeepSeek的全新玩法——从零开始,利用AI创建一个完整的应用程序。借助DeepSee...
最新评论
ufabet ufabet มีเกมให้เลือกเล่นมากมาย: เกมเดิมพันหลากหลาย ครบทุกค่ายดัง
tornado crypto mixer tornado crypto mixer Discover the power of privacy with TornadoCash! Learn how this decentralized mixer ensures your transactions remain confidential.
ดูบอลสด ดูบอลสด Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
Obrazy Sztuka Nowoczesna Obrazy Sztuka Nowoczesna Thank you for this wonderful contribution to the topic. Your ability to explain complex ideas simply is admirable.
ufabet ufabet Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
ufabet ufabet You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
ufabet ufabet Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
热评文章
手把手教你用AI 10分钟生成一个APP!零基础也能搞定

手把手教你用AI 10分钟生成一个APP!零基础也能搞定

今日,我将向大家展示DeepSeek的全新玩法——从零开始,利用AI创建一个完整的应用程序。借助DeepSee...