mirror of
https://github.com/balkian/rpi-cluster.git
synced 2024-11-21 07:02:28 +00:00
First commit
This commit is contained in:
commit
30f1944781
27
examples/hello_c.c
Normal file
27
examples/hello_c.c
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
*
|
||||
* Sample MPI "hello world" application in C
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "mpi.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int rank, size, len;
|
||||
/*char version[MPI_MAX_LIBRARY_VERSION_STRING];*/
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
||||
/*MPI_Get_library_version(version, &len);*/
|
||||
printf("Hello, world, I am %d of %d, (%d)\n",
|
||||
rank, size, len);
|
||||
MPI_Finalize();
|
||||
|
||||
return 0;
|
||||
}
|
6
hosts
Normal file
6
hosts
Normal file
@ -0,0 +1,6 @@
|
||||
[master]
|
||||
192.168.2.113 ansible_ssh_user=pi ansible_ssh_pass=raspberry
|
||||
|
||||
|
||||
[slaves]
|
||||
|
39
playbook.yml
Normal file
39
playbook.yml
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Copy .ssh directory
|
||||
copy: src=ssh/ dest="/home/pi/.ssh/"
|
||||
sudo: no
|
||||
- name: Install openmpi-bin
|
||||
apt: name=openmpi-bin state=present
|
||||
sudo: yes
|
||||
|
||||
- hosts: master
|
||||
sudo: true
|
||||
tasks:
|
||||
- name: Install GlusterFS
|
||||
apt: name=glusterfs-server state=present
|
||||
|
||||
- name: Assures /data/bricks/g1 exists
|
||||
file: path=/data/bricks/g1 state=directory
|
||||
|
||||
- name: create gluster volume
|
||||
gluster_volume: state=present name=shared brick='/data/bricks/g1' cluster={{ ansible_eth0.ipv4.address }} host={{ inventory_hostname }}
|
||||
run_once: true
|
||||
|
||||
- name: start gluster volume
|
||||
gluster_volume: state=started name=shared
|
||||
|
||||
- hosts: all
|
||||
sudo: true
|
||||
tasks:
|
||||
- name: Install GlusterFS Client
|
||||
apt: name=glusterfs-client state=present
|
||||
|
||||
- name: Assures /data/shared exists
|
||||
file: path=/data/shared state=directory
|
||||
|
||||
- name: Mount shared directory
|
||||
mount: name=/data/shared src="{{ groups['master'][0] }}":/shared fstype=glusterfs state=mounted opts="defaults,nobootwait"
|
||||
- name: Copy examples to /data/shared
|
||||
copy: src=examples dest=/data/shared/
|
1
ssh/authorized_keys
Normal file
1
ssh/authorized_keys
Normal file
@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4S9YMTYg16gFTPwTYgnJvuq9amRbIygUDrOygt9RB37nzSUX0tQKKu1C0I6BQhUmVZlOrUwLAW25SkcZB2yGg3sTs+E1fQ326K05t2ixBIy4ecIQ6x0qQ6iIvxQwy4ILPj+e4w7wZXPVA63TjGXoHG3nf6RYO5/A8W18/53nduLF8hL5JoOFtYCcPEBU5vnoPZQLXvR6kyvmv8rG2HVcucerCtMGeEDkk42glaFYrzozvKBS7Ai05VI88c10G//yCYpB/cOM1WOracgKoGg/ImXEiBryNsU3RqFEgPl5UiasmFCKcOUQw+xN/EhyQC9iBUrCc5pw4soO6fER5JYf3 pi@localhost
|
27
ssh/id_rsa
Normal file
27
ssh/id_rsa
Normal file
@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEowIBAAKCAQEAuEvWDE2INeoBUz8E2IJyb7qvWpkWyMoFA6zsoLfUQd+580lF
|
||||
9LUCirtQtCOgUIVJlWZTq1MCwFtuUpHGQdshoN7E7PhNX0N9uitObdosQSMuHnCE
|
||||
OsdKkOoiL8UMMuCCz4/nu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0fHON6Sbuss
|
||||
RRA1WguIMmOu+gfct3BsR1ogjhOiNzkVroQMU4e4tuqgg2jP/m0GrKnl8Hd0KKbT
|
||||
6jUAPpkWUq7gd6VteWnjYQKBgQChC0WPPDB3yB7IekfJK/qPSWkdfgByGU/XVQxw
|
||||
EMXV6FDcRDqU3JNzjiRI4CPyA79ieuYEOFNOf4jo2ymN5p/uAHVIv/eaiSGHvgjM
|
||||
gXYabbd8v9Qms+wF3RHuEqH7V+NRj2pugaF5oX/3jDDeSpR2AmNV172YkFThi5W2
|
||||
uMzhoQKBgDWBrAGsPz0jvMVemzXzJomvYJuicrP/lUmQNHZwVkYG47iNm+D9CCGB
|
||||
E8ho/VnFzimz7Xrf3YNFu10Fs65p9BsMGJ1uMqBJ3NjAOCLW5Slo/MRaxcSQoD58
|
||||
okIdXzR+AINHfe7kf44ztq1Z0HpsOfY6S6AMTyDJNivwT8iH0WBH
|
||||
-----END RSA PRIVATE KEY-----
|
1
ssh/id_rsa.pub
Normal file
1
ssh/id_rsa.pub
Normal file
@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4S9YMTYg16gFTPwTYgnJvuq9amRbIygUDrOygt9RB37nzSUX0tQKKu1C0I6BQhUmVZlOrUwLAW25SkcZB2yGg3sTs+E1fQ326K05t2ixBIy4ecIQ6x0qQ6iIvxQwy4ILPj+e4w7wZXPVA63TjGXoHG3nf6RYO5/A8W18/53nduLF8hL5JoOFtYCcPEBU5vnoPZQLXvR6kyvmv8rG2HVcucerCtMGeEDkk42glaFYrzozvKBS7Ai05VI88c10G//yCYpB/cOM1WOracgKoGg/ImXEiBryNsU3RqFEgPl5UiasmFCKcOUQw+xN/EhyQC9iBUrCc5pw4soO6fER5JYf3 pi@localhost
|
Loading…
Reference in New Issue
Block a user