Implementing!SoftNAS!Cloud!with!Docker! November!2014!

Similar documents
Intro to Docker for CMS

Apache and Virtual Hosts Exercises

Load Balancing/High Availability Configuration for neoninsight Server

File Storage Operation Manual

Lecture 2 (08/31, 09/02, 09/09): Hadoop. Decisions, Operations & Information Technologies Robert H. Smith School of Business Fall, 2015

Cloud Homework instructions for AWS default instance (Red Hat based)

Linux Development Environment Description Based on VirtualBox Structure

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

Partek Flow Installation Guide

The objective of this lab is to learn how to set up an environment for running distributed Hadoop applications.

INASP: Effective Network Management Workshops

Setup a Virtual Host/Website

CDH 5 Quick Start Guide

A SHORT INTRODUCTION TO DUPLICITY WITH CLOUD OBJECT STORAGE. Version

QEMU-KVM + D-System Monitor Setup Manual

Ciphermail Gateway Separate Front-end and Back-end Configuration Guide

Cassandra Installation over Ubuntu 1. Installing VMware player:

14. CUCM 8 - free sftp solution for backup on ubuntu server

Amazon EFS (Preview) User Guide

SETTING UP A LAMP SERVER REMOTELY

Working with Docker on Microsoft Azure

University of Amsterdam VPN Linux User Guide (Version 1.2)

How To Install Hadoop From Apa Hadoop To (Hadoop)

Single Node Setup. Table of contents

Computer Science and Engineering Linux Cisco VPN Client Installation and Setup Guide

FTP Peach Pit Data Sheet

CPE111 COMPUTER EXPLORATION

Command Line Crash Course For Unix

Copyright 2013 wolfssl Inc. All rights reserved. 2

Local File Sharing in Linux

Threat!and!Vulnerability!Assessments!

Copyright 2014, SafeNet, Inc. All rights reserved.

Ulteo Open Virtual Desktop Installation

Installing IBM Websphere Application Server 7 and 8 on OS4 Enterprise Linux

The Linux System. o Updating without touching the user's files and configurations.

This handout describes how to start Hadoop in distributed mode, not the pseudo distributed mode which Hadoop comes preconfigured in as on download.

Deploy and Manage Hadoop with SUSE Manager. A Detailed Technical Guide. Guide. Technical Guide Management.

>

Experiences with Lustre* and Hadoop*

! E6893 Big Data Analytics:! Demo Session II: Mahout working with Eclipse and Maven for Collaborative Filtering

Rstudio Server on Amazon EC2

Ubuntu Professional Training Course Overview (E-learning, Ubuntu LTS)

GestióIP IPAM v3.0 IP address management software Installation Guide v0.1

User and Programmer Guide for the FI- STAR Monitoring Service SE

Apache HTTP Server. Implementation Guide. (Version 5.7) Copyright 2013 Deepnet Security Limited

How to upload - copy PowerChute Network Shutdown installation files to VMware VMA from a PC

Basic Linux & Package Management. Original slides from GTFO Security

Tutorial- Counting Words in File(s) using MapReduce

CPSC 2800 Linux Hands-on Lab #7 on Linux Utilities. Project 7-1

INSTALLING KAAZING WEBSOCKET GATEWAY - HTML5 EDITION ON AN AMAZON EC2 CLOUD SERVER

研 發 專 案 原 始 程 式 碼 安 裝 及 操 作 手 冊. Version 0.1

Recommended File System Ownership and Privileges

Monitoring Netflow with NFsen

Introduction to HDFS. Prasanth Kothuri, CERN

Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0

A Beginner's Guide to Setting Up A Web Hosting System (Or, the design and implementation of a system for the worldwide distribution of pictures of

Procedure to Create and Duplicate Master LiveUSB Stick

Network Management & Monitoring

Configuration of High Performance Computing for Medical Imaging and Processing. SunGridEngine 6.2u5

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

Installing Proview on an Windows XP machine

HW (Fat001) TPM. Figure 1. Computing Node

Step By Step Guide for Starting "Hello, World!" on OpenWRT

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

Desktop virtualization using SaaS Architecture

Syntax: cd <Path> Or cd $<Custom/Standard Top Name>_TOP (In CAPS)

Introduction to HDFS. Prasanth Kothuri, CERN

Hadoop and Hive. Introduction,Installation and Usage. Saatvik Shah. Data Analytics for Educational Data. May 23, 2014

A Tool must be configured to allow for CMISSync, see below for more information.

Administrasi dan Manajemen Jaringan 2. File Transfer Protocol (FTP)

Installing Hadoop. Hortonworks Hadoop. April 29, Mogulla, Deepak Reddy VERSION 1.0

Rapid Access Cloud: Se1ng up a Proxy Host

CS615 - Aspects of System Administration

Intro to Docker and Containers

Using Docker in Cloud Networks

How To Install A Safesync On A Server

CPSC2800: Linux Hands-on Lab #3 Explore Linux file system and file security. Project 3-1

Building Elastix-2.4 High Availability Clusters with DRBD and Heartbeat (using a single NIC)

Ansible. Configuration management tool and ad hoc solution. Marcel Nijenhof

Object Storage and Enterprise Repository Installation manual

CLOUD API DOCUMENTATION v2.0. Get list of cloud servers in account

Desktop : Ubuntu Desktop, Ubuntu Desktop Server : RedHat EL 5, RedHat EL 6, Ubuntu Server, Ubuntu Server, CentOS 5, CentOS 6

Setting up Radmind For an OSX Public Lab

Installation documentation for Ulteo Open Virtual Desktop

Solr Bridge Search Installation Guide

Apache Hadoop 2.0 Installation and Single Node Cluster Configuration on Ubuntu A guide to install and setup Single-Node Apache Hadoop 2.

Installing OCFA on Ubuntu. Practical installation procedures, Installing The Open Computer Forensics Architecture on Ubuntu

User Manual - Help Utility Download MMPCT. (Mission Mode Project Commercial Taxes) User Manual Help-Utility

Installing Sun's VirtualBox on Windows XP and setting up an Ubuntu VM

Security Workshop. Apache + SSL exercises in Ubuntu. 1 Install apache2 and enable SSL 2. 2 Generate a Local Certificate 2

Small Systems Solutions is the. Premier Red Hat and Professional. VMware Certified Partner and Reseller. in Saudi Arabia, as well a competent

Dataworks System Services Guide

How to install Apache Hadoop in Ubuntu (Multi node setup)

HIG s Remote Desktop Services (RDS) on Linux

SETTING UP RASPBERRY PI FOR TOPPY FTP ACCESS. (Draft 5)

Building Website with Drupal 7

Backing up the Embedded Oracle database of a Red Hat Network Satellite

Transcription:

ImplementingSoftNASCloud withdocker November2014 SoftNAS'Cloud'with'Docker'provides'simple,'on:demand,'persistent'shared' storage'for'devops'striving'to'obtain'continuous'delivery/integration'and' applications'to'scale

Table*of*Contents* Introduction...3 Overview...3 WhatisNAS?...3 WhatisSoftNAS Cloud?...3 WhySoftNASCloud?...4 CommonUseCases...5 DockerContainersvsVirtualMachines...5 Firsttherewasvirtualization...5 Containersandhowtheyaredifferent...5 TheStorageChallengeforContainers...6 Implementation...7 EaseofApplicationDeliverywithPersistentSharedStorage...7 SettingupaDockerHost...8 ContinuousIntegrationandDelivery...10 DeployApplicationstoScale...11 ConfigurationOverview...11 ConfiguretheBeanstalkDockerHost...12 ConfigureElasticBeanstalkwithaDockerContainer...12 CreateDockerrun.aws.jsontoconnecttoSoftNAS...13 CompressFilestouploadtoElasticBeanstalk...14 ConfigureElasticBeanstalk...15 HighAvailabilityandReplication...18 IntroductiontotheAPI...20 HowtoGetStarted...21 Copyright 2014SoftNAS,LLC AllRightsReserved

Introduction* Overview* Dockerisanopen^sourceprojectthatautomatesthedeploymentofapplicationsinsidesoftware containers,byprovidinganadditionallayerofabstractionandautomationofoperatingsystem^level virtualizationonlinux.dockerenablescontinuousintegrationwithdevopsfindingvaluethrough simplicitytobuild,ship,andrunapplicationswithincontainers.dockerenablesseparationofconcern; developersplaceapplicationsintocontainers,operationsrunthecontainers.dockerisoneofthemost activefreeandopen^sourceprojectstoday,withmorethan500contributorsoverthelastyear. ThiswhitepaperwillhelpyouunderstandoneofthemostpopularcloudNASoptionsavailableforthe integrationwithdocker,thesoftnas CloudNASFiler.ThisdocumentdescribeshowSoftNASCloudcan beusedtoprovidepersistentstoragetodockercontainers.itwillpayparticularattentiontosolving Dockerskeystoragechallenges. What*is*NAS?* NASisacommonITtermforNetworkAttachedStoragethatenablesdataandfilesharingusingpopular protocolslikenfsandcifs/smb.iscsiistypicallyassociatedwithsan(storageareanetworks).nas storagesystemsthatsupportnfs,cifs/smbandiscsiaretermed unified storage.softnascloud providesunifiedstoragedesignedandoptimizedforhigh^performance,higherthannormali/oper second(iops)anddatareliabilityandrecoverability.italsoincreasesstorageefficiencythroughthin^ provisioning,compressionanddeduplication. What*is*SoftNAS *Cloud?* SoftNAS isasoftware^definednasfilerdeliveredasavirtualstorageappliancethatrunswithin popularpubliccloudenvironments,suchastheawsec2,microsoft Azure,VMware vcloudair andprivatecloudsrunningvmwareesxi/vsphere.softnasprovidesenterprise^gradenasshared storagecapabilities,includinghigh^availabilitywithautomaticfailover. Nothingismorecriticaltothecontinuityofyourbusinessthanyourdata.Likethebloodinyourveins,it hastobesafeandavailable100%ofthetime.softnasoffersthemission^criticaldataprotectionand high^availabilityrequiredfornon^stopoperationofbusinessapplications,websitesanditinfrastructure. SoftNASrunswithinthecustomer sownhostsand/orinthepublicclouds,andprovidesano compromisesafetynetforbusinessinformation. * Unlikelegacystorageappliances,SoftNASofferstheenterprise^gradedataprotectionandhigh^ availabilitycapabilitiesrequiredfornon^stopoperation,withoutthehighstorageacquisitionand maintenancecosts,andwithoutthecomplexitiesandassociatedspecializedstorageskills. Insteadoflockingyourcompanyanddataintoaparticularvendor sproprietaryhardware/software storageappliance,softnasprovidescustomerswiththesamefreedomofchoiceforstoragethat customershavecometoexpectfromotheritinfrastructure;e.g.,servers,switches,firewalls.and becausesoftnasleveragetherichnessofcloudplatforms,thefullrangeoffeaturesandhardware^ independentvirtualizationnowapplyequallytostorage,providingthesamebenefitsforstoragethat Copyright 2014SoftNAS,LLC AllRightsReserved

Copyright 2014SoftNAS,LLC AllRightsReserved customersenjoytodayforservervirtualization. Why*SoftNAS*Cloud?* WhyshouldDockerusersconsiderSoftNASCloud? SharedStorageforDockerapplications Manyapplicationsinvolveuseoffilesandfilesystems Enablesrapidscale^outDockerclusterswithhigh^availability Full^featureNAScapabilitiesforDockerapplications Easeofuse Managedataforallcontainersinacommonsimple,'yet'powerful'storagesolutionfor Dockerapplications QuickandeasytoconfigureinminutesforITadministratorandDevOpspersonnel withouttraining Availableon^demandtomeetITandDevOpsagilestorageneeds Builtinsnapshotsandwritableclonesforthestoredcontaineroutput;build test validate repeatonclonedproductiondatasets Rapidrecoveryfromdatacorruptionordeletionevents Easytosetupandsecurelyreplicatelargeamountsofdataacrossdatacenters, platformsandclouds,deliveringanalystsresultsfrombigdataanalyticsto consumersondifferentplatforms Storagepoolssupportdynamicadditionofstoragedevicesandthin^provisioned volumeswithoutworkloadreconfiguration Notrainingorspecialstorageskillsrequired Builtuponfamiliar,standardLinuxandZFSopensourcetechnologies FlexibleopenarchitectureandAPI senableextensibility Nolock^inofcustomerdataduetoopenarchitecture Non^disruptiveonlinestorageadministrationandmaintenanceagility Agilereconfigurationofstorageonlinewithoutdisruptingproductionworkloads Securityandavailability EnhancedsecuritybuiltintoAWSforEBSandSoftNASforS3,AWSistheleading publiccloudfordockeradoption Makescloudstoragesaferforbusiness Protectsmission^criticaldatainthecloud Deliversstorageuptimewith99.999%reliabilityw/dualcontrollers (5minutes/yeardowntime) Increasesapplicationperformanceandprocessingspeedsviafasterstorage performance Scalability Accesstoupto16PBofS3^backedclouddiskstorage Accesstoupto154TBofEBSfromeachEC2instanceassharedstorage Blockreplicationscalesefficientlytohandlehundredsofmillionsoffilesand directories Securelyreplicatedataacrossanyplatform,datacenterorcloud

Copyright 2014SoftNAS,LLC AllRightsReserved Common%Use%Cases% Thefollowingcommonusecasesareaddressed. Easeofapplicationdeployment ContinuousIntegration/Delivery Distributedapplicationdeploymenttoscale Docker*Containers*vs*Virtual*Machines* First*there*was*virtualization* Avirtualmachineisamethodinwhichamodernservercanrunmultipleoperatingsystemsonthesame pieceofphysicalhardware.thereareseveralwaysinwhichthisisaccomplished,buttheunderlyingidea isthesame.utilizehardwarepowermoreefficientlybyaddingmorethanoneoperatingsystemontothe samephysicalserver.therearenumerousbenefitstorunningaserverinavirtualizedenvironment.here areafewofthekeypoints: " Redundancy:Theoperatingsystemisdetachedfromthehardware.Thisallowsacertainamount ofportability.i.e.,ifonepieceofhardwarefailsitisrelativelyeasytomovethatoperatingsystem toanotherpieceofhardware. " Scalable:Alongwiththeportability,virtualizedserversgenerallycanbescaledalittleeasier. Meaning,becausetheserversoftwareisnottiedtoanyhardware,it seasiertoaddadditional serverstohandlealargerworkload. " Cost0Savings:Thisisprettystraightforward.It snotnecessarilytobuymultiplephysicalservers. Inthepre^virtualizationeramultiplepiecesofhardwarewerenecessarytosatisfydifferent computingrequirements.foranemailserverandacrmserver,wouldhaveverylikelybeen deployedastoseparatehardwareservers. Nowwithabasicunderstandingofvirtualizationandwhyit sbeneficialletsdiveintocontainers. Containers*and*how*they*are*different* Inshort,containersfurthervirtualizetheunderlyinghardware.Asdiscussedearlierinatypical virtualizedenvironmentthereisonepieceofhardwarewithseveralcomputersrunningonitandsharing resources.eachoneofthevirtualizedcomputerswillhaveitsownoperatingsystemsandresourceusage alongwithit.inacontainerizedenvironment,onlyoneoperatingsystemwouldberunning.withinthat singleoperatingsystemiswherethecontainersreside.thecontainerseachhavethenecessarysoftware toruntheapplication.ratherthanhavingtheoverheadofalltheoperatingsystems,alltheresources beingareusedbyoneunderlyingsystem.therestofthecomputingpowerisnowavailabletothe applicationitself.it simportanttoknowthatcontainersdonothaveaccesstoothercontainers.sofroma securitystandpoint,containersarenomoreorlesssecurethanastandardvirtualserver. Whilevirtualizedserversdosomethingsmuchbetterthantraditionalhardware,therestillisroomfor improvement.containersbringadifferentapproachtovirtualizationthatwasnotpreviously " Ease:Withacontainer,thereisonlyoneoperatingsystemtomaintainversusmanymany

virtualizedserveroperatingsystems.also,applicationswillbehavetheexactlythesameacrossall containers.meaning,containersdevelopedandtestingwithinalocalcomputercaneasilyan successfullybemoveduptoacontainerinthecloud. " Speed0of0scalability:Onceanapplicationisrunninginacontainer,itcanbeduplicatedextremely easily.sincethereisnooperatingsystem,onlythesoftwareneedstobeduplicatedforthe container.thetimeconsumedforscalingchangesfromminutesandhourstoseveralseconds. " Efficiency:Withouttheadditionalburdenofrunningmultipleoperatingsystems,eachpieceof hardwarenowhasextraresources.theseresourcescanbeusedtooffermorepowertothe application(s)thatarerunningwithinthecontainers. The*Storage*Challenge*for*Containers* Whilecontainershavesomeamazingandsimpleadvantagesovervirtualizedservers,thereare challengestoovercome.chiefamongthechallengesisstorage. Dockerstoragelimitations: " Thecontainerhasephemeralstorage,whenthecontaineristurnedoff,dataislost " Containerdatacannotbeimportednorexported " Containerdatacannotbebackedupandrestored " Containerdatacannotbestoredbasedonstoragecapabilities;SSDforhighIOPs,SATAfor inexpensivelargecapacity " Itsnotpossibletospecifyvolumestobeusedfromoneoldcontainertonewcontainer " Itsnotpossibletomanagevolumesafterdeletingthecontainersinwhichtheywereattached " Becausecontainersareintendedtobelightweight,itisnotfeasibletoimplementsharedstorage withineachcontainer " Whilesomeapplicationscanworkaroundsharedstoragelimitationsusingobjectstorage,there remainmanyusecaseswherefile^basedstorageandsharedstoragearerequired. Copyright 2014SoftNAS,LLC AllRightsReserved

Implementation* Ease*of*Application*Delivery*with*Persistent*Shared*Storage* WebdevelopmentwithDockerutilizingSoftNASCloudsolvesstorageissues.Dockerprovidesrapid creationofubiquitousdevelopmentenvironmentsonthefly.softnascloudprovidescontinuous persistentsharedstorageexpectedinenterpriseenvironments.thestorageproblemareasofdockerare resolvedbysoftnascloud. Developerscanalsobenefitfromcreatingwriteablesnapshotsofproductiondatatodevelopandtest with.thedevelopmentlifecyclenowbecomesextremelyflexible.theproductionenvironmentissafer whendevelopersarenotpermittedtodirectlyaccessproductioninfrastructureanddatasets.qatesting cyclesarefasterwhenlargeamountsofdatadoesnotneedtobecopiedforeachtest,andinstantaneous storagesnapshotsandwritableclonesareusedinsteadoftime^consuming,expensivedeepcopiesof data. 0 Thefollowingimplementationdemonstrateshowawebdevelopercouldcreateadevelopment environmentthatcanbeusedtohostbothwebdataaswellasacoderepository.bydoingsointhe followingfashionitcanallowformaximumdevelopmentflexibilityandwillkeepstrictsecurityinplace throughoutthedevelopmentlifecycle.morespecifically,inthisusecasewewillconfigureacontainerto runanapachewebserverthatwillservecontentfromoursoftnasfileshare. Copyright 2014SoftNAS,LLC AllRightsReserved

Setting*up*a*Docker*Host* SetupstartswithinstructionsforstartingDockeronanUbuntuhost. sudo apt-get update sudo apt-get install docker.io sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io source /etc/bash_completion.d/docker.io InordertotestusetheversionoptiontocheckthatDockerinstalled. sudo docker --version OnceDockerisinstalledmapthehostservertoaSoftNASCloudshare.Dependingontheversionof Ubuntuitmaybenecessarytoinstallthenfs^commonpackage. sudo apt-get install nfs-common OncethenfstoolsareinstalledmapthehosttotheSoftNASserver.Asanexample,mapthedrivetoa /softnasfolderonthehost.firstmakethedirectory sudo mkdir /softnas Oncethedirectoryismademounttheshare. sudo mount SOFTNAS_IP_ADDRESS:/SOFTNAS_SHARE /softnas Asanexample: sudo mount SOFTNAS_IP_ADDRESS:/eph/eph /softnas ThismountsthedirectoryfromourephemeralstoragetotheDockerhostintothedirectory/softnas. Anotherbrieftest: Copyright 2014SoftNAS,LLC AllRightsReserved

sudo touch /softnas/host.file Nowchecktomakesurethatthefileiscreated. ls /softnas WiththeDockerhostisconfigured,nowconnecttothehostsfilesystemviathe^voptionintheDocker runcommand. ThiscommandwilllaunchaninteractiveUbuntucontainermappingafolderfromthecontainernamed /softnastothehostfoldercreatedinthepreviousstepnamed/softnas. sudo docker run -i -t --name ubuntu -v /softnas:/softnas ubuntu /bin/bash Acommandpromptisnowlaunchedthatwillallowanewcontainertobeexplored.Ensurethattheshare iswritablefromthecontainerbycreatingabasichtmlfile. sudo cat > index.html Type <html><h1>this is from SoftNAS</h1></html> Then press Ctrl C to exit Thendoublecheck ls /softnas Thisshouldnowshowindex.html,aswellasthehost.filecreatedearlier. Oncethefilestorageandaccesshavebeentested,andthehtmlfilehasbeencreatedwecancontinue. IssuearuncommandtoDockerthatwillpullanapacheimagefromtheDockerrepository.Dockerwill thenrunacontainerwithapacheinstalled,anditwillservethecontentfromthesoftnassharecreated earlier. ' sudo docker run --name apache2 -p 80:80 -v /softnas:/var/www -d eboraas/apache Copyright 2014SoftNAS,LLC AllRightsReserved

Continuous*Integration*and*Delivery* Thecloudmodelhasevolvedrapidlyoverthelastfewyears,fromsimpleon^demandinfrastructureto richenvironmentsprovidingagiledevelopmentcapabilitiesfornewapplications.devopshasemergedas amethodologydrivingtheintegrationandcollaborationofitprofessionalsandsoftwaredevelopers. SoftwaremethodshavegrownbeginningwithContinuousIntegration,whichdescribesdevelopers workingcloselytogethertomergecodeupto10timesaday.beyondintegrationiscontinuous Deploymentincreasingthereleasecycletomultiplereleasesperday. ContinuousIntegrationandDeliveryhaveincreaseddemandforthemanagementofproductionandtest data.productiondatamusthaveenterpriseclasssecurity,reliability,andavailabilitywhileintegrating withapplicationrapiddeploymenttoolssuchasdockercontainers. DevOpsmustbeabletodevelopandtestagainstaproduction^likesystemwithproduction^likedata. DevOpscreateaStagingenvironmenteitherinon^premiseorpublicCloudstoperformquality acceptancetests.softnascloudisreadilydeployableinawiderangeofcloudconfigurations.live productionfilesystemscanbecoherentlyfrozenintimethroughsoftnascloudsnapshots,andthen copiedfromtheproductiontostagingenvironment(orsimulatedproductiondatasetscanbeusedwhere privacyissuesprecludedirectuseofproductiondatabydevops). DevOpscancontinuallyvalidateapplicationqualityintheStagingenvironmentbytestingagainst Copyright 2014SoftNAS,LLC AllRightsReserved

writablesoftnassnapshots.instantaneouslysnapshotcreationallowsquicktestcycleswheredatais managebycreatingandmountingsnapshots,executingteststoread/writethesnapshots,deletingthe snapshotsattestconclusion,andloopingbacktosnapshotcreationsupportingcodefixandretest. * Deploy*Applications*to*Scale* TheprevioussectiondiscussedhowtheSoftNASCloudsolutionhelpedtosimplifyacontinuous developmentcyclebydeliveringcompletestorageflexibilitytodockercontainers.thissectionwill extendthatpremise,byshowinghoweasilyawebapplicationcanbemovedfromdevelopmentto productiontoscale. Inordertoachieveapplicationscale,automationtoolsarevaluabletominimizeeffortandcomplexity. AWSElasticBeanstalkisoneautomationtoolthatprovidesaneasy^to^useservicefordeploymentsand solvesresourceproblemsenablingthescalingofwebapplicationsandservices.developerssimply uploadcodeandelasticbeanstalkautomaticallyhandlesdeployment,capacityprovisioning,load balancing,auto^scalingandhealthmonitoring.elasticbeanstalksimplifiesthecreation,deployment,and operationsofwebapplicationsastheyscale,withawsprovisioningandconfiguringawsresourcessuch asec2instances,elasticloadbalancer,andautoscalinggroup.dockersupportinelasticbeanstalk extendsthedeploymentcapabilitiestoanysoftwarestack. UtilizingSoftNASCloudwithAWSElasticBeanstalkandDockercreatesasimpleandscalablewayto moveyourwebapplicationtoaproductionlevelarchitecture.softnascloudprovidesthesharable scalablestoragetotheautoscalingdockercontainersthataremanagedbyelasticbeanstalk. Thefollowingimplementationwilldescribehowtocreatescriptstoautomaticallyconfigurehostsand containerstoutilizethesoftnasshare.bycreatingthesescriptsdevelopersarepoisedtorapidlyscale outtheirapplicationswithpersistentshareablestorage. Configuration*Overview* DeploymentwillnowbeintegratedwithBeanstalktolaunchnewinstancesautomatically.Anapache containerindockerwillservefilesfromasoftnasshare. TherearetwomainfilesusedtotellBeanstalkhowtobuildtheinstances.Onefileconfiguresthemapto thebeanstalkhost,andonefilewilltelldockerhowtoconfigureitscontainer. Copyright 2014SoftNAS,LLC AllRightsReserved

Configure*the*Beanstalk*Docker*Host* Elasticbeanstalkallowsthecreationoffilestoautomaticallyconfiguretheinstancesascreated.Thisisa veryimportantpartbecauseitwillallowmappingthedockerhosttothesoftnasshare.beanstalk allowsthisbyreadingyamlconfigurationfilesinahiddendirectorycalled.ebextensions.thefilefor thisexamplewilllooklikethefollowing: --- packages: yum: nfs-utils: [] commands: MKDIR: command: mkdir /softnas NFS Map: command: mount [softnas host ip]:/eph/eph /softnas It simportanttorememberthatthedefaultbeanstalkhostistheamazonlinuxami.doacoupleof itemsspecifictothatami. Ensurethat nfs^utils isinstalled Createthemountpoint /softnas MounttheSoftnassharetothehost.Pleasemakesuretochange softnashostip tothe correspondingcorrectip. Configure*Elastic*Beanstalk*with*a*Docker*Container* Therearethreemainwaystodescribeacontainer,andhowitisgoingtorunwiththeElasticBeanstalk Dockerhost. Dockerfile:ADockerfileisaplaintextdocumentthatisusedbyDockertobuildacustomimage toberuninacontainer Copyright 2014SoftNAS,LLC AllRightsReserved

Dockerrun.aws.json:AJSONformatteddocumentusedtodownloadimagesfromtheDocker repositoryaswellasconfigureanyoptionswhilerunningthatcontainer.thisisthemethodthat thisdocumentwilluse. Combination:ElasticBeanstalkwillallowuseofacombinationofDockerfileaswellasDockerrun todescribethedockercontaineringreaterdetail. Create*Dockerrun.aws.json*to*connect*to*SoftNAS* ThefollowingjsonfileisgoingtodownloadaprebuiltimagefromtheDockerrepository,andlaunchit ontothedockerhost. { "AWSEBDockerrunVersion":"1", "Image":{ "Name":"eboraas/apache", "Update":"true" }, "Ports":[ { "ContainerPort":"80", "ContainerPort":"443" } ], "Volumes":[ { "HostDirectory":"/softnas", "ContainerDirectory":"/var/www" } ] } Hereisascreenshottomakesurethatthedocumentisformattedcorrectly.JSONisverysensitiveto formattingirregularities. Copyright 2014SoftNAS,LLC AllRightsReserved

Compress*Files*to*upload*to*Elastic*Beanstalk* Atthispointthefileswillneedtobeputintoafolder.Themostimportantthingtorememberistohave allofthefilesintherootzipfile.inotherwordsthefilesshouldbecompressed,andnotinafolder. Copyright 2014SoftNAS,LLC AllRightsReserved

Configure*Elastic*Beanstalk* Select createanewapplication intheupperrighthandsideofthebeanstalkconsole. Nametheapplication,inthiscasethenameSoftNASEBDemowaschosen.Provideadescription. Next,configurethebasicEnvironmenttypeofElasticBeanstalk. EnvironmentTier:WebServer PredefinedConfiguration:Docker Environmenttype:SingleInstance Forproductiontherecommendedenvironmenttypeis Load balancing,autoscaling Inthenextsessionuploadthezipfilethatwascreatedpreviously.Selecttheradiobuttonnextto Upload yourown andselectthezipfile. Copyright 2014SoftNAS,LLC AllRightsReserved

InthenextsessionsimplynametheenvironmentandenvironmentURL. ElasticBeanstalkwillautomaticallycheckthattheURLisavailable.Thisiswheretopointthedomains cnamerecord. Ontheadditionalresourcespage,checktheboxfor createthisenvironmentinsideavpc whileitisnot necessaryforthisdemo,itisbestpractice,anditallowsformoreflexibilitymovingforward. Intheconfigurationdetails,assignapemkeyfordebuggingandtroubleshootingpurposes.Ina productionenvironment,itisbestpracticetoleavethepemkeyassignmentoffsincetheenvironment shouldbecompletelyconfiguredandcontrolledusingbeanstalk. Intheenvironmenttagspageaddanametagsotheinstancesareclearlydefined. InthenextBeanstalksectionselecttheVPCandsubnetlocations.Inthissamplewehaveselectedtwo availabilityzonesincasewewouldliketoscaleinthefuture.makesuretoselectthesecuritygroupthat Copyright 2014SoftNAS,LLC AllRightsReserved

wecreatedintheoriginalusecase.ifyoudonothavethatsecuritygroupcreatedyoucaneasilycreate one.fortestingpurposesyouwillneedtocreateagroupthatallowsalltraffictoitself. * Copyright 2014SoftNAS,LLC AllRightsReserved

Copyright 2014SoftNAS,LLC AllRightsReserved High*Availability*and*Replication* AllofthefeaturesofferedbySoftNASCloudapplytowardprovidingenterpriseclasscapabilitiesin DockerContainerdeployments.ThedesignofyourSoftNASinstallationonAmazonEC2dependsonthe amountofusablestorage,theiopsyouneedandthelevelofavailabilityrequired.youcanchoosefroma numberofconfigurations,dependinguponyourusecaseandavailabilityrequirements.usethecross^ zonehaarchitecturefor99.999%availability. SoftNASprovideshigh^availabilityandautomatic,seamlessfailoveracrossavailabilityzoneswithits SNAPHA functionality,ensuringsharedstorageisalwaysavailable,evenwhenanentirezoneor specificinstancefails. Cross^zoneHAoperateswithinaVPC.NAStrafficisroutedthroughanenhancedelasticIPusingSoftNAS patent^pendingelasticha technology;thatis,nfs,cifsandiscsitrafficisroutedtoaprimarysoftnas controllerinonezone,andasecondarycontrolleroperatesinadifferentavailabilityzone.nasclients canbelocatedinanyavailabilityzone. SnapReplicate performsasynchronousblockreplicationfromtheprimarycontrolleratothebackup controllerb,keepingthesecondaryhotwiththelatestchangeddatablocksonceperminute.intheevent ofafailureinaz1shownabove,theelastichaipautomaticallyfailsovertocontrollerbinaz2,inless than30seconds.uponfailover,allnfs,cifsandiscsisessionsreconnectwithnoimpactonnasclients (i.e.nostalefilehandlesorotherillside^effectsandnoneedtorestartnasclients,whichcontinueasif nothinghadhappened). SNAPHAprovidesthefollowingcapabilities: Crosszonehigh^availability Automaticfailover UsesSoftNASSnapReplicatefeatureforsecureblockreplication SyncImage handlesaninitialfullreplicationcycle(likeafullbackup) Onceperminute,SnapReplicatereplicatesonlythechangeddatablocksfromlastminute Providesa warm nearreal^timebackupwithautomaticfailover ElasticHA technologyprovidesseamlessfailoverorcross^zonenastraffic(nfs, CIFS/SMB,iSCSI)fornon^stopoperation SnapReplicatereplicationusesPKIauthenticationandconfigurableencryptiontosecure replicationsessions Automaticfailoveristriggeredbyfailureoftheprimaryinstance,lossofnetwork connectivitytotheprimaryoranythingthatimpairsthecontrollerfromservingstorageto NASclients. Manualfailover(takeover)andfailback(giveback)operationsprovidetheadministrator theabilitytocontrolwhichcontrolleristheprimary,makingperiodicmaintenance straightforward Activateanddeactivatecontrolsenableadministratortoplacetheclusterintomaintenance mode ThefollowingdiagramisanexampledeploymentofSNAPHAacrossavailabilityzones,withbothpublic andprivatesubnetsineachzone.formoredetails,consultthesoftnashighavailabilityguide.

Figure1 Cross^zoneHAConfigurationwithDockerContainers * Copyright 2014SoftNAS,LLC AllRightsReserved

Introduction*to*the*API* TheSoftNASRestAPIprovidesaccesstothePHP^basedSoftNASadminserver.Thisprovidesaccessto SSDanddiskdevicemanagementontheEC2,Azure,andvSpherehosts.TheSoftNASAPIcanbe programmedinanylanguagethatsupportshttpsrequestsandresponses,includingjavascriptwith Ajax,PHP,CURL,PERL,.NET,Java,etc. TheSoftNASRestAPIusesGET,POST,PUTandDELETErequestssentoverHTTPSconnectionstothe ApachewebserverrunningonLinux,whichinturnareprocessedbythePHP^basedSoftNASadmin server.thesoftnasadminserverreturnsitsresponsesasjson^formattedstringsviathehttp response.thesoftnasrestapioffersawayforthirdpartysystemstoaccessthesameapithatisused bythesoftnasstoragecenteradministrationgui.thisprovidesaccesstothesoftnasadminserver, whichmanagesthesoftnasrun^timeenvironment. Inaddition,the"softnas^cmd,"acommand^lineutilitywritteninCURL,providesaccesstothesameAPI callsfromthelinuxcommandline.thecommandlineoperationsaredefinedinthecommand Referencesection. TheCLIprovidescommandlineaccesstotheAPIsetforquickandeasystorageadministration.Both methodsareavailableforprogrammaticstorageadministrationbydevopsteamswhowanttodesign storageintocloudformationandotherautomatedprocesses.formoredetails,refertothesoftnasapi andcliguide. Copyright 2014SoftNAS,LLC AllRightsReserved

How*to*Get*Started* LaunchfromMarketplace(FreeTierand30^dayfreetrialsavailable) TrySoftNASCloudinyourAWSaccountforfree.Chooseanyinstancesizeyoupreferforfree(certain AWSusagefeesmayapply). ReadtheDocumentation LearnmoreaboutSoftNASbygoingdeeperintothedocumentationtogetallthedetails. Questions?ContactSoftNASSalesandSupportstafftogetyourquestionsansweredtoday. Copyright 2014SoftNAS,LLC AllRightsReserved