Date post: | 21-Jan-2018 |
Category: |
Technology |
Upload: | stackiq |
View: | 295 times |
Download: | 4 times |
Installing a Cluster of Raspberry Pis
What is a Raspberry Pi?
Single board computer Designed to promote teaching of computer science As of November 2016, 11 million units sold Raspberry Pi 3 Model B - $35!!
Raspberry Pi Stats
1.2 GHz quad-core ARM 64/32 bit capable
1 GB RAM 1 MicroSD slot
4 USB ports
100 Mbit Ethernet HDMI
Bluetooth Wireless LAN
Audio / Composite video out
Camera header Display header
40 pins of general-purpose I/O
Raspberry Pi Software
Supports Linux Debian (“Raspbian”)
• Main software release CentOS 7.x
• Only 32-bit for now Many other distributions too And now Stacki!
Stacki Ace
The best ARM on your team is an Ace Stacki pallet for ARM
• Based on Stacki 4.0 Stacki-ace pallet for ARM
• Raspberry Pi specific configuration
Why Stacki Ace?
Great marketing vehicle X86_64 rules the server space • But 15 billion ARMs shipped in 2015
Can install a datacenter with a $35 device Interesting new use cases • Low-cost pooled storage • IoT
Stacki Ace – What does it do?
Converts a Raspberry Pi into a Stacki frontend Stacki Ace frontend can install: • Other Raspberry Pis (“ace” appliances) • Traditional x86_64 servers (“backend”
appliances)
What We Are Going To Do Today We are going to use a pre-installed Stacki Ace Frontend to build 3 Stacki Ace Backends
Stacki Ace Frontend (rasp002)
Network Switch
Stacki Ace Backend (rasp003)
Stacki Ace Backend (rasp004)
Stacki Ace Backend (rasp005)
Install Stacki Ace Backends
How We Installed the Stacki Ace Frontend
Frontend Installation
Download “stacki-centos.img”:
Copy “stacki-centos.img” to a MicroSD card: Boot the Raspberry Pi that will be the frontend with the MicroSD card
wget \ http://stacki.s3.amazonaws.com/public/pallets/4.1/open-source/ace/stacki-centos.img
dd if=stacki-centos.img of=/dev/sdd
Frontend Installation
When the frontend boots, login as “root” • Password is: “stacki-centos”
• You’ll be asked to change the password Download the Stacki Ace pallets:
wget http://stacki.s3.amazonaws.com/public/pallets/4.1/open-source/ace/os-7.3-7.x.armv7hl.disk1.iso wget http://stacki.s3.amazonaws.com/public/pallets/4.1/open-source/ace/stacki-4.1-7.x.armv7hl.disk1.iso wget http://stacki.s3.amazonaws.com/public/pallets/4.1/open-source/ace/stacki-ace-4.1-7.x.armv7hl.disk1.iso
Frontend Installation
Download and run “frontend-install.py”: This converts vanilla CentOS to a Stacki Ace frontend
wget http://stacki.s3.amazonaws.com/public/pallets/4.1/open-source/ace/frontend-install.py ./frontend-install.py --stacki-iso=stacki-4.1-7.x.armv7hl.disk1.iso \ --stacki-version=4.1 --stacki-name=stacki \ -–extra-iso=os-7.3-7.x.armv7hl.disk1.iso
Frontend Installation
Frontend Installation
Frontend Installation
Frontend Installation
Frontend Installation
Frontend Installation
Install the “stacki-ace” and “os” pallets: Apply the “stacki-ace” pallet: Stacki Ace frontend can now build Stacki Ace backend nodes
stack add pallet os-7.3-7.x.armv7hl.disk1.iso stack enable pallet os stack add pallet stacki-ace-4.1-7.x.armv7hl.disk1.iso stack enable pallet stacki-ace
stack run pallet stacki-ace | bash -x
Refresher We are going to use a pre-installed Stacki Ace Frontend to build 3 Stacki Ace Backends
Stacki Ace Frontend (rasp002)
Network Switch
Stacki Ace Backend (rasp003)
Stacki Ace Backend (rasp004)
Stacki Ace Backend (rasp005)
Contact
For More Info On Stacki Ace
GitHub for downloads and documentation:
Join our Slack channel and our Google Group: Questions? Email me:
https://github.com/StackIQ/stacki-ace
https://www.stackiq.com/support/
Internals
Basic Kickstart File Processing
Wrote a “kickstart interpreter” for CentOS ARM • No kickstart on CentOS ARM
Dynamically create a valid kickstart file and send it back to the Pi • Pre • Package • Post
Storage Configuration
Set “bootdisk” parameter • Default: mmcblk0 (the MicroSD card) • USB storage: sda
Can install onto:
• MicroSD card • USB-connected hard disk • USB stick
Note: If you install onto a USB device, you no longer need a MicroSD card
Kickstart File Processing
During an install, NFS mount “/” from the frontend • This allows for the backend Pi to be “off” the storage so we can
repartition and reformat “/boot” and “/” We configure /etc/dhcp/dhcpd.conf to answer Raspberry Pi DHCP requests • Which we automatically enable via
“program_usb_boot_mode=1” in /boot/config.txt
Basic Kickstart File Processing
On each boot, backend asks for kickstart file Looks at attributes section for “bootaction” attribute If “bootaction” == “install”, then parse and execute the kickstart file • Otherwise, do nothing
Future
Avalanche Package Installation • Benefits x86_64 too • Parallel file distribution on running hosts
Storage and partitioning spreadsheets Wireless networking