イカのインストール

インストール済みのCentOS 7イカ

免責事項:この記事は従って、ブロガーオリジナル記事です。CC BY-SA 4.0再現著作権の契約を、元のソースのリンクと、この文を添付してください。
このリンク: https://blog.csdn.net/lzw06061139/article/details/51174588

ながら、ソフトウェアも不可欠監視、直感的に理解するために、クラスタの動作状態; CEPH SDSは、オープンソースソフトウェア、オープンソースは、最初のステップは、監視、操作及びメンテナンスが後ろのキーであるインストールすることができていますセファロ監視のためにその上に複数のZabbix、inkScope、イカなどを使用しています。以下のCentOS 7に詳細イカのインストールに説明します。

イカは、ソースパッケージを取得します

#> git clone https://github.com/ceph/calamari.git
#> git clone https://github.com/ceph/calamari-clients.git
#> git clone https://github.com/ceph/Diamond 

イカサーバRPMパッケージの構築

#> cd calamari
#> yum remove prelink //避免安装时出现cpio Dismatch 错误
#> ./build-rpm.sh

建設は、親ディレクトリのパスにrpmbuildのRPMインストールパッケージディレクトリを生成した後、

インストールのイカサーバー

#> cd ..    //从calamari目录退出到父目录
#> yum localinstall rpmbuild/RPMS/x86_64/calamari-server-1.3.1.1-101_g945d16a.el6.x86_64.rpm

建設およびインストールイカクライアント

インストールが依存します

#> yum install npm ruby rubygems ruby-devel
#> npm install -g grunt grunt-cli bower grunt-contrib-compass
#> gem update --system && gem install compass

ネットワーク上の理由に、宝石のソースの更新に失敗した場合は、次のように処理します。

#> gem sources 
#> gem sources -r https://rubygems.org/
#> gem sources -a https://ruby.taobao.org/ 
#> gem sources -u

コンパイルとイカのクライアントをインストールします

#> cd calamari-clients
#> make build-real 
#> make dist     //会在上级目录生成 calamari-clients_1.2.2.tar.gz tar包
#> cd ..         //返回calamari-client父目录
#> tar -zxvf calamari-clients_1.2.2.tar.gz //解压 #> mkdir -p /opt/calamari/webapp/content //创建目录 #> cd calamari-clients-1.2.2 //拷贝内容到下述目录 #>for dir in manage admin login dashboard do mkdir -p /opt/calamari/webapp/content/"$dir" cp -pr "$dir"/dist/* /opt/calamari/webapp/content/"$dir"/ done

場合はmake build-realネットワークパケットのダウンロードは、依存関係を失敗し、次のような理由の間に発生し、次のように、依存関係は例えば、利用可能な代替URLの1つに対応するファイルセットをダウンロードします。

phantomjs@1.9.18 install /datapool/calamari-clients/manage/node_modules/karma-phantomjs-launcher/node_modules/phantomjs //install.js目录 > node install.js Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 Saving to /datapool/calamari-clients/manage/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2 Receiving... Error making request. Error: connect ETIMEDOUT //GFW导致的下载超时 at errnoException (net.js:905:11) at Object.afterConnect [as oncomplete] (net.js:896:19)

(ここ淘宝網の源)、次のように置換アドレスがたinstall.jsをダウンロードすることができ、上記のエラーの依存関係phantomjs-1.9.8-linuxの-x86_64.tar.bz2が失敗したダウンロード:

var cdnUrl = process.env.npm_config_phantomjs_cdnurl || process.env.PHANTOMJS_CDNURL || 'http://npm.taobao.org/mirrors/phantomjs'

初期カラマリ

上記のプロセスの後、イカサーバとイカクライアントのインストールが完了すると、以下のように、我々は、最初の使用の前にイカイカの初期化を完了する必要があります。

#> calamari-ctl initialize

初期化プロセスは、サービスを再起動するために立ち往生して表示された場合は、3.0以上の監督にアップグレードする必要があります。

 #> git clone https://github.com/Supervisor/supervisor.git
 #> cd supervisor && python setup.py install 

イカのサーバーの構成

ファイアウォールを設定

### for salt-master 
#> iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 4505 -j ACCEPT 
#> iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 4506 -j ACCEPT 
### for carbon 
#> iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 2003 -j ACCEPT #> iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 2004 -j ACCEPT

認証の設定saltstack

CEPHノード上の塩手先のサービスが起動したら、それは、塩マスターからの認証を要求します。あなたはイカのサーバー上で次のコマンドのキー塩手先のリストを表示することができます。

#> salt-key -L

ただ、イカを作ることができるように、受け入れられないキーリストの後に表示されます塩手先サービスセファロノードを開始し、認証がsaltstackノードによって、これらの鍵管理CEPHに必要です。

#> salt-key -A

インストールのダイヤモンドと塩、手先

ダイヤモンドのrpmパッケージの構築

#> cd Diamond
#> git checkout origin/calamari
#> make rpm      //在dist目录下生成diamond-3.4.67-0.noarch.rpm 包

すべてのノードのCEPHに取り付けられた塩手先とダイヤモンド

ただインストールパッケージに関連付けられたコマンドを実行CEPHすべてのノードにコピーされた最初の構築ダイヤモンドrpmパッケージ:

#> yum localinstall diamond-3.4.67-0.noarch.rpm
#> yum install -y salt-minion

すべてのノードに塩手先を設定し、CEPHを開始

#> touch /etc/salt/minion.d/calamari.conf 
###calamari-server-name为calamari 服务器的地址(ip或域名)
#> echo "master: {calamari-server-name}" > /etc/salt/minion.d/calamari.conf    
### :与后面的地址间有个空格
#> echo "master: {calamari-server-name}" >> /etc/salt/minion #> service salt-minion restart #> service diamond start 

ダイヤモンドは起動に失敗した場合、ダイヤモンドは以下のエラーをログ参照してください。

#> tail -f /var/log/diamond/diamond.log
[2015-11-03 19:06:35,044] [MainThread] pysnmp.entity.rfc3413.oneliner.cmdgen failed to load

次のように改正、ルートダイヤモンドサービスとして実行してください:

#> echo "user=root,group=root" >> /etc/diamond/diamond.conf

インストール構成のこれまでイカ監視が完了すると、あなたはその後、状態CEPH Webクラスタ上で見ることができます。文字だけの小さな問題であるならば、それは以下のトラブルシューティングでそれを見ていきます!

これらのピットは踏ま

Q:ログファイルに次のエラーダイヤモンド:

-- Unit diamond.service has begun starting up.
Nov 03 18:46:27 ceph-osd2 diamond[3790]: Failed to acquire lockfile: /var/lock/subsys/diamond. Nov 03 18:46:27 ceph-osd2 diamond[3790]: Held by 14377 Nov 03 18:46:27 ceph-osd2 diamond[3790]: [FAILED] Nov 03 18:46:27 ceph-osd2 systemd[1]: diamond.service: control process exited, code=exited status=1 Nov 03 18:46:27 ceph-osd2 systemd[1]: Failed to start LSB: System statistics collector for Graphite.

以下のようなファイルのは/ var /ロック/ SUBSYSディレクトリを削除します。

#> rm -f /var/lock/subsys/*

Q:500エラーWebページを開き
1)があるかもしれませんクトゥルフ・マネージャ・プロセスが起動していない、再起動の監督などを

#> /usr/bin/python /usr/bin/supervisord -c /etc/supervisord.conf

2)ログは/ var / log /イカ/ *を記述するためのアクセス許可がない可能性があり

#> chmod 766 /var && chmod -R 766 /var/calamari

Q:オープン/ダッシュボード/ページは常に(5)内部サーバーエラーを報告し、次のエラーログ:

 #> vi /var/log/calamari/calamari.log
 2015-11-05 20:25:39,252 - ERROR - django.request Internal Server Error: /api/v1/cluster/4a4dd60f-c8bb-4982-a1b4-9b891f78c30b/osd Traceback (most recent call last): File "/opt/calamari/venv/lib/python2.6/site-packages/django/core/handlers/base.py", line 117, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/opt/calamari/venv/lib/python2.6/site-packages/rest_framework/viewsets.py", line 78, in view return self.dispatch(request, *args, **kwargs) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_rest_api-0.1-py2.6.egg/calamari_rest/views/rpc_view.py", line 94, in dispatch return super(RPCViewSet, self).dispatch(request, *args, **kwargs) File "/opt/calamari/venv/lib/python2.6/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs) File "/opt/calamari/venv/lib/python2.6/site-packages/rest_framework/views.py", line 399, in dispatch response = self.handle_exception(exc) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_rest_api-0.1-py2.6.egg/calamari_rest/views/rpc_view.py", line 111, in handle_exception return super(RPCViewSet, self).handle_exception(exc) File "/opt/calamari/venv/lib/python2.6/site-packages/rest_framework/views.py", line 396, in dispatch response = handler(request, *args, **kwargs) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_rest_api-0.1-py2.6.egg/calamari_rest/views/v1.py", line 423, in get osds, osds_by_pg_state = self.generate(pg_summary, osd_map, server_info, servers) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_rest_api-0.1-py2.6.egg/calamari_rest/views/v1.py", line 371, in generate for osd_id, osd_pg_summary in pg_summary['by_osd'].items(): TypeError: 'NoneType' object is unsubscriptable #> vi /var/log/calamari/cthulhu.log 2015-11-04 17:38:59,278 - ERROR - cthulhu Exception handling message with tag ceph/cluster/4a4dd60f-c8bb-4982-a1b4-9b891f78c30b Traceback (most recent call last): File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_cthulhu-0.1-py2.6.egg/cthulhu/manager/cluster_monitor.py", line 244, in _run self.on_heartbeat(data['id'], data['data']) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_cthulhu-0.1-py2.6.egg/cthulhu/gevent_util.py", line 35, in wrapped return func(*args, **kwargs) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_cthulhu-0.1-py2.6.egg/cthulhu/manager/cluster_monitor.py", line 346, in on_heartbeat cluster_data['versions'][sync_type.str]) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_cthulhu-0.1-py2.6.egg/cthulhu/manager/cluster_monitor.py", line 99, in on_version self.fetch(reported_by, sync_type) File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_cthulhu-0.1-py2.6.egg/cthulhu/manager/cluster_monitor.py", line 109, in fetch client = LocalClient(config.get('cthulhu', 'salt_config_path')) File "/usr/lib/python2.6/site-packages/salt/client/__init__.py", line 136, in __init__ listen=not self.opts.get('__worker', False)) File "/usr/lib/python2.6/site-packages/salt/utils/event.py", line 114, in get_event return MasterEvent(sock_dir, opts) File "/usr/lib/python2.6/site-packages/salt/utils/event.py", line 559, in __init__ super(MasterEvent, self).__init__('master', sock_dir, opts) File "/usr/lib/python2.6/site-packages/salt/utils/event.py", line 181, in __init__ self.get_event(wait=1) File "/usr/lib/python2.6/site-packages/salt/utils/event.py", line 410, in get_event ret = self._get_event(wait, tag, tags_regex) File "/usr/lib/python2.6/site-packages/salt/utils/event.py", line 351, in _get_event socks = dict(self.poller.poll(wait * 1000)) File "/opt/calamari/venv/lib/python2.6/site-packages/zmq/green/poll.py", line 81, in poll select.select(rlist, wlist, xlist) File "/opt/calamari/venv/lib/python2.6/site-packages/gevent/select.py", line 68, in select result.event.wait(timeout=timeout) File "/opt/calamari/venv/lib/python2.6/site-packages/gevent/event.py", line 77, in wait result = self.hub.switch() File "/opt/calamari/venv/lib/python2.6/site-packages/gevent/hub.py", line 337, in switch switch_out() File "/opt/calamari/venv/lib/python2.6/site-packages/calamari_cthulhu-0.1-py2.6.egg/cthulhu/gevent_util.py", line 15, in asserter raise ForbiddenYield("Context switch during `nosleep` region!")

 

saltstack(塩、塩・マスター、ために発生し 、塩、手先が) イカと互換性がありません。デフォルトのインストールの塩、2015年5月5日このバージョンのCentOSの7のシステムで、
この問題を解決するために、あなたはそのバージョンをアンインストールしてインストールする必要があります解決される問題の塩2014.1.xバージョン、私は正常に動作し、塩2014.1.13-1をインストールし、塩は以下のサイトからダウンロードできます。http://rpmfind.net/

Q:ダイヤモンド次のエラーがログファイルに表示されます。

#> tail -f /var/log/diamond/diamond.log
 GraphiteHandler: Failed to connect to 10.168.122.165:2003. timed out.

1)これは、ファイアウォールの問題である可能性があり、あなたは、ファイアウォールの設定を表示することができます
。おそらく、問題をルーティングし、設定したルーティングを閲覧することができます)2
)3。クトゥルフマネージャ可能性があり、サーバー・プロセスが起動しない、あなたがプロセスを開始することができます

Q:インストールの塩手先は、次のエラーを報告しました。

Error: Package: python-msgpack-0.4.6-1.el6.x86_64 (epel)
           Requires: python(abi) = 2.6 Installed: python-2.7.5-16.el7.x86_64 (@anaconda) python(abi) = 2.7 python(abi) = 2.7

その後のpython2.6をインストールし、インストール塩、手先はPythonのバージョン2.6を指定する場合

configure --with-python2.6=/usr/local/python2.6

おすすめ

転載: www.cnblogs.com/flytor/p/11425135.html