とあるSEの徒然日記

気になったことなど、徒然な日常をつづります。時々技術系もあるでよ

Debianで寝ている間にボランティア(科学技術計算支援)

さくらのクラウドを借りられたので、ECアプリサーバの構築をしてみようと思いました。

でもその前に、いつもやっているBOINCを入れてみます。

今回は、Debian6.0.5ですので、非常に簡単です。
パッケージが用意されているので、悩まなくても大丈夫です。
CentOSに入れる時は、足りないパッケージが結構あって困りました。

さて、さくらのクラウドですが、こちらもクリクリっとAWSなみに簡単にサーバが用意できます。
最近(2012/06/25)UIが変わって分かり易くなった気がします。
OSもさくらで用意したテンプレートから入れました。

サーバが起動してしまえば、後はコマンドをたたくのみです。

BOINCパッケージのインストール
#aptitude install boinc-client

GUIを利用しないのでclientのみ。
GUIを利用するなら、「boinc-manager」(だっけかな?)も追加でインストール。

必要なパッケージも一緒にインストールされるので、楽チンです。

インストールが終わったら動作状況を確認してみましょう。
# /etc/init.d/boinc-client status
Status of BOINC core client: running.
Scheduling of BOINC core client: 1499.
pid 1499's current scheduling policy: SCHED_IDLE
pid 1499's current scheduling priority: 0
OOM killer status for BOINC core client:.
PID 1499: adj 0, score 34914

running と出ているので、実行中なんでしょう。
このままでは、プロジェクトを何も処理しないのでプロジェクトを
割り当てます。
自分のアカウントは、プロジェクト証明書によると
SETI@home project since 30 July 1999 
と、これを書いている時点であと20日ほどで13年になります。
「宇宙人捜しは科学技術計算支援じゃねー!」と聞こえてきそうですが、
BOINCには多種多様な支援ができるのでとりあえずそこはスルーで(^^;)

プロジェクトの割り当てには、アカウントキーとURLが必要です。
コマンドの前に調べておきましょう。
また、支援のためにはアカウント登録が必要ですので、それぞれのサイトで
アカウント登録して準備しておいてください。
宇宙人捜しはSETI@homeです。
IBMが主催の科学技術計算支援World Community Grid - ホームです。

プロジェクトの登録もコマンドでやります。(サーバOSなのでGUIは使いません)boincのインストール先ディレクトリに降りて実行しました。

# cd /usr/bin/
# boinccmd --project_attach プロジェクトURL アカウントキー

boinccmdでステータスをみてみると
# boinccmd --get_state
======== Projects ========
1) -----------
name:
master URL: http://setiathome.berkeley.edu/
user_name:
team_name:
resource share: 100.000000
user_total_credit: 0.000000
user_expavg_credit: 0.000000
host_total_credit: 0.000000
host_expavg_credit: 0.000000
nrpc_failures: 0
master_fetch_failures: 0
master fetch pending: no
scheduler RPC pending: yes
attached via Account Manager: no
ended: no
suspended via GUI: no
don't request more work: no
disk usage: 0.000000
last RPC: 0.000000
project files downloaded: 0.000000

======== Applications ========

======== Application versions ========

======== Workunits ========

======== Results ========

なにやら動いているようですね。
少し時間を空けて、再実行してみました。
# /etc/bin/boinccmd --get_stateusretc
======== Projects ========
1) -----------
name: SETI@home
master URL: http://setiathome.berkeley.edu/
user_name: waka1
team_name: MidNightRunner
resource share: 100.000000
user_total_credit: 73835.717251
user_expavg_credit: 30.223408
host_total_credit: 0.000000
host_expavg_credit: 0.000000
nrpc_failures: 0
master_fetch_failures: 0
master fetch pending: no
scheduler RPC pending: no
attached via Account Manager: no
ended: no
suspended via GUI: no
don't request more work: no
disk usage: 0.000000
last RPC: 1341753309.522841
project files downloaded: 0.000000
GUI URL:
name: Message boards
description: Correspond with other users on the SETI@home message boards
URL: http://setiathome.berkeley.edu/forum_index.php
GUI URL:
name: Help
description: Ask questions and report problems
URL: http://setiathome.berkeley.edu/forum_help_desk.php
GUI URL:
name: Your account
description: View your account information and credit totals
URL: http://setiathome.berkeley.edu/show_user.php?userid=*****06
GUI URL:
name: Your preferences
description: View and modify your SETI@home account profile and preferences
URL: http://setiathome.berkeley.edu/home.php
GUI URL:
name: Your results
description: View your last week (or more) of computational results and work
URL: http://setiathome.berkeley.edu/results.php?userid=*****06
GUI URL:
name: Your computers
description: View a listing of all the computers on which you are running SETI@Home
URL: http://setiathome.berkeley.edu/hosts_user.php?userid=*****06
GUI URL:
name: Your team
description: View information about your team: MidNightRunner
URL: http://setiathome.berkeley.edu/team_display.php?teamid=******
GUI URL:
name: Donate
description: Donate to SETI@home
URL: http://setiathome.berkeley.edu/sah_donate.php

======== Applications ========
1) -----------
name: setiathome_enhanced
Project: SETI@home

======== Application versions ========
1) -----------
application: setiathome_enhanced
version: 6.03
project: SETI@home

======== Workunits ========
1) -----------
name: 01jl11ad.16151.8113.4.10.49
FP estimate: 47560000000000.000000
FP bound: 475600000000000.000000
memory bound: 33554432.000000
disk bound: 33554432.000000

======== Results ========
1) -----------
name: 01jl11ad.16151.8113.4.10.49_2
WU name: 01jl11ad.16151.8113.4.10.49
project URL: http://setiathome.berkeley.edu/
report deadline: Sun Jul 22 16:31:46 2012
ready to report: no
got server ack: no
final CPU time: 0.000000
state: 1
scheduler state: 0
exit_status: 0
signal: 0
suspended via GUI: no
active_task_state: 0
stderr_out:
app version num: 0
checkpoint CPU time: 0.000000
current CPU time: 0.000000
fraction done: 0.000000
swap size: 0.000000
working set size: 0.000000
estimated CPU time remaining: 4031.214879
supports graphics: no

動いていますね(^^)

このサーバは 仮想4Core、メモリ5GB、HDD20GBのプランです。
当面無料でお借りしている状態ですので、さくらさんありがとうございます。

さくらのクラウドは、なかなか使いやすくて個人的にも好きなIaaSです。
VPSを比べて自由度が高い(?)のもいいです。
これを読まれた方、さくらのクラウドおすすめします。