Configuration Configuration management in memory management in - - PowerPoint PPT Presentation

configuration configuration management in memory
SMART_READER_LITE
LIVE PREVIEW

Configuration Configuration management in memory management in - - PowerPoint PPT Presentation

Configuration Configuration management in memory management in memory constrained constrained environment environment ___________________________ ___________________________ Those 8MB of RAM are gonna be a little Those 8MB of RAM


slide-1
SLIDE 1

Normation – CC-BY-SA normation.com

Configuration Configuration management in memory management in memory constrained constrained environment environment ___________________________ ___________________________

“Those 8MB of RAM are gonna be a little “Those 8MB of RAM are gonna be a little light for my Ruby stack” light for my Ruby stack”

Matthieu CERDA

slide-2
SLIDE 2

Normation – CC-BY-SA normation.com

2

Who are you ?

Name Matthieu CERDA Email : matthieu.cerda@normation.com Web site : http://www.normation.com Twitter : @Kegeruneku Job System engineer at Normation CFEngine Enthusiast, power user and trainer Rudder Integrator, packager Infrastructure Team member

slide-3
SLIDE 3

Normation – CC-BY-SA normation.com

3

Configuration management ?

  • Enable the user to manage from 0 to ∞ machines:
  • Without making mistakes due to repetition
  • Without having to provision every machine manually
  • Ensuring a common and reliable base
slide-4
SLIDE 4

Normation – CC-BY-SA normation.com

4

Effin' embedded systems, how do they work ?

  • x86 CPU's are not standard: ARM or MIPS CPUs are kings
  • Embedded CPU's aren't war machines: Don't assume you will

have a quad core one

  • Low memory: Forget your 8G of RAM
  • Everything has a cost: Do not assume your board has a SATA

connector

  • Not the same OSes: Goodbye Debian, RHEL or Windows,

welcome OpenWRT, Montavista, VxWorks...

slide-5
SLIDE 5

Normation – CC-BY-SA normation.com

5

Examples

  • Routers:
  • APU 1c
  • x86_64 AMD G T40E @ 2x1 GHz
  • 2 GB RAM / USB/SD/mSATA
  • ALIX 2d13
  • x86_32 AMD Geode LX @ 400 MHz
  • 256 MB RAM / SD
slide-6
SLIDE 6

Normation – CC-BY-SA normation.com

6

Examples

  • SOHO Routers:
  • FON2303A
  • MIPS Ralink 3052 @ 300 MHz
  • 64 MB RAM / 8 MB Flash
  • TL-MR3020
  • MIPS Atheros AR9330 @ 400 MHz
  • 32 MB RAM / 4 MB Flash
slide-7
SLIDE 7

Normation – CC-BY-SA normation.com

7

Configuration management in embedded environments

  • Need to be compatible with memory/CPU constraints
  • Problem with complex language stacks
  • Hard to use interpreted languages
  • Should not be too CPU intensive (SMP will not save you)
  • Should be autonomous when possible
  • Embedded environments often mean reduced networking

capabilities

slide-8
SLIDE 8

Normation – CC-BY-SA normation.com

8

Conventional GNU/Linux OSes

  • Your average GNU/Linux OS
  • Examples: Debian, Raspbian, Cubian, Fedora, Arch, …
  • Provides and extensive library of tools already compiled for

you: the main CM tools are here !

  • The most comfortable approach when you need a prototyping

environment, that is affordable and easy to use:

  • Boards are cheap
  • Boards are legion
  • Boards are powerful
  • Shameless plug: CubieBoards/BeagleBones rock.
slide-9
SLIDE 9

Normation – CC-BY-SA normation.com

9

GNU/Linux based derivatives

  • GNU/Linux based, with additionnal constraints
  • Examples: OpenWRT, Android / Replicant, MontaVista, ...
  • Provide a complete compilation toolchain, but less utilities

already builtin. Documentation is less accessible.

  • The work to get CM tools to build is a bit more complicated,

and the lack of packaging / CPU punch makes complex tools harder to impossible to use.

  • A Ruby stack is hard to get
  • A Python one is decently easy
  • C based utilities are easy.
  • SOHO routers are the easiest boards to get
slide-10
SLIDE 10

Normation – CC-BY-SA normation.com

10

Proprietary software

  • Nightmare mode of hobbyists / small companies
  • Examples: VxWorks, Windows CE ...
  • Provide a limited compilation toolchain, and nearly no open

documentation (NDA's). You're on your own.

  • It's basically a plug'n'pray approach, you have to build

everything from scratch.

  • No, really. Everything.
  • You really don't want to mess with this. If you really want one,

late WRT54G boxes would do the trick (VxWorks).

slide-11
SLIDE 11

Normation – CC-BY-SA normation.com

11

Overview of the tools

  • 3 families of tools:
  • C based: CFEngine, Rudder …
  • Ruby based: Puppet, Chef
  • Python based: Salt. (Ansible ?)
  • Of the three, C is the most efficient approach (CPU, memory

wise) in the embedded world, the other two are usable if the CPU/mem constraints aren't too tight.

slide-12
SLIDE 12

Normation – CC-BY-SA normation.com

12

Enough chit chat, time is candy!

  • 2 “machines” used for the test
  • CubieBoard 1 (A10 ARM CPU, 1GHz, 1 GB RAM)
  • Wow, much power, very ARM, such rox.
  • QEMU VM (Versatile ARM CPU, 64 MB RAM)
  • Not really as powerful. Actually, a LOT less.
  • Let's forget storage (NAND flash, HDD, …) constraints for

now.

slide-13
SLIDE 13

Normation – CC-BY-SA normation.com

13

Let's get ready to rumble !

  • 1st round: CFEngine 3.6.0 vs Puppet 2.7.23
  • Idle memory occupation (Cubian)
  • Nothing:
  • 28 MB
  • CFEngine (cf-execd, cf-serverd, cf-monitord):
  • 33 MB (+5 MB)
  • Puppet (puppetmaster):
  • 51 MB (+23 MB)
slide-14
SLIDE 14

Normation – CC-BY-SA normation.com

14

Let's get ready to rumble !

  • 1st round: CFEngine 3.6.0 vs Puppet 2.7.23
  • Memory occupation (Cubian)
  • Nothing:
  • 28 MB
  • CFEngine (cf-agent):
  • 37 MB, 10s (+9 MB)
  • Puppet (puppet apply):
  • 57 MB, 16s (+29 MB)
slide-15
SLIDE 15

Normation – CC-BY-SA normation.com

15

Conclusion

  • Both tools are reasonably quick to run
  • Puppet takes approximately + 20 MB compared to CFEngine
  • 64 MB is not enough for Puppet
  • Verdict: Configuration management ? Totally on those :) but be

careful, RAM / CPU and time are precious :)

slide-16
SLIDE 16

Normation – CC-BY-SA normation.com

16

Questions ? :) Questions ? :)