SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Declare Your Infrastructure pt 2:
LinuxKit Swarm Nodes
Dave Freitag, IBM
Overview and Comparison
Ubuntu

2GB Image size

3-5 min provision

5 minutes setup time

Runtime Package
Updates

Base security
LinuxKit

190MB Image size

1.5-3 min provision

1 minute setup time

Build-time Package
Updates

Built-in Security
•Swarm nodes on Ubuntu
•LinuxKit Investigation and Future
LinuxKit Swarm Node Architecture
Linux Kernel 4.9.x
init runc containerd ca-certs
Kernel
Init
sysctlOnboot
Services
rngd
docker ssh
syslog
sysfs mount metadata
ntpd
getty
nfs
logrotate
iptables
dns
Scenarios
•Synchronization

Need access to NFS to store/retrieve infrakit files
prior to starting docker
•Serviceability

Need to keep system and audit logs for diagnostics

Administrator needs command line access
Provision Flow - Initial Configuration
resource "ibm_compute_vm_instance" "manager" {
hostname = "${var.name}-mgr1"
image_id = "${var.image_id}"
datacenter = "${var.datacenter}"
...
user_metadata = <<EOD
cat << EOF > ${var.working_dir}/d4ic-vars.json
{
"worker_size":${var.worker_count},
"manager_size":${var.manager_count},
"nfs_id":${nfs_manager.id},
"nfs_mountpoint":"${nfs_manager.mountpoint}",
...
EOD
Terraform
•Initial configuration supplied via user metadata
Provision Flow - Boot
on-boot metadata
onboot: - name: metadata
image: ibm-metadata:latest
binds:
# Cloud drive
- /dev:/dev
# DNS
- /etc/resolv.conf:/etc/resolv.conf
# Logs
- /var/log:/var/log
# SSH Keys
- /var/ibm/.ssh:/var/.ssh
# Userdata
- /var/ibm/metadata:/var/ibm/metadata
# Networking
- /var/ibm/network:/var/ibm/network
# For NFS
- /var/ibm/etc/nfs:/etc/nfs

Cloud metadata container configures network

User metadata copied to filesystem for execution
later
/var/*Network
Cloud drive
/dev/xvdh
onboot:
- name: metadata
image: ibm-metadata:latest
...
binds:
- /var/ibm/metadata:/var/ibm/metadata
- /var/ibm/etc/nfs:/etc/nfs
services:
- name: docker
image: ibm-docker:latest
...
binds:
- /var:/var:rshared,rbind
- /var/ibm/etc/nfs:/etc/nfs
- name: nfs
image: ibm-nfs:latest
...
binds:
- /var:/var:rshared,rbind
- /var/ibm/etc/nfs:/etc/nfs
Data Flow - Filesystem Access
/var
metadata
nfs
docker

Onboot and service
containers share access to
common storage volume
Data Flow - Initial Configuration
docker
metadata
nfs
Cloud-init Drive
/dev/xvdh
SCOPE=docker sh userdata.sh
...
if [ "$SCOPE" == "docker" ]; then
/configure-docker.sh
fi
SCOPE=nfs sh userdata.sh
...
if [ "$SCOPE" == "nfs" ]; then
/nfs.sh $NFS_MOUNTPOINT $LOCAL_MOUNTPOINT
fi

Each service container runs their own portion of
the configuration script
Data Flow - Synchronization
docker
metadata
nfs
if [ -f /etc/nfs/nfslock ]; then
echo "NFS locked, waiting for NFS."
while true; do
grep "0" /etc/nfs/nfslock
if [ $? -ne 0 ]; then
echo "NFS ready, continuing."
break
fi
echo "NFS not ready, waiting."
sleep 2
done
fi
if [ "$NFS" == "1" ]; then
echo "0" > /etc/nfs/nfslock
fi
/sbin/rpcbind -d
if [ -f $USERDATA_FILE ]; then
"SCOPE=nfs sh $USERDATA_FILE
fi
./nfs.sh $MOUNT_POINT $LOCAL_MOUNTPOINT
# Finished mounting NFS.
echo "Unlocking NFS."
echo "1" > /etc/nfs/nfslock

Metadata initializes lock for NFS

Docker waits on NFS lock before continuing
25GB
</dev/xvda1>
/var
mount
syslog
logrotate
Serviceability - Logging and Auditing

Persistent storage volume mounted at boot

All on-boot and service containers log to /var/log

Container logs to /var/lib/docker/...

Syslog captures kernel output, boot logs

Logrotate keeps file sizes in check
docker
Serviceability - Administration

SSH container with public-key
access

Console (Getty) container
available for private network
access only
ssh
Console
Internet
Private 10.x.x.x
Network
Serviceability - Network Overrides

Provide ability to respond to external network
failures

dnsmasq service with hosts file
InternetSwarm
DNS
HTTP Service
Demo, Q/A? Thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortalsHenryk Konsek
 
Container-relevant Upstream Kernel Developments
Container-relevant Upstream Kernel DevelopmentsContainer-relevant Upstream Kernel Developments
Container-relevant Upstream Kernel DevelopmentsDocker, Inc.
 
AtlasCamp 2015: How to deliver radical architectural change without the custo...
AtlasCamp 2015: How to deliver radical architectural change without the custo...AtlasCamp 2015: How to deliver radical architectural change without the custo...
AtlasCamp 2015: How to deliver radical architectural change without the custo...Atlassian
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneIntroduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneD
 
CoreOS @ summer meetup in Utrecht
CoreOS @ summer meetup in UtrechtCoreOS @ summer meetup in Utrecht
CoreOS @ summer meetup in UtrechtTimo Derstappen
 
Containers in production with Docker, CoreOS, Kubernetes and Apache Stratos
Containers in production with Docker, CoreOS, Kubernetes and Apache StratosContainers in production with Docker, CoreOS, Kubernetes and Apache Stratos
Containers in production with Docker, CoreOS, Kubernetes and Apache StratosLakmal Warusawithana
 
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Trevor Roberts Jr.
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Nicolas De Loof
 
Automatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confdAutomatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confd충섭 김
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalMichelle Antebi
 
Docker volume-isolator-in-mesos
Docker volume-isolator-in-mesosDocker volume-isolator-in-mesos
Docker volume-isolator-in-mesosGuangya Liu
 
Kubernetes Basic Operation
Kubernetes Basic OperationKubernetes Basic Operation
Kubernetes Basic OperationSimon Su
 
Docker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know nowDocker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know nowPLUMgrid
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with SysdigSreenivas Makam
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 

Was ist angesagt? (20)

Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Container-relevant Upstream Kernel Developments
Container-relevant Upstream Kernel DevelopmentsContainer-relevant Upstream Kernel Developments
Container-relevant Upstream Kernel Developments
 
AtlasCamp 2015: How to deliver radical architectural change without the custo...
AtlasCamp 2015: How to deliver radical architectural change without the custo...AtlasCamp 2015: How to deliver radical architectural change without the custo...
AtlasCamp 2015: How to deliver radical architectural change without the custo...
 
CoreOS intro
CoreOS introCoreOS intro
CoreOS intro
 
CoreOS Intro
CoreOS IntroCoreOS Intro
CoreOS Intro
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneIntroduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group Cologne
 
CoreOS @ summer meetup in Utrecht
CoreOS @ summer meetup in UtrechtCoreOS @ summer meetup in Utrecht
CoreOS @ summer meetup in Utrecht
 
Containers in production with Docker, CoreOS, Kubernetes and Apache Stratos
Containers in production with Docker, CoreOS, Kubernetes and Apache StratosContainers in production with Docker, CoreOS, Kubernetes and Apache Stratos
Containers in production with Docker, CoreOS, Kubernetes and Apache Stratos
 
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
 
Automatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confdAutomatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confd
 
CoreOS Overview
CoreOS OverviewCoreOS Overview
CoreOS Overview
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
 
Docker up and running
Docker up and runningDocker up and running
Docker up and running
 
Docker volume-isolator-in-mesos
Docker volume-isolator-in-mesosDocker volume-isolator-in-mesos
Docker volume-isolator-in-mesos
 
Kubernetes Basic Operation
Kubernetes Basic OperationKubernetes Basic Operation
Kubernetes Basic Operation
 
Docker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know nowDocker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know now
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with Sysdig
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 

Ähnlich wie LinuxKit Swarm Nodes

Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Sebastien Chabrolles
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 
Domino9on centos6
Domino9on centos6Domino9on centos6
Domino9on centos6a8us
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxJazz Yao-Tsung Wang
 
Flex pod driven by Openstack
Flex pod driven by OpenstackFlex pod driven by Openstack
Flex pod driven by OpenstackMarton Kiss
 
Really useful linux commands
Really useful linux commandsReally useful linux commands
Really useful linux commandsMichael J Geiser
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesNovell
 
Infrastructure as code with Docker and fig
Infrastructure as code with Docker and figInfrastructure as code with Docker and fig
Infrastructure as code with Docker and figpranas_algoteq
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 

Ähnlich wie LinuxKit Swarm Nodes (20)

testing-nfs
testing-nfstesting-nfs
testing-nfs
 
Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
Domino9on centos6
Domino9on centos6Domino9on centos6
Domino9on centos6
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in Linux
 
Flex pod driven by Openstack
Flex pod driven by OpenstackFlex pod driven by Openstack
Flex pod driven by Openstack
 
Really useful linux commands
Really useful linux commandsReally useful linux commands
Really useful linux commands
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
 
RunX ELCE 2020
RunX ELCE 2020RunX ELCE 2020
RunX ELCE 2020
 
Infrastructure as code with Docker and fig
Infrastructure as code with Docker and figInfrastructure as code with Docker and fig
Infrastructure as code with Docker and fig
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 
Nfs
NfsNfs
Nfs
 
Linux configer
Linux configerLinux configer
Linux configer
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
Puppet
PuppetPuppet
Puppet
 
Slim Server Practical
Slim Server PracticalSlim Server Practical
Slim Server Practical
 
Docker
DockerDocker
Docker
 
Sheep it
Sheep itSheep it
Sheep it
 

Mehr von Moby Project

Libnetwork updates
Libnetwork updatesLibnetwork updates
Libnetwork updatesMoby Project
 
Notary - container signing
Notary - container signingNotary - container signing
Notary - container signingMoby Project
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyMoby Project
 
Moby Summit introduction
Moby Summit introductionMoby Summit introduction
Moby Summit introductionMoby Project
 
Moby and kubernetes entitlements
Moby and kubernetes entitlementsMoby and kubernetes entitlements
Moby and kubernetes entitlementsMoby Project
 
Builder and BuildKit
Builder and BuildKitBuilder and BuildKit
Builder and BuildKitMoby Project
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsMoby Project
 
The State of containerd
The State of containerdThe State of containerd
The State of containerdMoby Project
 
LinuxKit and OpenOverlay
LinuxKit and OpenOverlayLinuxKit and OpenOverlay
LinuxKit and OpenOverlayMoby Project
 

Mehr von Moby Project (12)

Libnetwork updates
Libnetwork updatesLibnetwork updates
Libnetwork updates
 
CRI-containerd
CRI-containerdCRI-containerd
CRI-containerd
 
FaaS-and-Furious
FaaS-and-FuriousFaaS-and-Furious
FaaS-and-Furious
 
LinuxKit
LinuxKitLinuxKit
LinuxKit
 
Notary - container signing
Notary - container signingNotary - container signing
Notary - container signing
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and Moby
 
Moby Summit introduction
Moby Summit introductionMoby Summit introduction
Moby Summit introduction
 
Moby and kubernetes entitlements
Moby and kubernetes entitlementsMoby and kubernetes entitlements
Moby and kubernetes entitlements
 
Builder and BuildKit
Builder and BuildKitBuilder and BuildKit
Builder and BuildKit
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functions
 
The State of containerd
The State of containerdThe State of containerd
The State of containerd
 
LinuxKit and OpenOverlay
LinuxKit and OpenOverlayLinuxKit and OpenOverlay
LinuxKit and OpenOverlay
 

Kürzlich hochgeladen

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Kürzlich hochgeladen (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

LinuxKit Swarm Nodes

  • 1. Declare Your Infrastructure pt 2: LinuxKit Swarm Nodes Dave Freitag, IBM
  • 2. Overview and Comparison Ubuntu  2GB Image size  3-5 min provision  5 minutes setup time  Runtime Package Updates  Base security LinuxKit  190MB Image size  1.5-3 min provision  1 minute setup time  Build-time Package Updates  Built-in Security •Swarm nodes on Ubuntu •LinuxKit Investigation and Future
  • 3. LinuxKit Swarm Node Architecture Linux Kernel 4.9.x init runc containerd ca-certs Kernel Init sysctlOnboot Services rngd docker ssh syslog sysfs mount metadata ntpd getty nfs logrotate iptables dns
  • 4. Scenarios •Synchronization  Need access to NFS to store/retrieve infrakit files prior to starting docker •Serviceability  Need to keep system and audit logs for diagnostics  Administrator needs command line access
  • 5. Provision Flow - Initial Configuration resource "ibm_compute_vm_instance" "manager" { hostname = "${var.name}-mgr1" image_id = "${var.image_id}" datacenter = "${var.datacenter}" ... user_metadata = <<EOD cat << EOF > ${var.working_dir}/d4ic-vars.json { "worker_size":${var.worker_count}, "manager_size":${var.manager_count}, "nfs_id":${nfs_manager.id}, "nfs_mountpoint":"${nfs_manager.mountpoint}", ... EOD Terraform •Initial configuration supplied via user metadata
  • 6. Provision Flow - Boot on-boot metadata onboot: - name: metadata image: ibm-metadata:latest binds: # Cloud drive - /dev:/dev # DNS - /etc/resolv.conf:/etc/resolv.conf # Logs - /var/log:/var/log # SSH Keys - /var/ibm/.ssh:/var/.ssh # Userdata - /var/ibm/metadata:/var/ibm/metadata # Networking - /var/ibm/network:/var/ibm/network # For NFS - /var/ibm/etc/nfs:/etc/nfs  Cloud metadata container configures network  User metadata copied to filesystem for execution later /var/*Network Cloud drive /dev/xvdh
  • 7. onboot: - name: metadata image: ibm-metadata:latest ... binds: - /var/ibm/metadata:/var/ibm/metadata - /var/ibm/etc/nfs:/etc/nfs services: - name: docker image: ibm-docker:latest ... binds: - /var:/var:rshared,rbind - /var/ibm/etc/nfs:/etc/nfs - name: nfs image: ibm-nfs:latest ... binds: - /var:/var:rshared,rbind - /var/ibm/etc/nfs:/etc/nfs Data Flow - Filesystem Access /var metadata nfs docker  Onboot and service containers share access to common storage volume
  • 8. Data Flow - Initial Configuration docker metadata nfs Cloud-init Drive /dev/xvdh SCOPE=docker sh userdata.sh ... if [ "$SCOPE" == "docker" ]; then /configure-docker.sh fi SCOPE=nfs sh userdata.sh ... if [ "$SCOPE" == "nfs" ]; then /nfs.sh $NFS_MOUNTPOINT $LOCAL_MOUNTPOINT fi  Each service container runs their own portion of the configuration script
  • 9. Data Flow - Synchronization docker metadata nfs if [ -f /etc/nfs/nfslock ]; then echo "NFS locked, waiting for NFS." while true; do grep "0" /etc/nfs/nfslock if [ $? -ne 0 ]; then echo "NFS ready, continuing." break fi echo "NFS not ready, waiting." sleep 2 done fi if [ "$NFS" == "1" ]; then echo "0" > /etc/nfs/nfslock fi /sbin/rpcbind -d if [ -f $USERDATA_FILE ]; then "SCOPE=nfs sh $USERDATA_FILE fi ./nfs.sh $MOUNT_POINT $LOCAL_MOUNTPOINT # Finished mounting NFS. echo "Unlocking NFS." echo "1" > /etc/nfs/nfslock  Metadata initializes lock for NFS  Docker waits on NFS lock before continuing
  • 10. 25GB </dev/xvda1> /var mount syslog logrotate Serviceability - Logging and Auditing  Persistent storage volume mounted at boot  All on-boot and service containers log to /var/log  Container logs to /var/lib/docker/...  Syslog captures kernel output, boot logs  Logrotate keeps file sizes in check docker
  • 11. Serviceability - Administration  SSH container with public-key access  Console (Getty) container available for private network access only ssh Console Internet Private 10.x.x.x Network
  • 12. Serviceability - Network Overrides  Provide ability to respond to external network failures  dnsmasq service with hosts file InternetSwarm DNS HTTP Service