32
FlockerHub and Fli Introduction & Fundamentals Ryan Wallner Developer Evangelist, ClusterHQ

ClusterHQ Online Meetup #1 (dec 8) - Fli and Flockerhub Overview and Fundamentals

Embed Size (px)

Citation preview

Page 1: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

FlockerHub and Fli Introduction & Fundamentals

Ryan WallnerDeveloper Evangelist, ClusterHQ

Page 2: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

What’s in here?

1. Overview of Fli and FlockerHub2. Getting Started using the FlockerHub CLI (Fli)

Page 3: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals
Page 4: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals
Page 5: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Introduction

● FlockerHub is a Hub for data, like GitHub is a Hub for source code and DockerHub is a Hub for container images.

● Specifically, FlockerHub lets you store your Docker data volumes and organize them into volumesets and branches that are owned by organizations, teams and individual users.

● FlockerHub also provides a user interface for organizing and controlling access to snapshots.

● Docs at https://flockerhub-docs.clusterhq.com

Page 6: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals
Page 7: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Introduction

● Fli, the FlockerHub CLI, is like Git for data. Just like you can use Git to copy, branch,

push and pull code, you can use Fli to copy, branch, push and pull your data volumes.

● Fli lets you take incremental snapshots of any database or data volume that runs on

Linux and push those snapshots to a hosted volume repository called FlockerHub.

● There they can be accessed by any person or machine to whom you’ve granted

access. Fli can also be used without FlockerHub to manage data volumes locally.

● Open-source: https://github.com/clusterhq/fli

● Docs https://fli-docs.clusterhq.com

Page 8: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Some concepts

● Log-in● Authentication Tokens● Volumeset● Volume● Snapshot● Clone● Branches● Sharing

@RyanWallner@ClusterHQ

Page 11: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

VolumesetThink of a volumeset like a repository on GitHub, except volumesets don’t contain source code, they contain volume snapshots.

Creating a volumeset with Fli is simple.

@RyanWallner@ClusterHQ

Page 12: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

VolumeThink of a volume as a directory that you can work with like any other directory, except this volume can be snapshotted and that snapshot can be pushed and pulled to and from FlockerHub.

When you create a volume with Fli, it looks like this.

@RyanWallner@ClusterHQ

Page 13: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Volume

You can move into that directory, create files, or anything you would normally do on POSIX file-systems.

@RyanWallner@ClusterHQ

Page 14: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

SnapshotA snapshot is a “picture” of a volume that can’t be mounted itself to a host, but it can be instantiated as a data volume that can be mounted to a host through the clone command.

To create a snapshot from an existing volume, you will use the snapshot command.

@RyanWallner@ClusterHQ

Page 15: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

CloneA clone is a copy of a snapshot that is made available as a volume. Cloning a volume is used when you want to instantiate a volume based on a particular snapshot.

To create a clone from a snapshot you may run the following clone command.

@RyanWallner@ClusterHQ

Page 16: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

BranchesA branch is a lineage of a particular data volume made up of multiple snapshots over time. Think of a branch like a GitHub branch, but made of snapshots instead of commits.

Branches are created by using the --branch | -b flag during a snapshot command.

@RyanWallner@ClusterHQ

Page 17: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

SharingFlockerHub volumesets can be shared among users enabling better testing during CI/CD, development, QA and debugging stages of application development.

@RyanWallner@ClusterHQ

Page 20: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Getting Started

Page 22: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Setup $ fli setup --zpool <zpool-name>

Setup the client with underlying zfs storage

Page 23: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Config $ fli config --token </path/token>

Configure the client with the FlockerHub URL and Authentication Token

Page 24: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First Volumeset $ fli init <volumeset-name>

Create a Volumetset. (a place to keep a set of associated

volumes)

Page 25: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First Volume $ fli create <volumeset-name> <volume>

Create a volume. This is a working mount/directory on your

client host.

Page 26: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First Snapshot $ fli snapshot <volumeset-name>:<volume-name> <snapshot-name>

Take a snapshot. This is a point in time view of the data within a

volume.

Page 27: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First Sync $ fli sync <volumeset-name>

Sync allows metadata about what volumesets and snapshots on a client to be made available

on FlockerHub.

Page 28: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First Push $ fli push <volumeset-name>:<snapshot-name>

Pushing data is actually pushing the data associated with your

snapshots so they can be made available for “pull” from

FlockerHub.

Page 29: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First ShareShare with anyone! Give them

Read-Only, Write or Admin access to your volumesets.

Page 30: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First Pull$ flis sync <volumeset-name>

$ fli pull <volumeset-name>:<snapshot-name>Pull snapshots onto a Fli client.

Page 31: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

First Clone $ fli clone <volumeset-name>:<snapshot-name> <new-clone-name>

Clone snapshots into new volumes to access snapshotted

data.

Page 32: ClusterHQ Online Meetup #1 (dec 8)  - Fli and Flockerhub Overview and Fundamentals

Thank You.

Sign Up: https://flockerhub.clusterhq.comSlack: https://slack.clusterhq.com/

Twitter: @ryanwallnerWebsite: https://clusterhq.com

IRC: freenode #clusterhq