こんにちは、cloudpack の @dz_ こと大平かづみです。
Prologue - はじめに
前回「Serf - Getting Started ~ ドキュメントを読んでみます」に引き続き、Serf のドキュメントを読み進めます。
ここで読み解いた内容は、こちら「Serf はじめての運用ツール 〜 インストールとエージェント起動」にまとめています。Amazon Linux でのインストールメモもあります。
併せてご覧いただけると嬉しいです。
Serf: インストール
インストールについて、「Install Serf」を読みます。
https://serfdom.io/intro/getting-started/install.html
Serf must first be installed on every node that will be a member of a Serf cluster. To make installation easy, Serf is distributed as a binary package for all supported platforms and architectures. This page will not cover how to compile Serf from source.
"Serf は、Serfクラスタのメンバーになるどのノード上においても初めてインストールされるはずです。インストール作業を簡単にするため、Serfはバイナリパッケージとして配布しています。このページでは、ソースからSerfをコンパイルする手順は記載していません。"
インストール手順
Installing Serf
To install Serf, find the appropriate package for your system and download it. Serf is packaged as a "zip" archive.
"Serfをインストールするには、あなたのシステムに適切なパッケージをダウンロードしてください。Serfは、zipアーカイブでパッケージングされています。"
After downloading Serf, unzip the package. Copy the serf binary to somewhere on the PATH so that it can be executed. On Unix systems,
~/bin
and/usr/local/bin
are common installation directories, depending on if you want to restrict the install to a single user or expose it to the entire system. On Windows systems, you can put it wherever you would like.
"Serfをダウンロードしたら、パッケージを解凍してください。
serf
のバイナリをPATHが通っていて実行できるディレクトリにコピーしてください。Unixシステムなら、~/bin
か /usr/local/bin
が標準的なインストール用のディレクトリです。シングルユーザで利用するかシステム全体で利用するかで、選択して下さい。Windowsシステムなら、どこに配置してもかまいません。"
OS X へのインストール
OS X
If you are using homebrew as a package manager, than you can install serf as simple as:brew cask install serf
if you are missing the cask plugin you can install it with:brew install caskroom/cask/brew-cask
"パッケージ管理に homebrew を使っているなら、このようにシンプルにインストールできます: brew cask install serf
もし、caskプラグイン がない場合はこのようにインストールできます: brew install caskroom/cask/brew-cask
"
インストール の確認
Verifying the Installation
After installing Serf, verify the installation worked by opening a new terminal session and checking thatserf
is available. By executingserf
you should see help output similar to that below:
"Serfをインストールしたら、新しいターミナルセッションを開いて、 serf
が利用可能かチェックして、インストールが問題ないか確認してください。 serf
を実行することで、以下のようなヘルプの出力を見られるでしょう:"
$ serf
usage: serf [--version] [--help] <command> [<args>]
Available commands are:
agent Runs a Serf agent
event Send a custom event through the Serf cluster
force-leave Forces a member of the cluster to enter the "left" state
info Provides debugging information for operators
join Tell Serf agent to join cluster
keygen Generates a new encryption key
keys Manipulate the internal encryption keyring used by Serf
leave Gracefully leaves the Serf cluster and shuts down
members Lists the members of a Serf cluster
monitor Stream logs from a Serf agent
query Send a query to the Serf cluster
reachability Test network reachability
tags Modify tags of a running Serf agent
version Prints the Serf version
If you get an error that
serf
could not be found, then your PATH environmental variable was not setup properly. Please go back and ensure that your PATH variable contains the directory where Serf was installed.
"もし serf
が見つからなくてエラーになった場合、おそらくPATHの環境変数が設定されないのかもしれません。あなたのPATH変数の中に、Serfがインストールされているディレクトリが含まれているか、再度確認してください。"
Otherwise, Serf is installed and ready to go!
"何はともあれ、Serf インストール完了、準備完了!"
Epilogue - おわりに
引き続き、「Run the Agent」を読んでいきますよー!
Qiita での Serf 関連記事はこちらです。
Serf まとめ、Amazon Lambda について、こちらで記事書いているのでもしご興味あればどうぞ!