Code Monkey home page Code Monkey logo

salt_banana's Introduction

salt_banana

A mini project showing how to use saltstack for multiple minions following best practices (avoid duplication and littering of jinja conditionals in state files).

As infrastructure we use Vagrant and VirtualBox for ease of use, but same salt configuration could be applied on a real or virtual cluster of computers.

WIP

How to safely accept the minion keys.

List all the minion keys as seen on the master:

$ vagrant ssh salt -c "sudo salt-key -F"
Unaccepted Keys:
fbsd:  44:55:04:dc:29:05:87:01:66:dc:4f:ca:3e:0d:63:39:77:52:65:11:89:96:38:b6:e1:27:9a:c7:9a:ef:3e:52
salt:  75:fb:1a:49:17:da:0d:51:d2:79:14:b2:bd:a8:68:ee:ee:61:85:de:ea:37:50:11:c9:bf:4a:c5:3f:bc:71:ab
ubu:  54:cb:b2:db:95:e1:b9:c8:b5:0a:14:64:ca:32:82:fb:e7:91:e8:a3:3d:f7:10:86:87:5b:a0:04:2f:67:0a:5d

We use SSH as an out-of-band mechanism to get the fingerprints and confirm that they are the same:

$ for v in salt fbsd ubu; echo $v; vagrant ssh $v -c "sudo salt-call --local key.finger"; end
salt
local:
    75:fb:1a:49:17:da:0d:51:d2:79:14:b2:bd:a8:68:ee:ee:61:85:de:ea:37:50:11:c9:bf:4a:c5:3f:bc:71:ab
fbsd
local:
    44:55:04:dc:29:05:87:01:66:dc:4f:ca:3e:0d:63:39:77:52:65:11:89:96:38:b6:e1:27:9a:c7:9a:ef:3e:52
ubu
local:
    54:cb:b2:db:95:e1:b9:c8:b5:0a:14:64:ca:32:82:fb:e7:91:e8:a3:3d:f7:10:86:87:5b:a0:04:2f:67:0a:5d

We can now safely accept

sudo salt-key -a salt,ubu,fbsd
The following keys are going to be accepted:
Unaccepted Keys:
fbsd
salt
ubu
Proceed? [n/Y] y

Automatically adding host names of minions once their key is accepted, via reactor :-)

Use the simple DNSMASQ daemon, that does both DNS and DHCP https://github.com/saltstack-formulas/dnsmasq-formula

salt_banana's People

Watchers

Luis Díaz Más avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.