Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Saltpad: A saltstack Web GUI

Boris Feld
February 02, 2016

Saltpad: A saltstack Web GUI

Presentation of SaltPad, a modern web User Interface for Saltstack. Saltstack is a great configuration management tool, but not very accessible for newcomers and non "Configuration Management" experts. SaltPad aims to fill the gap by offering a clean, simple interface to manage the different aspects of Salt, making it ​easier​ to start​ with SaltStack and ​manage​ your SaltStack cluster day after day. If offers a nice reporting view for jobs, especially for highstate jobs; ​helps​ you ​launch​ jobs and define predefined jobs, that can be launched with a single button; and finally, a dashboard for a global ​view​ of your cluster. SaltPad is a great tool to help empower people to be autonomous on deployment and have visibility on the stack and deployment formulas. At first developed​ with a classical Python Stack, SaltPad has been rewritten as a Single App Page with React. Its combination with the websocket interface of salt-api, simplifies​ the implementation and adds the niceties of a reactive interface.

Boris Feld

February 02, 2016
Tweet

More Decks by Boris Feld

Other Decks in Programming

Transcript

  1. DEV&OPS FRIENDLY • CLI is efficient, but… • Not QA

    / Frontend Dev / Backend dev friendly
  2. SUCCESS ID: working_file Function: file.managed Name: /etc/working_file Result: True Comment:

    File /etc/working_file is in the correct state Started: 11:12:00.785722 Duration: 3.396 ms Changes:
  3. SUCCESS ID: working_file Function: file.managed Name: /etc/working_file Result: True Comment:

    File /etc/working_file is in the correct state Started: 11:12:00.785722 Duration: 3.396 ms Changes: NOISE ✖
  4. CHANGES ID: changing_file Function: file.managed Name: /etc/changing_file Result: True Comment:

    File /etc/changing_file updated Started: 11:12:00.789479 Duration: 3.244 ms Changes: ---------- diff: <show_diff=False>
  5. CHANGES ID: changing_file Function: file.managed Name: /etc/changing_file Result: True Comment:

    File /etc/changing_file updated Started: 11:12:00.789479 Duration: 3.244 ms Changes: ---------- diff: <show_diff=False> SMALL SIGNAL ✔
  6. ERRORS ID: bad_file Function: file.managed Name: /etc/badfile Result: False Comment:

    User inexistant is not available Started: 11:12:00.802779 Duration: 1.809 ms Changes:
  7. ERRORS ID: bad_file Function: file.managed Name: /etc/badfile Result: False Comment:

    User inexistant is not available Started: 11:12:00.802779 Duration: 1.809 ms Changes: HUGE SIGNAL ✔
  8. REQUISITE ERROR ID: dependency_file Function: file.managed Name: /etc/dependency_file Result: False

    Comment: One or more requisite failed: sample.bad_file Started: Duration: Changes:
  9. REQUISITE ERROR ID: dependency_file Function: file.managed Name: /etc/dependency_file Result: False

    Comment: One or more requisite failed: sample.bad_file Started: Duration: Changes: NOISE ✖
  10. SALTPAD V1 • Classic web interface • Python / Flask

    which request salt-api and render html
  11. FEEDBACK • Used every day by at least one company

    • Small but nice feedback from community • ~60 issues
  12. BEYOND HIGHSTATE OUTPUT • Generic job output • Minion keys

    management • Job launching • Job templates
  13. IT’S PYTHON ! • Compatibility asked with python 2.6 •

    What about python 3 • Windows compatibility • Bug with six module • Bug with werkzeug
  14. IT’S WSGI! • Difficult to configure. • Requires to configure

    gunicorn + nginx or apache + ssl. • Not easy when it’s your job, so when it’s not your job…
  15. NO DB! • Use directly the salt-api • No DB

    to configure • Stored templates in salt-master configuration
  16. REQUEST / RESPONSE BASED • Lack of responsiveness due to

    the traditional request / response design. • Community asked for better UX • Launch a job and stay on the launch page • Have the jobs update their result in near real-time • Requires more JS
  17. IT’S SLOW • Some (most) pages end up in timeout

    because of salt-api requests • Ends up with « working » pages and « not working » pages.
  18. SALT EVENTS • Each event is shared through an event-bus

    • You can plug reactors (code to respond to events) • See the real-time events across the infrastructure (salt-run state.event pretty=True) • Exposed via salt-api
  19. NEW ARCHITECTURE • Developed as a Single App Page with

    React. • Listen to the event endpoint and update the view.
  20. REACT FTW • React architecture make it easy to create

    a real- time application. • Receive an event through the event endpoint. • Parse the event and update the global state. • Re-render all the view!
  21. BETTER UX • See the status of your last jobs

    while checking something else • Mark jobs to retrieve them later
  22. JOB MASTER CACHE • Salt store job output on disk

    by default • Easy to saturate, df -h / df -i • Use alternate job master cache like Postgresql
  23. WHAT NEXT? • Permissions / Groups • Minions keys management

    • Better data viz of job result • Leverage group for topology viz • Need for much more
  24. HELP IMPROVE DX • Developer Experience is important! • Experiment

    and innovate! • Ideas: • Saltstack linter • Saltstack interactive tutorial in the browser • …