macOS 10 Install Consul standalone 單機模式 - IT 484

macOS 10 Install Consul standalone 單機模式 – IT 484

  • Post author:
  • Post category:IT / Consul
  • Post comments:0 Comments
  • Post last modified:2023-02-18

實作架設 Server ,從套件庫下載安裝,可以大幅地節省工程師開發與部署的時間,使用 Homebrew 來達成,這是最簡單的方法。

功能簡介

Consul 是一個服務網格解決方案,提供了一個功能齊全的控制平面,具有服務發現、中心配置、健康檢測功能。這些功能中的每一項都可以單獨使用,也可以一起使用來構建一個完整的服務網格。

主機架構

建置單台的主機架構。

Node IP Port
Master 192.168.1.100 8500

安裝套件

macOS 10 Install Consul standalone

從套件庫,使用 brew 命令安裝。

brew tap hashicorp/tap
brew install hashicorp/tap/consul

運行管理

啟動服務

安裝完成後,並不會自動啟動服務,使用 brew services start 命令來啟動服務。

brew services start hashicorp/tap/consul

停止服務

啟動服務後,使用 brew services stop 命令終止服務運行。

brew services stop hashicorp/tap/consul

狀態驗證

Install Consul macOS 啟動服務後,使用 brew services info 命令來查看服務狀況。

brew services info hashicorp/tap/consul 
consul (homebrew.mxcl.consul)
Running: v
Loaded: v
Schedulable: x
User: admin
PID: 592   

測試網址

http://localhost:8500/ui

此頁面表示服務工作正常。它還包括有關重要服務文件和目錄位置的一些基本訊息,該服務已安裝並運行,現在可以登入管理頁面來管理該服務。

心得分享

macOS Install Consul 快速安裝後,便於個人電腦、筆電在開發研究或測試時使用,省略複雜的設定,所以沒有參數需要調整,簡單快速建置就能使用服務,除此之外還有其他平台:

發佈留言