clusterhq online meetup #1 (dec 8) - fli and flockerhub overview and fundamentals

Post on 23-Jan-2018

55 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

FlockerHub and Fli Introduction & Fundamentals

Ryan WallnerDeveloper Evangelist, ClusterHQ

What’s in here?

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

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

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

Some concepts

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

@RyanWallner@ClusterHQ

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

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

Volume

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

@RyanWallner@ClusterHQ

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

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

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

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

@RyanWallner@ClusterHQ

Getting Started

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

Setup the client with underlying zfs storage

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

Configure the client with the FlockerHub URL and Authentication Token

First Volumeset $ fli init <volumeset-name>

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

volumes)

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

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

client host.

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.

First Sync $ fli sync <volumeset-name>

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

on FlockerHub.

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.

First ShareShare with anyone! Give them

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

First Pull$ flis sync <volumeset-name>

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

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

Clone snapshots into new volumes to access snapshotted

data.

Thank You.

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

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

IRC: freenode #clusterhq

top related