one two, one two! testing testing€¦ · testing testing - one two, one two! executed once the...

23
Setting up an automated testing environment for Samba on Gluster Testing Testing one two, one two! Sachin Prabhu [email protected] Michael Adam [email protected] 1

Upload: others

Post on 15-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Setting up an automated testing environment for Samba on Gluster

Testing Testing one two, one two!

Sachin Prabhu

[email protected]

Michael Adam

[email protected]

1

Page 2: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Setting up of an automated testing environment for Samba on Gluster

Agenda

2

Testing Testing - one two, one two!

Introductions

Implementation

Future Roadmap

Page 3: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Introductions

Glusterfs

3

Testing Testing - one two, one two!

▸ Open Source Scalable Network Filesystem

▸ Utilises off the shelf hardware

▸ Access to the filesystem provided by libgfapi,

glusterfs-fuse, NFS and SMB

Page 4: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Introductions

Samba

4

Testing Testing - one two, one two!

▸ Export GlusterFS using SMB

▸ Samba uses vfs_glusterfs module to talk to the

Glusterfs cluster.

Page 5: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Introductions

CTDB

5

Testing Testing - one two, one two!

▸ Turns Samba into a clustered service

▸ By providing the needed cross-node IPC:・ clustered TDB database

・ Inter-node messaging

▸ Additionally: resource management:・ Monitors nodes

・ Monitors Samba service

・ Manages pool of ip addresses

Page 6: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Introductions

Challenges

6

Testing Testing - one two, one two!

▸ Multiple Machines Involved

▸ Multiple Projects Involved

▸ Multiple Configuration Options

Page 7: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Introductions

Requirements

7

Testing Testing - one two, one two!

▸ Automate setup of cluster nodes

▸ Test runner to run various tests

▸ Run periodically

Page 8: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Gluster Samba Integration

8

Testing Testing - one two, one two!

▸ Github

・ https://github.com/gluster/samba-integration

▸ Branches

・ master

・ centos-ci

・ samba-build

・ tests

Page 9: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Tools

9

Testing Testing - one two, one two!

▸ CentOS 7

▸ Vagrant

・ libvirt

▸ Ansible

・ gluster-ansible

Page 10: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation - prerequisites

Samba master test RPMs

10

Testing Testing - one two, one two!

▸ Test RPMs for easy installation on nodes

▸ Builds created nightly

▸ Gluster already has nightly RPMs from the master

branch spec file

Page 11: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation - prerequisites

Branch - samba-build

11

Testing Testing - one two, one two!

▸ Fetches current samba master

▸ Creates an SRPM loosely based on fedora rawhide

▸ Builds binary RPMs for centos

▸ Runs a basic install test

▸ Builds running nightly in centos-ci

Page 12: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation - prerequisites

Package Repositories

12

Testing Testing - one two, one two!

▸ GlusterFS・ http://artifacts.ci.centos.org/gluster/nightly/master.repo

▸ Samba・ http://artifacts.ci.centos.org/gluster/nightly-samba/samb

a-nightly-master.repo

Page 13: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Branch - master

13

Testing Testing - one two, one two!

▸ Creates virtual machines

▸ Installs cluster nodes and clients

・ cluster-vars.yml

・ test-info.yml

▸ Runs tests

Page 14: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Setup vm setup

14

Testing Testing - one two, one two!

Page 15: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Setup vm Storage0/1

15

Testing Testing - one two, one two!

Page 16: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Setup vm Client1

16

Testing Testing - one two, one two!

Page 17: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Run Tests

17

Testing Testing - one two, one two!

Page 18: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Branch - tests

18

Testing Testing - one two, one two!

▸ Executed once the nodes and clients are setup

▸ Contains the test runner and various tests

▸ Simple sanity tests using the cifs kernel module

▸ Smbtorture tests

・ Latest nightly build smbtorture test used

・ Re-use selftest infrastructure for known fails and

unreliable results

▸ Focus is now on adding more tests.

Page 19: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation - centos-ci integration

CentOS CI Environment

19

Testing Testing - one two, one two!

▸ https://ci.centos.org/

▸ Free Jenkins based bare metal machines for open

source projects to build CI / test infrastructures

▸ https://wiki.centos.org/QaWiki/CI/GettingStarted

▸ Using: Gluster Space (for now)

▸ Job definitions: https://github.com/gluster/centosci/

Page 20: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Branch - centos-ci

20

Testing Testing - one two, one two!

▸ Entry point for the Centos-CI environment

▸ Script invoked by the centos-ci jenkins jobs

▸ Sets up the host machine

▸ Fetches master branch and kickstarts install and test

Page 21: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Implementation

Centos-ci - what are we running / testing?

21

Testing Testing - one two, one two!

▸ Nightly:

・ Full clustered test run from master

・ build samba RPMs from master

▸ PRs:

・ Master (full cluster test)

・ Tests (full cluster test)

・ Centos-ci (full cluster test)

・ Samba-build (build and install)

Page 22: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Future Roadmap

Future road map

22

Testing Testing - one two, one two!

▸ Tests! Tests! Tests!

▸ Test different configuration options

▸ Plugin other distributed file systems

▸ Centos-ci:

○ Get samba space?

○ Use in gitlab? (not so easy…)

Page 23: one two, one two! Testing Testing€¦ · Testing Testing - one two, one two! Executed once the nodes and clients are setup Contains the test runner and various tests Simple sanity

Questions?

[email protected]

[email protected]

Thank You