Top Banner
VIRTUAL GOODNESS WITH VIRTUAL MACHINES Kevin Beam Jeff Braucher Matt Savoie Hannah Wilcox
46

WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

Aug 26, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

VIRTUAL GOODNESSWITH

VIRTUAL MACHINESKevin Beam

Jeff BraucherMatt Savoie

Hannah Wilcox

Page 2: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

Supports research into Earth's cryosphereManages and distributes scientific dataCreates tools for data accessSupports data usersPerforms scientific researchPerforms public education and outreachDistributes more than 500 cryospheric data sets

Page 3: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

ABOUT USOne of Several NSIDC Development TeamsDataset ProductionVisualizationsDataset AccessPythonJavaScriptA Bit of RubyWe are hiring!Have we mentioned we're hiring?

Page 4: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

THE CHALLENGE

Page 6: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

ARCTIC CHANGEShowcase Remote Sensing DatasetsFocus on the Arctic RegionLong Time-Series DatasetsAccessible to Non-Specialists

Page 7: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

THE RESULTSatellite Observations of Arctic Change

Page 9: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 10: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 11: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 12: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

VIRTUAL MACHINES:OVERVIEW

Page 13: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 14: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 15: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

ISOLATION OF APPLICATIONFrom resource contentionFrom server failuresFrom maintenanceFrom people failures

Page 16: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

DEVELOPER CONTROLDifferent version of commonly installed softwareUncommon/specialty softwareQuick turnaround... as long as devs can figure it outLess hassle for sys admins... as long as devs can figure it out

Page 17: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

SAME ENVIRONMENT EVERYWHERE

EVERYWHERE = {LOCAL, INTEGRATION, STAGING, QA, BLUE}

Page 18: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 19: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

VAGRANT AND

VIRTUALBOX

Page 20: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

VAGRANT USES VIRTUALBOX OUT OF THE BOX

VIRTUALBOX PROVIDES VIRTUAL MACHINES

VMWARE, AWS, HYPER-V PROVIDE VIRTUAL MACHINES

VAGRANT USES THESE AND MORE AS PLUGINS

Page 21: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

EXAMPLE. LET'S:Define a VMCreate and run a VMLogin to the VMStop the VM

Page 23: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 24: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

PUPPET

Page 26: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

WHY DO I NEED A PUPPET?AUTOMATION!Create users, directories, etcInstall packages (apt-get install)Ensure things are runningDeclarative

Page 27: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

BEST OF ALLVagrant can tell Puppet to provision the box after it's been created

Page 28: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

EXAMPLE. LET'S:Install nginxMake sure it's running

Page 30: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

FABRIC

Page 31: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

WHAT'S FABRIC?Fabric is a simple, Pythonic tool for remote execution and

deployment.

Page 32: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

WHAT DO WE USE IT FOR?Deploy our application to the target machine(s)

Make sure it's restarted / running

> fab deploy_application HOSTNAME

> fab restart_application HOSTNAME

Page 33: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

FABRIC HAS TWO MAIN PARTS:Define tasksRun remote commands

Page 34: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

EXAMPLE USAGE:@taskdef deploy(): undeploy()

sudo('mkdir -p /var/www/maps-of-arctic-change') sudo('chown -R vagrant:vagrant /var/www/maps-of-arctic-change')

rsync_project(local_dir=os.path.join(PROJECT_DIR, 'dist/mac'), remote_dir='/var/www/maps-of-arctic-change')

restart_gunicorn()

Page 35: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

OTHER ALTERNATIVESPuppet!Capistrano (Ruby on Rails)Language / Platform Specific Tools

Page 36: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

Build your own private cloud.

VAGRANT + VSPHERE

Page 37: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

vSphere is just another vagrant provider

Page 38: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

vSphere runs VMs in the datacenter

(actual NSIDC datacenter pictured)

Page 39: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

THINGS YOU WILL NEED :vagrant-vsphere plugin (available on github)server hostname for vSphere APIusername and password for vSphereRSA key for vagrant user in vSphere template

Page 40: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

WHAT ELSE DOES VSPHERE DO?

provides load balancing and failoverscales horizontally across physical machinesprovides templates for new VMsmanages names and IP addresses

Page 41: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

ONE LAST THING...

Page 42: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

apps.nsidc.org

DYNECT : CLOUD DNS

puts applications in their own sub-domainprovides a rich DNS management APIcan be integrated with vSphereallows teams to create DNS aliasesenables blue / green deployment

Page 43: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

Follow the VM!

BLUE / GREEN DEPLOYMENT

Page 44: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

ACTUALLY, WE DO IT LIKE THIS :

Page 45: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX
Page 46: WITH VIRTUAL MACHINES - SEA · One of Several NSIDC Development Teams Dataset Production Visualizations Dataset Access Python JavaScript A Bit of Ruby ... VAGRANT USES VIRTUALBOX

Q & A