SlideShare une entreprise Scribd logo
1  sur  31
Mandi Walls
Technical Community Manager
@lnxchk
mandi@chef.io
https://habitat.sh
#habitatsh
http://slack.habitat.sh/
Chef and Automation
• Infrastructure Automation
• Cloud early adopters
• Digital Transformation
• Compliance Automation with InSpec
• Application Automation with Habitat
How Do We Run Applications?
• On a computer
• With an OS
• And some libraries
• And some configuration
• And some way to start it and stop it
We’ve been moving complexity
around rather than reducing it
Complexity Multiplies as Infrastructure Ages
def default_apache_version
return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '10.04'
return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '12.04'
return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '13.04'
return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '13.10'
return '2.2' if node['platform_family'] == 'debian' && node['platform_version'].to_i == 6
return '2.2' if node['platform_family'] == 'debian' && node['platform_version'].to_i == 7
return '2.2' if node['platform_family'] == 'freebsd'
return '2.2' if node['platform_family'] == 'omnios'
return '2.2' if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 5
return '2.2' if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 6
return '2.2' if node['platform_family'] == 'suse'
return '2.4' if node['platform_family'] == 'debian' && node['platform_version'] == '14.04'
return '2.4' if node['platform_family'] == 'debian' && node['platform_version'] == '14.10'
...
end
Value and Work is Shifting
Application
centric
operations
Infrastructure
centric
operations
UNIT OF VALUE is app
UNIT OF WORK is deployment
UNIT OF VALUE is server
UNIT OF WORK is configuration
Cloud
Containers
Microservices
Artifact Inclusions
Libraries and
Runtimes
Operating System
Application
Application Libraries Application,
Runtimes, &
Libraries
OS
Container formats recreate the traditional
model of infrastructure and applications.
Poor at abstracting the Build + Run
aspects of Applications
Ties dependencies to OS versions
Habitat builds from the application down
Small lightweight OS included
Embedded Supervisor for Application
Management
Builds have strict dependency version control
Container Habitat
Hart
So. Habitat.
• Ignore the underlying platform as much as possible
• Support microservices
• Manage container creep
• Make your workflow smoother
https://www.bonanza.com/listings/Premier-Food-Storage-Containers-20-Piece-Set-Grey/443972348
How Does Habitat Benefit Your Team
• Build once, run anywhere immutable artifacts
• Developers – Get the exact libraries needed,
regardless of OS version
• Test / QA – Easier maintenance of test
environments
• Operators – Run Linux habs on any distro
• Security – Query live services at runtime for
potential vulnerabilities
Other Features
• Defer configuration decisions to runtime
• Build in a "clean room" : no accidental
dependencies
• Service runtime and discovery
• Configuration exposed via API
• Signed packages for your organization
Cloud Native Applications with Habitat
Habitat
Supervisor
Habitat Builder
BUILD DEPLOY MANAGE
Habitat
Supervisor
PUBLIC
ORIGIN
PRIVATE
ORIGIN
Sample Application
• container_sched_backend – small rust application
• Runs on Linux in a cluster
• The code is plugged into the Habitat Builder service
for automatic builds
• Application has a configuration setting for "favorite
color"
Github Repository
Builder Package Registry
Leave it to Builder
• Build service
• And an artifact store
• Private repos
• Check code in to GitHub,
let Builder create your
artifact
• On-Prem version is depot
only right now
CLOUD/INFRA
BUILDSERVICE
APPLICATION RUNTIME
APPLICATIONSUPERVISION
APPLICATION & DATA SERVICES
SCHEDULING AND ORCHESTRATION
APPLICATION CODE
ARTIFACTSTORE
Container Integrations
Habitat Files Travel with the App Code
Have a Plan
pkg_name=container_sched_backend
pkg_origin=lnxchk pkg_version="0.1.0" pkg_build_deps=(core/rust)
pkg_deps=(core/glibc core/gcc core/gcc-libs)
pkg_bin_dirs=(bin)
bin="container_sched_backend"
pkg_exports=([out]=cfg.out)
do_build() {
cargo build
}
do_install() {
install -v -D "$PLAN_CONTEXT/../target/debug/$bin"  "$pkg_prefix/bin/$bin”
}
pkg_svc_run="$bin"
Metadata
Build
Install
Run
Build Output
• By default, it’s a hart – a compressed tarball with
some metadata and a signature
• You can export to other formats, like Docker
containers
• The hart itself it runnable
Run a Hart
• Set up a first host: leader/follower topology and
rolling updates
sudo hab sup run lnxchk/container_sched_backend --
topology leader --strategy rolling
• Connect additional nodes to the ring, giving them a
peer to attach to
sudo hab sup run lnxchk/container_sched_backend --
strategy rolling --peer 172.31.37.193
Updating Configuration at Runtime
• Update all or part of the configuration while the
apps are running
• Send the update to a member of the mesh and they
will all update
sudo hab config apply 
container_sched_backend.default 2 new.toml
Channels and Service Groups
• Builder can have multiple channels where harts are
published
Default is "unstable", can promote via CLI or web
A cluster can subscribe to any channel, will use "stable" by
default
• Service groups in the cluster have their name
appended to the artifact name
container_sched_backend.default
Querying the API
• Rest api on port 9631
• /services endpoint for information about the running
services
• Query it with some simple tools
https://github.com/lnxchk/hab_tools
Show the dependencies
$ ./hab_deps.rb
lnxchk/container_sched_backend/0.1.3/20181003183354
|- core/binutils/2.30/20180608050633
|- core/gcc-libs/7.3.0/20180608091701
|- core/gcc/7.3.0/20180608051919
|- core/glibc/2.27/20180608041157
|- core/gmp/6.1.2/20180608051426
|- core/libmpc/1.1.0/20180608051824
|- core/linux-headers/4.15.9/20180608041107
|- core/mpfr/4.0.1/20180608051629
|- core/zlib/1.2.11/20180608050617
Search for a package with a vulnerability
$ ./hab_deps_search.rb -d core/mpfr/4.0.1/20180608051629
searching host localhost for dep core/mpfr/4.0.1/20180608051629
lnxchk/container_sched_backend/0.1.3/20181003183354 matches
Check the whole group is on the same version
$ ./hab_service_versions.rb -h localhost -g container_sched_backend.default
searching host localhost for dep container_sched_backend.default
172.31.39.99 has version lnxchk/container_sched_backend/0.1.3/20181003183354
172.31.37.152 has version lnxchk/container_sched_backend/0.1.3/20181003183354
172.31.46.78 has version lnxchk/container_sched_backend/0.1.3/20181003183354
172.31.35.43 has version lnxchk/container_sched_backend/0.1.3/20181003183354
Automatic Updates
• Started the supervisors with "--strategy
rolling" to allow for rolling updates
Also none – no auto updates; and at-once for all at once
updates
• This app is hooked through builder, so update from
github can push updates to the running instances
• Packages published to channels
Promote to stable for subscriber updates or subscribe to
other channels at runtime
Shortcut for common platforms: Scaffolding
• Default core-built dependencies for common
runtimes
• Ruby and Node so farpkg_name=MY_APP
pkg_origin=MY_ORIGIN
pkg_version=MY_VERSION
pkg_scaffolding=core/scaffolding-ruby
https://www.habitat.sh/docs/concepts-scaffolding/
Summary
• Single build pathway from Github through to
deployment
• Run Linux-based instances on any distribution
• Update configuration at runtime
• Verify the live environment via REST API
• Targeted platforms: Java, node.js, Ruby, Windows
.NET
Join Us!
• On Slack
http://slack.habitat.sh
• Online! With Tutorials
https://www.habitat.sh/
• On Github
https://github.com/habitat-sh

Contenu connexe

Tendances

Docker swarm
Docker swarmDocker swarm
Docker swarm
Kalkey
 

Tendances (20)

DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Java one kubernetes, jenkins and microservices
Java one   kubernetes, jenkins and microservicesJava one   kubernetes, jenkins and microservices
Java one kubernetes, jenkins and microservices
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher Kubernetes
 
DCEU 18: 5 Patterns for Success in Application Transformation
DCEU 18: 5 Patterns for Success in Application TransformationDCEU 18: 5 Patterns for Success in Application Transformation
DCEU 18: 5 Patterns for Success in Application Transformation
 
DCEU 18: Docker Containers in a Serverless World
DCEU 18: Docker Containers in a Serverless WorldDCEU 18: Docker Containers in a Serverless World
DCEU 18: Docker Containers in a Serverless World
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
 
Monitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsMonitoring docker container and dockerized applications
Monitoring docker container and dockerized applications
 
The Mushroom Cloud Effect or What Happens When Containers Fail? by Alois Mayr...
The Mushroom Cloud Effect or What Happens When Containers Fail? by Alois Mayr...The Mushroom Cloud Effect or What Happens When Containers Fail? by Alois Mayr...
The Mushroom Cloud Effect or What Happens When Containers Fail? by Alois Mayr...
 
How HashiCorp platform tools can make the difference in development and deplo...
How HashiCorp platform tools can make the difference in development and deplo...How HashiCorp platform tools can make the difference in development and deplo...
How HashiCorp platform tools can make the difference in development and deplo...
 
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
 
Containers in depth – Understanding how containers work to better work with c...
Containers in depth – Understanding how containers work to better work with c...Containers in depth – Understanding how containers work to better work with c...
Containers in depth – Understanding how containers work to better work with c...
 
Deploying OpenStack Using Docker in Production
Deploying OpenStack Using Docker in ProductionDeploying OpenStack Using Docker in Production
Deploying OpenStack Using Docker in Production
 
Webcast - Making kubernetes production ready
Webcast - Making kubernetes production readyWebcast - Making kubernetes production ready
Webcast - Making kubernetes production ready
 
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
DevOps: Infrastructure as Code
DevOps: Infrastructure as CodeDevOps: Infrastructure as Code
DevOps: Infrastructure as Code
 
Net Devops Overview
Net Devops OverviewNet Devops Overview
Net Devops Overview
 

Similaire à Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018

Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
Sébastien Le Gall
 

Similaire à Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018 (20)

Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
 
Habitat Workshop at Velocity London 2017
Habitat Workshop at Velocity London 2017Habitat Workshop at Velocity London 2017
Habitat Workshop at Velocity London 2017
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
IBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudIBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the Cloud
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopCloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment Workshop
 
habitat at docker bud
habitat at docker budhabitat at docker bud
habitat at docker bud
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
Application Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternativeApplication Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternative
 

Plus de Mandi Walls

Addo reducing trauma in organizations with SLOs and chaos engineering
Addo  reducing trauma in organizations with SLOs and chaos engineeringAddo  reducing trauma in organizations with SLOs and chaos engineering
Addo reducing trauma in organizations with SLOs and chaos engineering
Mandi Walls
 

Plus de Mandi Walls (20)

DOD Raleigh Gamedays with Chaos Engineering.pdf
DOD Raleigh Gamedays with Chaos Engineering.pdfDOD Raleigh Gamedays with Chaos Engineering.pdf
DOD Raleigh Gamedays with Chaos Engineering.pdf
 
Addo reducing trauma in organizations with SLOs and chaos engineering
Addo  reducing trauma in organizations with SLOs and chaos engineeringAddo  reducing trauma in organizations with SLOs and chaos engineering
Addo reducing trauma in organizations with SLOs and chaos engineering
 
Full Service Ownership
Full Service OwnershipFull Service Ownership
Full Service Ownership
 
PagerDuty: Best Practices for On Call Teams
PagerDuty: Best Practices for On Call TeamsPagerDuty: Best Practices for On Call Teams
PagerDuty: Best Practices for On Call Teams
 
InSpec at DevOps ATL Meetup January 22, 2020
InSpec at DevOps ATL Meetup January 22, 2020InSpec at DevOps ATL Meetup January 22, 2020
InSpec at DevOps ATL Meetup January 22, 2020
 
Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019
 
Using Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure SecurityUsing Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure Security
 
Adding Security to Your Workflow With InSpec - SCaLE17x
Adding Security to Your Workflow With InSpec - SCaLE17xAdding Security to Your Workflow With InSpec - SCaLE17x
Adding Security to Your Workflow With InSpec - SCaLE17x
 
BuildStuff.LT 2018 InSpec Workshop
BuildStuff.LT 2018 InSpec WorkshopBuildStuff.LT 2018 InSpec Workshop
BuildStuff.LT 2018 InSpec Workshop
 
InSpec Workshop at Velocity London 2018
InSpec Workshop at Velocity London 2018InSpec Workshop at Velocity London 2018
InSpec Workshop at Velocity London 2018
 
DevOpsDays InSpec Workshop
DevOpsDays InSpec WorkshopDevOpsDays InSpec Workshop
DevOpsDays InSpec Workshop
 
Adding Security and Compliance to Your Workflow with InSpec
Adding Security and Compliance to Your Workflow with InSpecAdding Security and Compliance to Your Workflow with InSpec
Adding Security and Compliance to Your Workflow with InSpec
 
InSpec - June 2018 at Open28.be
InSpec - June 2018 at Open28.beInSpec - June 2018 at Open28.be
InSpec - June 2018 at Open28.be
 
Ingite Slides for InSpec
Ingite Slides for InSpecIngite Slides for InSpec
Ingite Slides for InSpec
 
Habitat at LinuxLab IT
Habitat at LinuxLab ITHabitat at LinuxLab IT
Habitat at LinuxLab IT
 
InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017
 
InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017
 
Habitat at SRECon
Habitat at SREConHabitat at SRECon
Habitat at SRECon
 
InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017
 
Containerdays Intro to Habitat
Containerdays Intro to HabitatContainerdays Intro to Habitat
Containerdays Intro to Habitat
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018

  • 1.
  • 2. Mandi Walls Technical Community Manager @lnxchk mandi@chef.io https://habitat.sh #habitatsh http://slack.habitat.sh/
  • 3. Chef and Automation • Infrastructure Automation • Cloud early adopters • Digital Transformation • Compliance Automation with InSpec • Application Automation with Habitat
  • 4. How Do We Run Applications? • On a computer • With an OS • And some libraries • And some configuration • And some way to start it and stop it
  • 5. We’ve been moving complexity around rather than reducing it
  • 6. Complexity Multiplies as Infrastructure Ages def default_apache_version return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '10.04' return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '12.04' return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '13.04' return '2.2' if node['platform_family'] == 'debian' && node['platform_version'] == '13.10' return '2.2' if node['platform_family'] == 'debian' && node['platform_version'].to_i == 6 return '2.2' if node['platform_family'] == 'debian' && node['platform_version'].to_i == 7 return '2.2' if node['platform_family'] == 'freebsd' return '2.2' if node['platform_family'] == 'omnios' return '2.2' if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 5 return '2.2' if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 6 return '2.2' if node['platform_family'] == 'suse' return '2.4' if node['platform_family'] == 'debian' && node['platform_version'] == '14.04' return '2.4' if node['platform_family'] == 'debian' && node['platform_version'] == '14.10' ... end
  • 7. Value and Work is Shifting Application centric operations Infrastructure centric operations UNIT OF VALUE is app UNIT OF WORK is deployment UNIT OF VALUE is server UNIT OF WORK is configuration Cloud Containers Microservices
  • 8. Artifact Inclusions Libraries and Runtimes Operating System Application Application Libraries Application, Runtimes, & Libraries OS Container formats recreate the traditional model of infrastructure and applications. Poor at abstracting the Build + Run aspects of Applications Ties dependencies to OS versions Habitat builds from the application down Small lightweight OS included Embedded Supervisor for Application Management Builds have strict dependency version control Container Habitat Hart
  • 9. So. Habitat. • Ignore the underlying platform as much as possible • Support microservices • Manage container creep • Make your workflow smoother https://www.bonanza.com/listings/Premier-Food-Storage-Containers-20-Piece-Set-Grey/443972348
  • 10. How Does Habitat Benefit Your Team • Build once, run anywhere immutable artifacts • Developers – Get the exact libraries needed, regardless of OS version • Test / QA – Easier maintenance of test environments • Operators – Run Linux habs on any distro • Security – Query live services at runtime for potential vulnerabilities
  • 11. Other Features • Defer configuration decisions to runtime • Build in a "clean room" : no accidental dependencies • Service runtime and discovery • Configuration exposed via API • Signed packages for your organization
  • 12. Cloud Native Applications with Habitat Habitat Supervisor Habitat Builder BUILD DEPLOY MANAGE Habitat Supervisor PUBLIC ORIGIN PRIVATE ORIGIN
  • 13. Sample Application • container_sched_backend – small rust application • Runs on Linux in a cluster • The code is plugged into the Habitat Builder service for automatic builds • Application has a configuration setting for "favorite color"
  • 16. Leave it to Builder • Build service • And an artifact store • Private repos • Check code in to GitHub, let Builder create your artifact • On-Prem version is depot only right now CLOUD/INFRA BUILDSERVICE APPLICATION RUNTIME APPLICATIONSUPERVISION APPLICATION & DATA SERVICES SCHEDULING AND ORCHESTRATION APPLICATION CODE ARTIFACTSTORE
  • 18. Habitat Files Travel with the App Code
  • 19. Have a Plan pkg_name=container_sched_backend pkg_origin=lnxchk pkg_version="0.1.0" pkg_build_deps=(core/rust) pkg_deps=(core/glibc core/gcc core/gcc-libs) pkg_bin_dirs=(bin) bin="container_sched_backend" pkg_exports=([out]=cfg.out) do_build() { cargo build } do_install() { install -v -D "$PLAN_CONTEXT/../target/debug/$bin" "$pkg_prefix/bin/$bin” } pkg_svc_run="$bin" Metadata Build Install Run
  • 20. Build Output • By default, it’s a hart – a compressed tarball with some metadata and a signature • You can export to other formats, like Docker containers • The hart itself it runnable
  • 21. Run a Hart • Set up a first host: leader/follower topology and rolling updates sudo hab sup run lnxchk/container_sched_backend -- topology leader --strategy rolling • Connect additional nodes to the ring, giving them a peer to attach to sudo hab sup run lnxchk/container_sched_backend -- strategy rolling --peer 172.31.37.193
  • 22. Updating Configuration at Runtime • Update all or part of the configuration while the apps are running • Send the update to a member of the mesh and they will all update sudo hab config apply container_sched_backend.default 2 new.toml
  • 23. Channels and Service Groups • Builder can have multiple channels where harts are published Default is "unstable", can promote via CLI or web A cluster can subscribe to any channel, will use "stable" by default • Service groups in the cluster have their name appended to the artifact name container_sched_backend.default
  • 24. Querying the API • Rest api on port 9631 • /services endpoint for information about the running services • Query it with some simple tools https://github.com/lnxchk/hab_tools
  • 25. Show the dependencies $ ./hab_deps.rb lnxchk/container_sched_backend/0.1.3/20181003183354 |- core/binutils/2.30/20180608050633 |- core/gcc-libs/7.3.0/20180608091701 |- core/gcc/7.3.0/20180608051919 |- core/glibc/2.27/20180608041157 |- core/gmp/6.1.2/20180608051426 |- core/libmpc/1.1.0/20180608051824 |- core/linux-headers/4.15.9/20180608041107 |- core/mpfr/4.0.1/20180608051629 |- core/zlib/1.2.11/20180608050617
  • 26. Search for a package with a vulnerability $ ./hab_deps_search.rb -d core/mpfr/4.0.1/20180608051629 searching host localhost for dep core/mpfr/4.0.1/20180608051629 lnxchk/container_sched_backend/0.1.3/20181003183354 matches
  • 27. Check the whole group is on the same version $ ./hab_service_versions.rb -h localhost -g container_sched_backend.default searching host localhost for dep container_sched_backend.default 172.31.39.99 has version lnxchk/container_sched_backend/0.1.3/20181003183354 172.31.37.152 has version lnxchk/container_sched_backend/0.1.3/20181003183354 172.31.46.78 has version lnxchk/container_sched_backend/0.1.3/20181003183354 172.31.35.43 has version lnxchk/container_sched_backend/0.1.3/20181003183354
  • 28. Automatic Updates • Started the supervisors with "--strategy rolling" to allow for rolling updates Also none – no auto updates; and at-once for all at once updates • This app is hooked through builder, so update from github can push updates to the running instances • Packages published to channels Promote to stable for subscriber updates or subscribe to other channels at runtime
  • 29. Shortcut for common platforms: Scaffolding • Default core-built dependencies for common runtimes • Ruby and Node so farpkg_name=MY_APP pkg_origin=MY_ORIGIN pkg_version=MY_VERSION pkg_scaffolding=core/scaffolding-ruby https://www.habitat.sh/docs/concepts-scaffolding/
  • 30. Summary • Single build pathway from Github through to deployment • Run Linux-based instances on any distribution • Update configuration at runtime • Verify the live environment via REST API • Targeted platforms: Java, node.js, Ruby, Windows .NET
  • 31. Join Us! • On Slack http://slack.habitat.sh • Online! With Tutorials https://www.habitat.sh/ • On Github https://github.com/habitat-sh

Notes de l'éditeur

  1. On prem or in the cloud. Or in a hybrid cloud. Or in containers. Or something. On Ubuntu. Or on Red Hat. Or on CentOS if it’s not production. Or that one weird team that wants something else. OS, distribution, version? Packaging type? Initialization system type? Omg it’s systemd Where does it live? /opt /bin /company How to config? .conf .json .yml .dat What version of the language runtime??
  2. There are still plenty of projects and workloads that are in the process of being modernized and rehomed on new architectures. Newer projects are often considering a containers-first approach
  3. Because the part of the habitat package that interfaces with the OS is small, hab packages can be run in a much more distribution-agnostic way, especially on Linux. If you're targeting a linux platform, it can be Debian/Ubuntu, CentOS/RedHat, or other distributions (aws, oracle cloud, arch linux, etc)
  4. Habitat aims to take the chaos and snowflakeness out of running applications With the move towards microservices and increasingly distributed systems, taming this chaos is important The application comes first
  5. Single build can be run natively or in containers Run one, run many. Hook them together via the supervisor or not Don’t have to care what’s already on the target systems. Bring all your stuff with you – and only what you need Share your plan.sh files with others via depot