SlideShare a Scribd company logo
1 of 33
rsyslog meets Docker
alles easy, oder?
Rainer Gerhards
Agenda
• How we got started
• Some Use Cases
• Syslog Appliance Containers
• Introducing Meta-Config Layer
• Proper Structure – the “Container Stack”
• Some more Relations on rsyslog Development
Containers? Umm, yes...
• of course, we knew about containers - but we did not care ;-)
• Had a very long TODO list with non-container things, but...
▫ we have seen some users post container defs to help troubleshoot issues
▫ occasionally, containers were briefly mentioned in the in issue trackers
▫ and of course we knew they went into more and more widespread use
Real Interest
• Curiosity wins...
▫ isn’t it time to at least know better what’s required?
▫ can we do something with them?
▫ can we help our users to be more productive?
▫ and a bit of “I want to know how it works in practice” (kind of pet project
TBH...)
• Still we (thought we) had no real use case for ourselves, but the desire
(and approval) to get going
First Steps
• Focus: Docker (and pure Docker!)
• Learn to build and use containers
• First surprises:
▫ Ah! Thus folks are interested in omstdout…
▫ Oh, that’s why they would like to have ctl-c enabled in non-debug mode
▫ Oops, the environment can be pretty unreliable (think: queue files and
shutdown timeout)...
Understanding Use Cases
• syslog appliance
▫ ready to run system, setup for logging
▫ user base not necessarily much interested in logging, just “get it going”
• high-end syslog server
▫ main interest fresh and current functionality
▫ for the experts
• rsyslog project itself
▫ surprise, surprise: CI and build system
▫ reproducible builds setup in easier way then VMs
Background: rsyslog CI
• Local environment
▫ Primarily manual test for single functionality
• Travis
▫ Full test suite
▫ Different environments (but limited to Travis images)
▫ Static analyzer (clang, Coverity [daily])
▫ Originally limited to Travis Images
• BuildBot
▫ More environments, including Solaris
▫ “Final Approval” Step
▫ “costly” (time-wise)
CI: the static analyzer problem
• We use clang static analyzer in CI
▫ great for QA
▫ but caused considerable pain
 vastly different versions in CI and on WS OS
 even worse: no way to disable false positives
 very hard to reproduce CI failures - pain to fix
• initial “solution”: try to get everyone on the same page
• did not work out, not even in CI ...
the static analyzer problem - II
• Next Try
▫ single CI system, Buildbot only
▫ exposing CI run static analysis result
▫ works ok, but now requires full CI just to get analyzer result
• real solution: container with latest stable version of analyzer
▫ usable everywhere, including on dev. desks
▫ consistent updates, important re:false positives
▫ easy to get full-fledged analysis report locally
▫ thus also helps to save CI resources
Rsyslog Logging Containers by Others
• some very well crafted containers
• often targeted to specific use cases (e.g. LogSene, Papertrail, …)
• many provide just a base config
• some to be used with care
▫ no signals (not PID 1)
▫ no volumes (e.g /var/log in container fs layer)
▫ questionable queue sizes
Our syslog apppliance
• goals
▫ current rsyslog versions
▫ easy to use for common use cases
▫ usable without being rsyslog-literate
▫ low footprint
• Obstacles
▫ Restrictions in rsyslog config format
▫ Availability of recent rsyslog packages (especially during development)
Which base image?
• Alpine
▫ Pretty recent packages, but not all features
▫ Slim footprint
• Ubuntu
▫ Relatively “fat”
▫ Rsyslog daily packages available
• CentOS & Debian
▫ Enterprise preference
▫ Relatively new Packages, at least for CentOS
Going Forward
• We liked Alpine pretty much
▫ Small footprint is great (dev turnaround!)
▫ Overall current software stack
▫ Looks like often used in similar context
▫ Admit some skepticism regarding musl clib
• Ubuntu in parallel
▫ Easy to get current packages
▫ Needed for CI purposes anyway
• Doing two in parallel showed to be a lot of duplicate work
initial concentration on Alpine→
Getting the Slim Image
• Initial plan was to build current rsyslog in image itself
• we should better have understood layers...
• While there seem to be ways to do cleanup, there is only one good
solution: create Alpine packages
• Thankfully, Alpine packaging is simple
• So we ended up with building our own Alpine packages, now also
published for everyone
Meta-Config Layer
• rsyslog configuration can be complex
• some well-defined use cases
▫ Forwarding to a logging service provider
▫ Forwarding to a central host
▫ Writing to Elasticsearch
▫ Log File Storage
• Can be tackled by same method
▫ Best practices defaults
▫ Just some app-specific data
• Complexity can be totally removed for those cases!
# general container app settings:
export TZ=UTC
#export CONTAINER_SILENT=on # do not emit startup message
export ENABLE_STATISTICS=on
# Do we write log files?
export ENABLE_LOGFILES=on # yes, we do (comment out to disable)
# Where do we write to?
# path for host-specific files is: /logs/hosts/HOSTNAME
export LOGFILES_STORE="/logs/hosts/%hostname:::secpath-replace%/messages.log"
# If you have an account with Logsene, enter your access
# information below:
export LOGSENE_TOKEN=4711
export LOGSENE_URL=logsene-receiver.eu.sematext.com
#export USE_VALGRIND=on
#export RSYSLOG_DEBUG="debug nostdout"
#export RSYSLOG_DEBUGLOG="/logs/rsyslog-internal-debug.log"
Looks nice (hopefully ;-)).
But how does it work?
• Usually transforming this into a usable rsyslog config requires heavy
use of sed and friends…
▫ But we want a read-only container
▫ But we want a clean config process
• Thankfully we are the rsyslog developers ;-)
▫ Add feature to conditionally do includes
▫ Add feature to use environment vars in config
▫ … and whatever else is useful ...
So we now have config like this
input(type="imptcp" port="514")
input(type="imudp" port="514")
input(type="imrelp" port="1601")
include(file="/etc/rsyslog.conf.d/log_to_logsene.conf"
config.enabled=`echo $ENABLE_LOGSENE`)
include(file="/etc/rsyslog.conf.d/log_to_files.conf"
config.enabled=`echo $ENABLE_LOGFILES`)
# we emit our own messages to docker console:
syslog.* :omstdout:
include(file="/config/droprules.conf" mode="optional")
# this permits the user to easily drop unwanted messages
action(name="main_utf8fix" type="mmutf8fix" replacementChar="?")
include(text=`echo $CNF_CALL_LOG_TO_LOGFILES`)
include(text=`echo $CNF_CALL_LOG_TO_LOGSENE`)
We need a small helper script
export CNF_CALL_LOG_TO_LOGSENE=
export ENABLE_LOGSENE=off
if [ "$LOGSENE_TOKEN" != "" ]; then
if [ -z $LOGSENE_URL ]; then
echo "Error: LOGSENE_TOKEN_URL unset"
exit 1
fi
export ENABLE_LOGSENE=on
export CNF_CALL_LOG_TO_LOGSENE="call log_to_logsene"
fi # end LOGSENE
include(file="/etc/rsyslog.conf.d/log_to_files.conf"
config.enabled=`echo $ENABLE_LOGFILES`)
include(text=`echo $CNF_CALL_LOG_TO_LOGFILES`)
export LOGSENE_TOKEN=4711
export LOGSENE_URL=logsene-receiver.eu.sematext.com
Do we need root?
• Not really – just for binding to privileged ports
• Why not bind to > 1024 and let docker do the mapping?
• That way we can run the whole container unprivileged
• Of course, we need to be careful with permissions
• Current line of thought – not yet done
• Feedback from the audience???
Goal almost reached...
• Easy to use thanks to
▫ Meta-config
▫ Command interface (help, edit-config, show-config, ...)
• Small footprint due to Alpine & Pkgs
• Secure
▫ Can be run read-only (can even be enforced)
▫ Non-root?
• Dev-Friendly
▫ Integrated debugging support
Really?
• Well, kind of
• We still miss important use cases
▫ Different distros
▫ Client-side rsyslog
(the infamous CentOS 7 imuxsock issue, …)
▫ “bare essentials” container for rsyslog-literates
 Base distribution
 Current rsyslog
 Nothing else
Target: a container stack
• We want to build a set of containers that base on each other
▫ Distro base image plus current components
▫ Meta config level
• Same can also be applied to development containers
• We still face combinatorical explosion, so need to limit to important
cases
• Automatted build system seems inevitable in the longer term
(dockerhub sufficient…???)
What happens if you break clear structure...
• rsyslog-doc showed what happens if you are lazy
▫ rsyslog-doc is general doc project
▫ rsyslog-website is a rsyslog-doc user, with special format
requirements
• We use a container in doc-generation CI
• … as well as when generating the website doc
What happens if you break clear structure… II
• Originally I wanted to get away with a single container, but
▫ caused confusion
▫ … and lots of discussion & lost work
• We now mirror the two different targets via two containers
▫ rsyslog/rsyslog_doc_gen is used for doc project
▫ rsyslog/rsyslog_doc_gen_website for site
▫ they base on each other
• Lesson learned: do not breach layers!
Open Issues: Shutdown
• Rsyslog uses in-memory queues to handle large message bursts
• On shutdown, queues can be persisted to disk – this takes (potentially
a lot of) time
• Does not play well with Docker 10 sec exit timeout
• We currently address this by using smaller queues
• Question: can we enforce a longer shutdown? And shall we?
New Challenges for the config Optimizer
• New features for meta-config like to see updates in config optimizer
▫ constant expression folding
▫ completely empty if conditions (special case of constant folding)
▫ completely empty if then/else blocks (and control statements in general)
• Will be addressed
▫ during regular development
▫ Side-by-side with new meta config capabilities
Open Issues: Permissions
• Approach: recommend that user assigns uid in config explicitly
• We want to run under the current user context
• This is yet another reason why we consider to have listening ports bind
to non-privileged ports
• We would prefer to have an option to enforce this, but this seems not
to be possible
BTW: more uses inside rsyslog development
• Improve Travis Experience
▫ Speed up tests (dependency install!)
▫ Improve reliability (3rd
party repo rebuilds!)
▫ Different Distro Tests
▫ Locally reproducible
▫ Open issue: full testbench
• Troubleshooting
▫ Different Distros (quick check)
▫ “problem description environment”
• Packaging
▫ Right now for Alpine
▫ Other Distros in the future as well (or OBS!)
Future Work
• still lots to do
• imfile rewrite, permit to monitor “external” files (on host machine)
• imuxsock automatic monitoring of log sockets
• full review of docker (and others!) logging infrastructure
• Building family of containers as described
• please provide feedback – what DO you want?
Discussion
What would you like to see?
What would you recommend?
What are we missing or misunderstanding?
Summary
• I have described our motivation,
• use cases we see and plan to support,
• how we could integrate containers into our own workflow,
• our strategy towards production containers
▫ meta config
▫ client vs. server containers
▫ “Container Stack”
• And finally discussed some yet-unsolved problems
Questions?
• rgerhards@adiscon.com
• https://hub.docker.com/u/rsyslog/
• https://github.com/rsyslog/rsyslog-docker

More Related Content

What's hot

RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Railselliando dias
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release WorkflowTuenti
 
Queick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for PythonQueick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for PythonRyota Suenaga
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in LispVladimir Sedach
 
Php core. get rid of bugs and contribute
Php core. get rid of bugs and contributePhp core. get rid of bugs and contribute
Php core. get rid of bugs and contributePierre Joye
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parserfukamachi
 
Ruby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdxRuby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdxMathieu Elie
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & HowAlfonso Cabrera
 
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Codemotion
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in DjangoRami Sayar
 
2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CDSimon Bennetts
 
Cfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreCfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreJulien Pivotto
 
2020 ADDO Spring Break OWASP ZAP Automation
2020 ADDO Spring Break OWASP ZAP Automation2020 ADDO Spring Break OWASP ZAP Automation
2020 ADDO Spring Break OWASP ZAP AutomationSimon Bennetts
 
Clack: glue for web apps
Clack: glue for web appsClack: glue for web apps
Clack: glue for web appsfukamachi
 
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAcceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAsko Soukka
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Pierre Joye
 
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...Codemotion
 

What's hot (20)

RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Rails
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
 
Celery workshop
Celery workshopCelery workshop
Celery workshop
 
Queick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for PythonQueick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for Python
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
 
Php core. get rid of bugs and contribute
Php core. get rid of bugs and contributePhp core. get rid of bugs and contribute
Php core. get rid of bugs and contribute
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parser
 
Ruby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdxRuby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdx
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
 
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in Django
 
2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD
 
Devcon hh-2012
Devcon hh-2012Devcon hh-2012
Devcon hh-2012
 
Logstash and friends
Logstash and friendsLogstash and friends
Logstash and friends
 
Cfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreCfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymore
 
2020 ADDO Spring Break OWASP ZAP Automation
2020 ADDO Spring Break OWASP ZAP Automation2020 ADDO Spring Break OWASP ZAP Automation
2020 ADDO Spring Break OWASP ZAP Automation
 
Clack: glue for web apps
Clack: glue for web appsClack: glue for web apps
Clack: glue for web apps
 
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAcceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and selenium
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
 

Similar to rsyslog meets docker

eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTaro L. Saito
 
Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018David Stockton
 
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Docker, Inc.
 
Docking postgres
Docking postgresDocking postgres
Docking postgresrycamor
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Controlindiver
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOpsRicard Clau
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremKris Buytaert
 
Improve Your IBM Domino Designer Experience
Improve Your IBM Domino Designer ExperienceImprove Your IBM Domino Designer Experience
Improve Your IBM Domino Designer Experiencepanagenda
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xrkr10
 
Experiences with Debugging Data Races
Experiences with Debugging Data RacesExperiences with Debugging Data Races
Experiences with Debugging Data RacesAzul Systems Inc.
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesYshay Yaacobi
 
Database as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on KubernetesDatabase as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on KubernetesObjectRocket
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewiredotCloud
 
Untangling spring week10
Untangling spring week10Untangling spring week10
Untangling spring week10Derek Jacoby
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Where Django Caching Bust at the Seams
Where Django Caching Bust at the SeamsWhere Django Caching Bust at the Seams
Where Django Caching Bust at the SeamsConcentric Sky
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life DevOps.com
 

Similar to rsyslog meets docker (20)

eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018
 
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
 
Docking postgres
Docking postgresDocking postgres
Docking postgres
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOps
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPrem
 
Improve Your IBM Domino Designer Experience
Improve Your IBM Domino Designer ExperienceImprove Your IBM Domino Designer Experience
Improve Your IBM Domino Designer Experience
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
Experiences with Debugging Data Races
Experiences with Debugging Data RacesExperiences with Debugging Data Races
Experiences with Debugging Data Races
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositories
 
Database as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on KubernetesDatabase as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on Kubernetes
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
Untangling spring week10
Untangling spring week10Untangling spring week10
Untangling spring week10
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Where Django Caching Bust at the Seams
Where Django Caching Bust at the SeamsWhere Django Caching Bust at the Seams
Where Django Caching Bust at the Seams
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
 

More from Rainer Gerhards

Sicherheit im Internet - Wie kann man sich schützen?
Sicherheit im Internet - Wie kann man sich schützen?Sicherheit im Internet - Wie kann man sich schützen?
Sicherheit im Internet - Wie kann man sich schützen?Rainer Gerhards
 
Using Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfileUsing Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfileRainer Gerhards
 
Fedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 TalkFedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 TalkRainer Gerhards
 
The rsyslog v8 engine (developer's view)
The rsyslog v8 engine (developer's view)The rsyslog v8 engine (developer's view)
The rsyslog v8 engine (developer's view)Rainer Gerhards
 
Writing External Rsyslog Plugins
Writing External Rsyslog PluginsWriting External Rsyslog Plugins
Writing External Rsyslog PluginsRainer Gerhards
 
Wetterbeobachtung - Ein Vortrag für die Grundschule
Wetterbeobachtung - Ein Vortrag für die GrundschuleWetterbeobachtung - Ein Vortrag für die Grundschule
Wetterbeobachtung - Ein Vortrag für die GrundschuleRainer Gerhards
 
Rsyslog vs Systemd Journal Presentation
Rsyslog vs Systemd Journal PresentationRsyslog vs Systemd Journal Presentation
Rsyslog vs Systemd Journal PresentationRainer Gerhards
 
Rsyslog vs Systemd Journal (Paper)
Rsyslog vs Systemd Journal (Paper)Rsyslog vs Systemd Journal (Paper)
Rsyslog vs Systemd Journal (Paper)Rainer Gerhards
 
CEE Log Integrity and the "Counterpane Paper"
CEE Log Integrity and the "Counterpane Paper"CEE Log Integrity and the "Counterpane Paper"
CEE Log Integrity and the "Counterpane Paper"Rainer Gerhards
 
Status of syslog as of 2005
Status of syslog as of 2005Status of syslog as of 2005
Status of syslog as of 2005Rainer Gerhards
 
LogFile Auswertung (log analysis)
LogFile Auswertung (log analysis)LogFile Auswertung (log analysis)
LogFile Auswertung (log analysis)Rainer Gerhards
 
Rsyslog log normalization
Rsyslog log normalizationRsyslog log normalization
Rsyslog log normalizationRainer Gerhards
 

More from Rainer Gerhards (13)

Sicherheit im Internet - Wie kann man sich schützen?
Sicherheit im Internet - Wie kann man sich schützen?Sicherheit im Internet - Wie kann man sich schützen?
Sicherheit im Internet - Wie kann man sich schützen?
 
Using Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfileUsing Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfile
 
Fedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 TalkFedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 Talk
 
The rsyslog v8 engine (developer's view)
The rsyslog v8 engine (developer's view)The rsyslog v8 engine (developer's view)
The rsyslog v8 engine (developer's view)
 
Writing External Rsyslog Plugins
Writing External Rsyslog PluginsWriting External Rsyslog Plugins
Writing External Rsyslog Plugins
 
Wetterbeobachtung - Ein Vortrag für die Grundschule
Wetterbeobachtung - Ein Vortrag für die GrundschuleWetterbeobachtung - Ein Vortrag für die Grundschule
Wetterbeobachtung - Ein Vortrag für die Grundschule
 
Rsyslog vs Systemd Journal Presentation
Rsyslog vs Systemd Journal PresentationRsyslog vs Systemd Journal Presentation
Rsyslog vs Systemd Journal Presentation
 
Rsyslog vs Systemd Journal (Paper)
Rsyslog vs Systemd Journal (Paper)Rsyslog vs Systemd Journal (Paper)
Rsyslog vs Systemd Journal (Paper)
 
CEE Log Integrity and the "Counterpane Paper"
CEE Log Integrity and the "Counterpane Paper"CEE Log Integrity and the "Counterpane Paper"
CEE Log Integrity and the "Counterpane Paper"
 
State of syslog (2005)
State of syslog (2005)State of syslog (2005)
State of syslog (2005)
 
Status of syslog as of 2005
Status of syslog as of 2005Status of syslog as of 2005
Status of syslog as of 2005
 
LogFile Auswertung (log analysis)
LogFile Auswertung (log analysis)LogFile Auswertung (log analysis)
LogFile Auswertung (log analysis)
 
Rsyslog log normalization
Rsyslog log normalizationRsyslog log normalization
Rsyslog log normalization
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
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...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

rsyslog meets docker

  • 1. rsyslog meets Docker alles easy, oder? Rainer Gerhards
  • 2. Agenda • How we got started • Some Use Cases • Syslog Appliance Containers • Introducing Meta-Config Layer • Proper Structure – the “Container Stack” • Some more Relations on rsyslog Development
  • 3. Containers? Umm, yes... • of course, we knew about containers - but we did not care ;-) • Had a very long TODO list with non-container things, but... ▫ we have seen some users post container defs to help troubleshoot issues ▫ occasionally, containers were briefly mentioned in the in issue trackers ▫ and of course we knew they went into more and more widespread use
  • 4. Real Interest • Curiosity wins... ▫ isn’t it time to at least know better what’s required? ▫ can we do something with them? ▫ can we help our users to be more productive? ▫ and a bit of “I want to know how it works in practice” (kind of pet project TBH...) • Still we (thought we) had no real use case for ourselves, but the desire (and approval) to get going
  • 5. First Steps • Focus: Docker (and pure Docker!) • Learn to build and use containers • First surprises: ▫ Ah! Thus folks are interested in omstdout… ▫ Oh, that’s why they would like to have ctl-c enabled in non-debug mode ▫ Oops, the environment can be pretty unreliable (think: queue files and shutdown timeout)...
  • 6. Understanding Use Cases • syslog appliance ▫ ready to run system, setup for logging ▫ user base not necessarily much interested in logging, just “get it going” • high-end syslog server ▫ main interest fresh and current functionality ▫ for the experts • rsyslog project itself ▫ surprise, surprise: CI and build system ▫ reproducible builds setup in easier way then VMs
  • 7. Background: rsyslog CI • Local environment ▫ Primarily manual test for single functionality • Travis ▫ Full test suite ▫ Different environments (but limited to Travis images) ▫ Static analyzer (clang, Coverity [daily]) ▫ Originally limited to Travis Images • BuildBot ▫ More environments, including Solaris ▫ “Final Approval” Step ▫ “costly” (time-wise)
  • 8. CI: the static analyzer problem • We use clang static analyzer in CI ▫ great for QA ▫ but caused considerable pain  vastly different versions in CI and on WS OS  even worse: no way to disable false positives  very hard to reproduce CI failures - pain to fix • initial “solution”: try to get everyone on the same page • did not work out, not even in CI ...
  • 9. the static analyzer problem - II • Next Try ▫ single CI system, Buildbot only ▫ exposing CI run static analysis result ▫ works ok, but now requires full CI just to get analyzer result • real solution: container with latest stable version of analyzer ▫ usable everywhere, including on dev. desks ▫ consistent updates, important re:false positives ▫ easy to get full-fledged analysis report locally ▫ thus also helps to save CI resources
  • 10. Rsyslog Logging Containers by Others • some very well crafted containers • often targeted to specific use cases (e.g. LogSene, Papertrail, …) • many provide just a base config • some to be used with care ▫ no signals (not PID 1) ▫ no volumes (e.g /var/log in container fs layer) ▫ questionable queue sizes
  • 11. Our syslog apppliance • goals ▫ current rsyslog versions ▫ easy to use for common use cases ▫ usable without being rsyslog-literate ▫ low footprint • Obstacles ▫ Restrictions in rsyslog config format ▫ Availability of recent rsyslog packages (especially during development)
  • 12. Which base image? • Alpine ▫ Pretty recent packages, but not all features ▫ Slim footprint • Ubuntu ▫ Relatively “fat” ▫ Rsyslog daily packages available • CentOS & Debian ▫ Enterprise preference ▫ Relatively new Packages, at least for CentOS
  • 13. Going Forward • We liked Alpine pretty much ▫ Small footprint is great (dev turnaround!) ▫ Overall current software stack ▫ Looks like often used in similar context ▫ Admit some skepticism regarding musl clib • Ubuntu in parallel ▫ Easy to get current packages ▫ Needed for CI purposes anyway • Doing two in parallel showed to be a lot of duplicate work initial concentration on Alpine→
  • 14. Getting the Slim Image • Initial plan was to build current rsyslog in image itself • we should better have understood layers... • While there seem to be ways to do cleanup, there is only one good solution: create Alpine packages • Thankfully, Alpine packaging is simple • So we ended up with building our own Alpine packages, now also published for everyone
  • 15. Meta-Config Layer • rsyslog configuration can be complex • some well-defined use cases ▫ Forwarding to a logging service provider ▫ Forwarding to a central host ▫ Writing to Elasticsearch ▫ Log File Storage • Can be tackled by same method ▫ Best practices defaults ▫ Just some app-specific data • Complexity can be totally removed for those cases!
  • 16. # general container app settings: export TZ=UTC #export CONTAINER_SILENT=on # do not emit startup message export ENABLE_STATISTICS=on # Do we write log files? export ENABLE_LOGFILES=on # yes, we do (comment out to disable) # Where do we write to? # path for host-specific files is: /logs/hosts/HOSTNAME export LOGFILES_STORE="/logs/hosts/%hostname:::secpath-replace%/messages.log" # If you have an account with Logsene, enter your access # information below: export LOGSENE_TOKEN=4711 export LOGSENE_URL=logsene-receiver.eu.sematext.com #export USE_VALGRIND=on #export RSYSLOG_DEBUG="debug nostdout" #export RSYSLOG_DEBUGLOG="/logs/rsyslog-internal-debug.log"
  • 17. Looks nice (hopefully ;-)). But how does it work? • Usually transforming this into a usable rsyslog config requires heavy use of sed and friends… ▫ But we want a read-only container ▫ But we want a clean config process • Thankfully we are the rsyslog developers ;-) ▫ Add feature to conditionally do includes ▫ Add feature to use environment vars in config ▫ … and whatever else is useful ...
  • 18. So we now have config like this input(type="imptcp" port="514") input(type="imudp" port="514") input(type="imrelp" port="1601") include(file="/etc/rsyslog.conf.d/log_to_logsene.conf" config.enabled=`echo $ENABLE_LOGSENE`) include(file="/etc/rsyslog.conf.d/log_to_files.conf" config.enabled=`echo $ENABLE_LOGFILES`) # we emit our own messages to docker console: syslog.* :omstdout: include(file="/config/droprules.conf" mode="optional") # this permits the user to easily drop unwanted messages action(name="main_utf8fix" type="mmutf8fix" replacementChar="?") include(text=`echo $CNF_CALL_LOG_TO_LOGFILES`) include(text=`echo $CNF_CALL_LOG_TO_LOGSENE`)
  • 19. We need a small helper script export CNF_CALL_LOG_TO_LOGSENE= export ENABLE_LOGSENE=off if [ "$LOGSENE_TOKEN" != "" ]; then if [ -z $LOGSENE_URL ]; then echo "Error: LOGSENE_TOKEN_URL unset" exit 1 fi export ENABLE_LOGSENE=on export CNF_CALL_LOG_TO_LOGSENE="call log_to_logsene" fi # end LOGSENE include(file="/etc/rsyslog.conf.d/log_to_files.conf" config.enabled=`echo $ENABLE_LOGFILES`) include(text=`echo $CNF_CALL_LOG_TO_LOGFILES`) export LOGSENE_TOKEN=4711 export LOGSENE_URL=logsene-receiver.eu.sematext.com
  • 20. Do we need root? • Not really – just for binding to privileged ports • Why not bind to > 1024 and let docker do the mapping? • That way we can run the whole container unprivileged • Of course, we need to be careful with permissions • Current line of thought – not yet done • Feedback from the audience???
  • 21. Goal almost reached... • Easy to use thanks to ▫ Meta-config ▫ Command interface (help, edit-config, show-config, ...) • Small footprint due to Alpine & Pkgs • Secure ▫ Can be run read-only (can even be enforced) ▫ Non-root? • Dev-Friendly ▫ Integrated debugging support
  • 22. Really? • Well, kind of • We still miss important use cases ▫ Different distros ▫ Client-side rsyslog (the infamous CentOS 7 imuxsock issue, …) ▫ “bare essentials” container for rsyslog-literates  Base distribution  Current rsyslog  Nothing else
  • 23. Target: a container stack • We want to build a set of containers that base on each other ▫ Distro base image plus current components ▫ Meta config level • Same can also be applied to development containers • We still face combinatorical explosion, so need to limit to important cases • Automatted build system seems inevitable in the longer term (dockerhub sufficient…???)
  • 24. What happens if you break clear structure... • rsyslog-doc showed what happens if you are lazy ▫ rsyslog-doc is general doc project ▫ rsyslog-website is a rsyslog-doc user, with special format requirements • We use a container in doc-generation CI • … as well as when generating the website doc
  • 25. What happens if you break clear structure… II • Originally I wanted to get away with a single container, but ▫ caused confusion ▫ … and lots of discussion & lost work • We now mirror the two different targets via two containers ▫ rsyslog/rsyslog_doc_gen is used for doc project ▫ rsyslog/rsyslog_doc_gen_website for site ▫ they base on each other • Lesson learned: do not breach layers!
  • 26. Open Issues: Shutdown • Rsyslog uses in-memory queues to handle large message bursts • On shutdown, queues can be persisted to disk – this takes (potentially a lot of) time • Does not play well with Docker 10 sec exit timeout • We currently address this by using smaller queues • Question: can we enforce a longer shutdown? And shall we?
  • 27. New Challenges for the config Optimizer • New features for meta-config like to see updates in config optimizer ▫ constant expression folding ▫ completely empty if conditions (special case of constant folding) ▫ completely empty if then/else blocks (and control statements in general) • Will be addressed ▫ during regular development ▫ Side-by-side with new meta config capabilities
  • 28. Open Issues: Permissions • Approach: recommend that user assigns uid in config explicitly • We want to run under the current user context • This is yet another reason why we consider to have listening ports bind to non-privileged ports • We would prefer to have an option to enforce this, but this seems not to be possible
  • 29. BTW: more uses inside rsyslog development • Improve Travis Experience ▫ Speed up tests (dependency install!) ▫ Improve reliability (3rd party repo rebuilds!) ▫ Different Distro Tests ▫ Locally reproducible ▫ Open issue: full testbench • Troubleshooting ▫ Different Distros (quick check) ▫ “problem description environment” • Packaging ▫ Right now for Alpine ▫ Other Distros in the future as well (or OBS!)
  • 30. Future Work • still lots to do • imfile rewrite, permit to monitor “external” files (on host machine) • imuxsock automatic monitoring of log sockets • full review of docker (and others!) logging infrastructure • Building family of containers as described • please provide feedback – what DO you want?
  • 31. Discussion What would you like to see? What would you recommend? What are we missing or misunderstanding?
  • 32. Summary • I have described our motivation, • use cases we see and plan to support, • how we could integrate containers into our own workflow, • our strategy towards production containers ▫ meta config ▫ client vs. server containers ▫ “Container Stack” • And finally discussed some yet-unsolved problems