Application Delivery Basics With SUSE Cloud Application Platform

Transcription

Application Delivery Basics With SUSECloud Application PlatformHOL-1174Accelerate delivery of modern applicationsRodolfo BejaranoJason SparksSolutions EngineerSolutions EngineerRbejarano@suse.comJason.sparks@suse.com1

SUSE Container and Application PlatformsAccelerate development and deployment of containerized applicationsto speed application delivery and increase business agilitySUSE CaaS PlatformContainer ManagementIllustrationKubernetes for the Agile EnterpriseBest Kubernetes operator experienceSUSE Cloud Application PlatformPlatform as a ServiceIllustrationAdvanced Cloud Native Developer ExperienceProven productivity for Kubernetes2

Transformation Is Multifaceted And Multi-cloud3

What Is A Microservice?Variant of SOA architectural style that structures an application asa collection of loosely coupled servicesServices should be fine-grained and use lightweight protocolsDesigned to sufficiently decompose the application in order tofacilitate agile application development and deployment4

Old (monolithic) Way5

Instead Of Large, Monolithic Applications PlanCodeBuildTestReleaseDeployInterdependent componentsOperateApplication centricFunctionally organizedteams12-18 month release cycles6

A Better Way 7

Build And Deliver Cloud Native ApplicationsIncrease agility with Smaller Codebase Specialized Teams Deconstructed Services AgileIT Opportunity!8

Build And Deliver Cloud Native ApplicationsContainers enable Microservices r RuntimeHost OSServerOS KernelServerFast start/stopDensificationIn-place upgrades (we destroy and re-deploy)9

Re-deploy To Virtual Or Cloud InfrastructureVirtual MachinePublic CloudPrivate CloudPhysicalServer10

Developers Use Containers To PackageCodeConvenient to use Small Fast to start up Easy for developers to build and deploythemselvesOperate consistently in any environment Include everything needed to run Enhance productivity and facilitatecollaboration Eliminate ‘works on my machine’11

DevOps Workflows For KubernetesA spectrum of automation SE Application Delivery SolutionsGreater flexibilityand versatilityFaster time-to-deliverLower cost per unitHigher re-use (more efficient)More scalable production1212

SUSE Cloud Application PlatformA modern application delivery platform that brings an advanced cloud native developer experience toKubernetes. SUSE Cloud Application Platform increases business agility by helping enterprises to: Boost developer productivity Reduce complexity and increase ITefficiency Maximize ROI13

Modular Kubernetes Solution ArchitectureFlexible packaging to match your needsKubernetes user experiencesSUSE Cloud Application PlatformAdvanced Cloud Native DeveloperExperienceDIY DevOps AutomationSUSE CaaS PlatformKubernetes for the Agile EnterpriseAmazonEKSMicrosoftAKSGoogleGKEKubernetes operator experiences14

Boost Developer ProductivityWith easy one step deployment of cloud native applications using the language and framework mostappropriate for the task. One step application deployment Develop and deploy softwaresolutions faster than ever before Leverage your in-house skills15

Reduce Complexity And Increase IT EfficiencyWith a single, lean, platform that brings together proven open source technologies for rapid applicationdelivery at scale. Multiple cloud deployment models Increased efficiency with a lean andfast platform Easy to install with Helm charts andmanaged in Kubernetes16

Maximize Return On InvestmentWith industry leading open source technologies that leverage your existing investments. Lower risk by aligning with industrymomentum Gain the benefits and value of a thrivingecosystem of contributors Protect your investment with a rocksolid open source core17

SUSE Cloud Application Platform Cloud Foundry in Kubernetes Containerized Cloud FoundryApplication Runtime Enterprise Ready Kubernetes-native scheduler18

SUSE Containerand ApplicationPlatformsCommunityInvolvement19

SUSE Is Committed To Cloud FoundryAs a long-time supporter of Cloud Foundry, SUSE contributes to the project and its Foundation in manyways: Platinum member of Cloud Foundry Foundation SUSE Cloud Application Platform is a certified distribution Originator and Project Lead for CF Containerization Originator and Project Lead for Stratos Early adopter and influencer of Project Eirini20

CF ContainerizationPackages Cloud Foundry Application Runtime (CFAR) as containers instead of virtual machines,allowing CFAR to be deployed to Kubernetes Originated at SUSE; SUSE is project lead Eliminates requirement for BOSH Allows your organization to standardize onKubernetes as your hosting platform Much smaller CFAR footprint than VM baseddistribution. (Min 32GB vs 128GB.) Easy to start small and scale up withoutbreaking the bank21

StratosWeb-based UI for managing Cloud Foundry (and now, Kubernetes). It allows users and administratorsto both manage applications running in the Cloud Foundry cluster and perform cluster managementtasks. Originated at SUSE; SUSE is project lead Single pane of glass dashboard and metrics Aggregate multiple CF instances: SUSE-CAP,PCF, open source, or any other View of underlying Kubernetes infrastructure Customizable branding and styling Extensible for adding additional integrations22

Stratos provides Multi-cloud ManagementCentralized management of clusters and workloadsAmazon EKSGoogle EKSMicrosoft AKSOn-prem K8sSelf-managed K8s onpublic cloud IaaS23

Project EiriniEnables pluggable scheduling for CFAR (allows operators to choose whether CFAR should use Diegoor Kubernetes to orchestrate application container instances) SUSE announced forthcoming support forEirini at CF Summit EU in October 2018 SUSE-CAP 1.4 is the first Cloud Foundrysoftware distribution to support Eirini Run Cloud Foundry applications natively inKubernetes Same Cloud Foundry developer experience Familiar Kubernetes operator experience24

Cloud Foundry Application RuntimeA code-centric platform that simplifies the life of developers. It takes your code, written in any languageor framework, and runs it on any cloud. One step command to containerize, deploy,and manage an application Automatically identifies and pulls in languagelibraries and frameworks via buildpacks Open source service brokers automaticallycreate and bind services to applications Automates application lifecycle managementby assigning appropriate resources, managingrouting, load balancing, scaling, and more25

CF Build Packs – Application RuntimeEnvironment26

27

8SUSE Cloud Application Platform 1.5Modern Application Delivery Platform for Kubernetes SUSE Cloud Foundry has been updated to version 2.18.0 One-step application deployment model – (e.g. cf push) Policy Driven, Fault Tolerant, Self Healing Platform-as-a-Service Infrastructure Reference Architectures available for deployment on Public Cloud Optionally includes with SUSE Container as a Service Platform and SUSE Enterprise Storage for on-premise deploymentsFirst Customer Shipment: September 201928

SUSE CAP - Public Cloud DeploymentAzure Open Service Broker / Cloud Provider Integration2929

*New* SUSE Cloud Application Platform On EKSQuick re/suse-cloud-application-platform/ Deploys a highly available VPCarchitecture in under an hour Jointly engineered following theAWS Well-Architected Framework Apply for AWS credits on qualifiedpilot projects: http://bit.ly/2uxgV2G Email aws@suse.com for moreinfo30

Let's Begin the Hands on Labs!!!31

General DisclaimerThis document is not to be construed as a promise by any participating company todevelop, deliver, or market a product. It is not a commitment to deliver any material,code, or functionality, and should not be relied upon in making purchasingdecisions. SUSE makes no representations or warranties with respect to the contents ofthis document, and specifically disclaims any express or implied warranties ofmerchantability or fitness for any particular purpose. The development, release, andtiming of features or functionality described for SUSE products remains at the solediscretion of SUSE. Further, SUSE reserves the right to revise this document and tomake changes to its content, at any time, without obligation to notify any person or entityof such revisions or changes. All SUSE marks referenced in this presentation aretrademarks or registered trademarks of SUSE, LLC, Inc. in the United States and othercountries. All third-party trademarks are the property of their respective owners.33

Introduction to CF - SUSE Cloud Application PlatformIMPORTANT! This Hands-On session assumes that you have a running deployment of SUSECloud Application Platform and SUSE Stratos in order to follow the lab below.Deploying your first app manuallyClone the Dora App git clone https://github.com/rbejarano80/dora.git cd doraPush the dora Application cf push dora -b ruby buildpack -s sle15 -k 128m -m 36m --random-routeThis deployment will Fail - find out why by looking into the logs: cf logs dora --recentNotice the ERR shows not enough disk - redeploy with a larger disk size: cf push dora -b ruby buildpack -s sle15 -k 512m -m 36m --random-routeThe Application now will be deployed properly - Take note of the routes section at the bottom ofthe output access the application with a browser or with curl, ie: curl dora-surprised-possum.scf.geeko.landHandling currently running applicationsList the runnign applcations in our designated space: cf appsGet more details on your specific app dora cf app doraConnect to your appliation via SSH cf ssh dora (close with exit )Check the logs generated by the app dora cf logs dora --recentDelete the previously deployed App

cf delete doraDeploying an app with a manifest fileCreate a manifest.yml as we don't want to constantly add the deployment parameters manuallyto each individual App vi manifest.ymlapplications:- name: dorainstances: 1memory: 36Mdisk quota: 512Mrandom-route: truebuildpack: ruby buildpackstack: sle15Re-Deploy the Dora App cf pushRunning multiple instances on different Container Cells is recommended for HA cf scale dora -i 2Fetch the ID of the Container instance being hit by the request - use a browser or curl, ie curl dora-interested-wombat.scf.geeko.land/id curl dora-interested-wombat.scf.geeko.land/id curl dora-interested-wombat.scf.geeko.land/idDelete the dora App deployment cf delete dora cf apps cd Deploy your second appClone the Sinatra App cd git clone https://github.com/rbejarano80/cf-example-sinatra cd cf-example-sinatra

cf push frank -m 64M -k 512MOpen a browser and visit the URL for the frank AppScaling out your appVisit the URL for the frank App, then scale-out the App cf scale frank -i 2Back on the browser, notice the Container value (refresh the page several times)Resource usage App ProfilingAdding Community ReposAdd CF Community Repo to install Plug-Ins cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org/Show App statistics - Installing the plugin cf install-plugin Statistics -r CF-Community cf statistics frank-X (exit with q)# Notice the resource consumptionModify your app and redeployRemove the SUSECON image from the source code in your frank-X App and re-deploy it cf-example-sinatra vi views/index.erb# Delete Line 23 cf push frank-X -m 64M -k 512MScale down the RAM requirements on the flyAs shown on the stats, the App does not require 64M of RAM, let's decrease the sizing cf scale frank-x -m 32M cf statistics frank-XDeploying Pre-Built (docker) Apps cd mkdir dockerapp ; cd dockerapp vi manifest.ymlapplications:

- name: dockerapprandom-route: truememory: 128Minstances: 1docker:image: gruntwork/docker-test-webapphealth-check-type: http cf push cf app dockerapp curl dockerapp-random-name.scf.geeko.land cf delete dockerappWriting your own App in Go cd mkdir goapp ; cd goapp vi hello.gopackage mainimport ("fmt""net/http""os")func main () {http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request){fmt.Fprintf(w, "Hello, you've requested: %s\n", r.URL.Path)})http.ListenAndServe(":" os.Getenv("PORT"), nil)} vi manifest.ymlapplications:- name: goapprandom-route: truememory: 64Minstances: 1buildpack: go buildpackenv: GOPACKAGE: main cf push# Identify why the app deployment failed

# Change the env variable to GOPACKAGENAME and cf push the App again cf apps curl goapp-random-name.scf.geeko.land/more-suse cf delete goappLet's deploy an App from the WebUIOpen https://MY-STRATOS-URL:8443/loginAt the Top Right - Click the Arrow to deploy an AppLeave Cloud Foundry / trainingX / spaceX and click NextSelect Public Github / under Project type: rbejarano80/cf-example-sinatra / Branch: stratos / Click NextChoose the first Commit / Click NextName: frankX / Disk Quota: 512 / Mem Quota: 32 / Select Create a random route / Click DeployFollow the output as the application builds and deploys - Click "Go To App Summary"Look around the provided information in the UI - visit the App by clicking the square/arrow button onthe top Right Corner "Visit"

SUSE Cloud Application Platform 1.5 Modern Application Delivery Platform for Kubernetes SUSE Cloud Foundry has been updated to version 2.18.0 One-step application deployment model -(e.g. cf push) Policy Driven, Fault Tolerant, Self Healing Platform-as-a-Service Infrastructure