Clustered Samba in a Briefcase Kai Blin kai@samba.org, @kaiblin - - PowerPoint PPT Presentation

clustered samba in a briefcase
SMART_READER_LITE
LIVE PREVIEW

Clustered Samba in a Briefcase Kai Blin kai@samba.org, @kaiblin - - PowerPoint PPT Presentation

Clustered Samba in a Briefcase Kai Blin kai@samba.org, @kaiblin Team 2016-05-12 Outline Introduction Hardware Used Software Used Setup Hardware Software Remaining Issues Demo Kai Blin CC-BY-SA 3.0 Cluster Briefcase (2 / 25)


slide-1
SLIDE 1

Clustered Samba in a Briefcase

Kai Blin

kai@samba.org, @kaiblin

Team

2016-05-12

slide-2
SLIDE 2

Outline

Introduction Hardware Used Software Used Setup Hardware Software Remaining Issues Demo

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (2 / 25)

slide-3
SLIDE 3

Introduction

◮ About Myself ◮ Hardware Used ◮ Software Used Kai Blin CC-BY-SA 3.0 Cluster Briefcase (3 / 25)

slide-4
SLIDE 4

About Myself

◮ M.Sc. in computational biology ◮ Ph.D. in microbiology ◮ Samba Team member Kai Blin CC-BY-SA 3.0 Cluster Briefcase (4 / 25)

slide-5
SLIDE 5

Hardware Used

◮ 3x RaspberryPi2 ◮ 4-port switch ◮ 4-port USB PSU Kai Blin CC-BY-SA 3.0 Cluster Briefcase (5 / 25)

slide-6
SLIDE 6

RaspberryPi2

◮ 900 MHz ARMv7

Cortex-A7 QuadCore

◮ 1 GB RAM ◮ 4 USB 2.0 ports ◮ 100 MbE

Source: Multicherry, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=38558176

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (6 / 25)

slide-7
SLIDE 7

Software Used

◮ Arch Linux ARM ◮ GlusterFS ◮ Samba 4.4.2 / CTDB Kai Blin CC-BY-SA 3.0 Cluster Briefcase (7 / 25)

slide-8
SLIDE 8

Arch Linux ARM

◮ ARM port of Arch Linux ◮ Supports ARMv5 – ARMv7 hardware ◮ Leightweight ◮ Active community Kai Blin CC-BY-SA 3.0 Cluster Briefcase (8 / 25)

slide-9
SLIDE 9

GlusterFS

◮ Current release: 3.7.11 ◮ Clustering for common,

  • ff-the-shelf hardware

◮ Packaged for ArchLinux Kai Blin CC-BY-SA 3.0 Cluster Briefcase (9 / 25)

slide-10
SLIDE 10

Samba 4

◮ Current release: Samba

4.4.3

◮ Active Directory Domain

controller

◮ Scales from micro to

macro

http://crazeric.deviantart.com CC-BY-SA

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (10 / 25)

slide-11
SLIDE 11

Outline

Introduction Hardware Used Software Used Setup Hardware Software Remaining Issues Demo

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (11 / 25)

slide-12
SLIDE 12

Hardware

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (12 / 25)

slide-13
SLIDE 13

Basic Setup

◮ Set up RaspberryPis ◮ It’s in GitHub: https://github.com/kblin/rpi-cluster

# Push system on pre -partitioned SD card at /dev/mmcblk0 ./ install/format.sh # restore host -specific config ./ install/bootstrap.sh <hostname > # Done :) # Ok , actually , you still need to put SD into the # RPi , boot , and pacman -S python2

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (13 / 25)

slide-14
SLIDE 14

Ansible

◮ Use to bootstrap the setup ◮ It’s in GitHub: https://github.com/kblin/rpi-ctdb-ansible

# First install GlusterFS ansible -playbook -i inventory install_gluster .yml # For now , we need a custom version of the Samba packages pacman -U samba*xz # Then install Samba stuff ansible -playbook -i inventory install_samba .yml]

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (14 / 25)

slide-15
SLIDE 15

CTDB

◮ Need to add --with-clustering to ArchLinux build

◮ Binaries packaged, config files not ◮ Copy over files using Ansible

◮ Some fixes to config files needed for Arch ◮ Tweaks to startup scripts ◮ Details on GitHub Kai Blin CC-BY-SA 3.0 Cluster Briefcase (15 / 25)

slide-16
SLIDE 16

Samba

smb.conf

[global] # Cluster settings clustering = yes # Load shares from registry ctdb:registry.tdb=yes include=registry

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (16 / 25)

slide-17
SLIDE 17

Samba (cont.)

net conf setparm global "workgroup" "CLUSTER" net conf setparm global "netbios name" "storage" net conf setparm global "security" "user" net conf setparm global "idmap backend" "tdb2" net conf addshare public /data/packages \ writeable=y guest_ok=N "Demo share"

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (17 / 25)

slide-18
SLIDE 18

DNS

◮ Round-robin A record for public IPs ◮ Here: dnsmasq and /etc/hosts ◮ Should use BIND in real setup ◮ Or maybe Samba DNS once we implement round-robin Kai Blin CC-BY-SA 3.0 Cluster Briefcase (18 / 25)

slide-19
SLIDE 19

Outline

Introduction Hardware Used Software Used Setup Hardware Software Remaining Issues Demo

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (19 / 25)

slide-20
SLIDE 20

SCHED FIFO

◮ Not working in ARM for some reason ◮ Fortunately, CTDB doesn’t need it Kai Blin CC-BY-SA 3.0 Cluster Briefcase (20 / 25)

slide-21
SLIDE 21

GlusterFS

◮ Locking doesn’t work properly (yet) Kai Blin CC-BY-SA 3.0 Cluster Briefcase (21 / 25)

slide-22
SLIDE 22

Outline

Introduction Hardware Used Software Used Setup Hardware Software Remaining Issues Demo

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (22 / 25)

slide-23
SLIDE 23

Demo

DEMO

Kai Blin CC-BY-SA 3.0 Cluster Briefcase (23 / 25)

slide-24
SLIDE 24

Future Plans

◮ Get CTDB packaged in ArchLinux ◮ Go fully self-contained ◮ 2-node cluster + 1 Samba AD DC? Kai Blin CC-BY-SA 3.0 Cluster Briefcase (24 / 25)

slide-25
SLIDE 25

Thank you

◮ Questions? ◮ ArchLinuxArm bootstrapping: https://github.com/kblin/rpi-cluster ◮ Ansible CTDB setup: https://github.com/kblin/rpi-ctdb-ansible ◮ This talk: http://kblin.org/talks/sambaxp/2016/talk.pdf Kai Blin CC-BY-SA 3.0 Cluster Briefcase (25 / 25)