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

Chef Browser

Chef Browser

An open source Ruby/Sinatra web application to browse data on a Chef server.

Marta Paciorkowska

December 11, 2013
Tweet

More Decks by Marta Paciorkowska

Other Decks in Programming

Transcript

  1. Chef Browser
    Chef in your favorite browser

    View full-size slide

  2. Hello!
    Marta Paciorkowska
    Three of Coins
    https://github.com/3ofcoins/
    http://3ofcoins.net

    View full-size slide

  3. The works
    Chef → Chef API → Ridley →
    Chef Browser → end user

    View full-size slide

  4. Chef → Chef API → Ridley →
    Chef Browser → end user
    Nodes running in
    environments with different
    roles, filled with data bags full
    of items, running on recipes
    organized in cookbooks.
    A powerful software tool to configure and
    maintain your IT infrastructure.

    View full-size slide

  5. Chef → Chef API → Ridley →
    Chef Browser → end user
    (Opscode published its own
    chef-server-webui, but it's not
    the most user-friendly)
    Source: http://leopard.in.ua/

    View full-size slide

  6. Chef → Chef API → Ridley →
    Chef Browser → end user
    Nice and RESTful

    View full-size slide

  7. Chef → Chef API → Ridley →
    Chef Browser → end user
    A Ruby library with clean syntax that makes
    conversations with Chef nice.
    https://github.com/RiotGames/ridley

    View full-size slide

  8. Chef → Chef API → Ridley →
    Chef Browser → end user
    Knife queries Ridley queries
    knife search
    mysql_server_root_password:* -i
    chef_server.search(:node,
    "mysql_server_root_password:*")
    knife node show node_name chef_server.node.find("node_name")
    chef_server = Ridley.new(
    server_url: "http://127.0.0.1",
    client_name: "foo",
    client_key: "/users/foo/.chef/bar.pem"
    )

    View full-size slide

  9. Chef → Chef API → Ridley →
    Chef Browser → end user
    A simple web tool we created to give you better
    insight into your IT infrastructure.
    http://3ofcoins.github.com/chef-browser

    View full-size slide

  10. Chef → Chef API → Ridley →
    Chef Browser → end user
    Building blocks:
    Sinatra + Erubis
    - simple, no databases necessary
    Bootstrap v3.0.3
    - makes Chef Browser responsive and mobile friendly
    TinyConfig, https://github.com/3ofcoins/tinyconfig
    - configuring settings by the user is extremely simple

    View full-size slide

  11. Access lists of all available nodes, environments, and more.
    Chef → Chef API → Ridley →
    Chef Browser → end user

    View full-size slide

  12. View details of each resource
    Chef → Chef API → Ridley →
    Chef Browser → end user

    View full-size slide

  13. Find info on given resource filtering through its attributes.
    Chef → Chef API → Ridley →
    Chef Browser → end user

    View full-size slide

  14. Save yourself some typing with storing most useful queries.
    Chef → Chef API → Ridley →
    Chef Browser → end user

    View full-size slide

  15. Chef → Chef API → Ridley →
    Chef Browser → end user
    How to install:
    1. Download from http://3ofcoins.github.com/chef-browser
    2. Run bundle install
    3. Provide server details in a settings.rb file:
    server_url "http://127.0.0.1:4000"
    client_name "marta"
    client_key "home/marta/key.pem"
    4. Run puma -e production
    5. Go to http://localhost:9292

    View full-size slide

  16. Roadmap
    - browsing cookbooks
    - encrypting data bags
    - Docker container / VM image integrating chef-
    server & chef-browser
    ...but feel free to open issues and PRs!

    View full-size slide

  17. Thanks!
    Questions?
    Three of Coins
    https://github.com/3ofcoins/
    http://3ofcoins.net

    View full-size slide