Description du projet :
utiliser le cluster OPI’One pour créer une Crunch’Box BOINC !
Une Crunch’Box BOINC ? C’est quoi ?
C’est un ensemble de serveur utilisé pour le projet de calcul reparti BOINC comme le célèbre SETI@home.
Les étapes d’installation
installation de boinc-client et de l’interface d’administration boinctui
pi@master:~$ sudo apt-get install boinc-client boinctui
commandes de l’interface boinccmd
pi@master:~$ boinccmd --help usage: boinccmd [--host hostname] [--passwd passwd] [--unix_domain] command default hostname: localhost default password: contents of gui_rpc_auth.cfg Commands: --client_version show client version --create_account URL email passwd name --file_transfer URL filename op file transfer operation op = retry | abort --get_cc_status --get_daily_xfer_history show network traffic history --get_disk_usage show disk usage --get_file_transfers show file transfers --get_host_info --get_message_count show largest message seqno --get_messages [ seqno ] show messages > seqno --get_notices [ seqno ] show notices > seqno --get_project_config URL --get_project_status show status of all attached projects --get_proxy_settings --get_simple_gui_info show status of projects and active tasks --get_state show entire state --get_tasks show tasks --get_old_tasks show reported tasks from last 24 hours --join_acct_mgr URL name passwd attach account manager --lookup_account URL email passwd --network_available retry deferred network communication --project URL op project operation op = reset | detach | update | suspend | resume | nomorework | allowmorework | detach_when_done | dont_detach_when_done --project_attach URL auth attach to project --quit tell client to exit --quit_acct_mgr quit current account manager --read_cc_config --read_global_prefs_override --run_benchmarks --set_gpu_mode mode duration set GPU run mode for given duration mode = always | auto | never --set_host_info product_name --set_network_mode mode duration set network mode for given duration mode = always | auto | never --set_proxy_settings --set_run_mode mode duration set run mode for given duration mode = always | auto | never --task url task_name op task operation op = suspend | resume | abort
autoriser la connection d’un client distant:
pi@master:~$ sudo nano /etc/boinc-client/cc_config.xml <!-- This is a minimal configuration file cc_config.xml of the BOINC core client. For a complete list of all available options and logging flags and their meaning see: https://boinc.berkeley.edu/wiki/client_configuration --> <cc_config> <log_flags> <task>1</task> <file_xfer>1</file_xfer> <sched_ops>1</sched_ops> </log_flags> <options> <allow_remote_gui_rpc>1</allow_remote_gui_rpc> </options> </cc_config>
configurer un mot de passe :
pi@master:~$ sudo nano /etc/boinc-client/gui_rpc_auth.cfg orangepi
indiquer les ip autorisées à se connecter :
pi@master:$ sudo nano /etc/boinc-client/remote_hosts.cfg # This file contains a list of hostnames or IP addresses (one per line) # of remote hosts, that are allowed to connect and to control the local # BOINC core client via GUI RPCs. # Lines beginning with a # or a ; are treated like comments and will be # ignored. # #host.example.com #192.168.0.180 192.168.169.1 192.168.1.47
ajouter le projet Seti a Boinc :
pi@master:~$ sudo boinccmd --project_attach http://setiathome.berkeley.edu {authenticator key}
forcer la mise à jour de Boinc :
pi@master:~$ boinccmd --passwd orangepi --project setiathome.berkeley.edu/ update
afficher les statistiques des projets et taches en cours
$ boinccmd --get_simple_gui_info ======== Projects ======== 1) ----------- name: SETI@home master URL: http://setiathome.berkeley.edu/ user_name: Adonfff team_name: resource share: 100.000000 user_total_credit: 14199.380066 user_expavg_credit: 848.490316 host_total_credit: 2651.012676 host_expavg_credit: 160.545155 nrpc_failures: 0 master_fetch_failures: 0 master fetch pending: no scheduler RPC pending: no trickle upload 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: Thu Apr 27 15:41:35 2017 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: Account description: View your account information URL: http://setiathome.berkeley.edu/home.php GUI URL: name: Preferences description: View and modify your computing preferences URL: http://setiathome.berkeley.edu/prefs.php?subset=global GUI URL: name: Tasks description: View your recent tasks URL: http://setiathome.berkeley.edu/results.php?userid=10478969 GUI URL: name: Computers description: View a list of the computers on which you are running SETI@Home URL: http://setiathome.berkeley.edu/hosts_user.php?userid=10478969 GUI URL: name: Donate description: Donate to SETI@home URL: http://setiathome.berkeley.edu/sah_donate.php jobs succeeded: 20 jobs failed: 0 elapsed time: 1960448.987307 cross-project ID: 85002d5c60a912f463f46f98692916dc ======== Tasks ======== 1) ----------- name: 05jl08ad.21652.2526.7.34.59_1 WU name: 05jl08ad.21652.2526.7.34.59 project URL: http://setiathome.berkeley.edu/ report deadline: Sun Jun 18 12:51:50 2017 ready to report: no got server ack: no final CPU time: 0.000000 state: downloaded scheduler state: scheduled exit_status: 0 signal: 0 suspended via GUI: no active_task_state: EXECUTING app version num: 806 checkpoint CPU time: 77772.900000 current CPU time: 77812.870000 fraction done: 0.700786 swap size: 38 MB working set size: 36 MB estimated CPU time remaining: 30801.499335 2) ----------- name: 03mr08ad.20116.18886.16.43.51.vlar_1 WU name: 03mr08ad.20116.18886.16.43.51.vlar project URL: http://setiathome.berkeley.edu/ report deadline: Sun Jun 18 23:16:59 2017 ready to report: no got server ack: no final CPU time: 0.000000 state: downloaded scheduler state: scheduled exit_status: 0 signal: 0 suspended via GUI: no active_task_state: EXECUTING app version num: 806 checkpoint CPU time: 76881.220000 current CPU time: 76922.940000 fraction done: 0.696117 swap size: 37 MB working set size: 35 MB estimated CPU time remaining: 31337.366405 3) ----------- name: 09oc08ae.4239.24203.16.43.227_0 WU name: 09oc08ae.4239.24203.16.43.227 project URL: http://setiathome.berkeley.edu/ report deadline: Mon Jun 19 05:34:41 2017 ready to report: no got server ack: no final CPU time: 0.000000 state: downloaded scheduler state: scheduled exit_status: 0 signal: 0 suspended via GUI: no active_task_state: EXECUTING app version num: 806 checkpoint CPU time: 11598.040000 current CPU time: 11616.860000 fraction done: 0.095199 swap size: 38 MB working set size: 35 MB estimated CPU time remaining: 92453.607959
root@master:~# cat remaintask.sh echo Time remain before BOINC complete next task : echo master: `boinccmd --get_simple_gui_info | grep remain | cut -d: -f2 | cut -d. -f1 | head -n1`s. echo slave1: `boinccmd --host slave1 --passwd orangepi --get_simple_gui_info | grep remain | cut -d: -f2 | cut -d. -f1 | head -n1`s. echo slave2: `boinccmd --host slave2 --passwd orangepi --get_simple_gui_info | grep remain | cut -d: -f2 | cut -d. -f1 | head -n1`s.
root@master:~# cat setiupdate.sh boinccmd --passwd orangepi --project setiathome.berkeley.edu/ update boinccmd --host slave1 --passwd orangepi --project setiathome.berkeley.edu/ update boinccmd --host slave2 --passwd orangepi --project setiathome.berkeley.edu/ update
iptables -A PREROUTING -t nat -i wlan0 -p tcp --dport 31511 -j DNAT --to 192.168.169.11:31416 root@master:~# iptables -A FORWARD -p tcp -d 192.168.169.11 --dport 31416 -j ACCEPT root@master:~# iptables -A PREROUTING -t nat -i wlan0 -p tcp --dport 31512 -j DNAT --to 192.168.169.12:31416 root@master:~# iptables -A FORWARD -p tcp -d 192.168.169.12 --dport 31416 -j ACCEPT root@master:~# iptables-save > /etc/iptables_rules.save