.. _legacy-salt: Legacy Saltstack ================ This is a **COMPLETE** public release of my personal salt states. The `states presented here `__ were used for running `this network `__. This repository includes a lot of neat tricks I've learned and shows off many salt best practices (bad practices are bugs). It also includes some components that will be eventually be described on my personal blog [1]_, such as IDI (Inventory Defined Infrastructure) [2]_ and automated highstates [3]_. At this point, the infrastructure described within has been retired and rebuilt from scratch from an absolute minimalist approach. The approach shared within works exceptionally well for small, medium, and multi-national corporations. It also worked well for my home lab/network and gave me the chance to explore some amazing concepts. Ultimately, as I hosted more and more open source projects (enabled by automation), my $hobby and $home['life'] devolved further and further into $work; I stopped having fun. ... hence, the entire public export of the **FINAL** and COMPLETE incantation of my home network. It is complete, and it is retired. So long, and thanks for all the fish. .. [1] https://michael.lustfield.net .. [2] Define a machine in DCIM/IPAM, (if physical, turn on), wait for an email confirming complete configuration. .. [3] Push to a git repo, wait for systems to run a highstate. Cloud Nodes ----------- Visualization of the pillar data generated by my salt setup. .. literalinclude:: _notes/cloud_nodes/nodes.sls :language: yaml Global Highstate ---------------- Server-side git hook that sends notifications to salt server: .. literalinclude:: _notes/global_highstate/git_hook :language: sh Expose a cache database to salt master: .. literalinclude:: _notes/global_highstate/sdb.conf :language: yaml Use salt reactor and sdb to orchestrate the delayed execution of a highstate when a git trigger is received: .. literalinclude:: _notes/global_highstate/reactor-minion_request.sls Script that handles tick and highstate execution logic: .. literalinclude:: _notes/global_highstate/sbin-global_highstate.py :language: python