Skip to content

Instantly share code, notes, and snippets.

devinnasar /
Created May 18, 2017
Original bootstrapping script
# use the latest stable Salt from
wget -O - | sudo apt-key add -
sudo echo 'deb trusty main' > /etc/apt/sources.list.d/saltstack.list
sudo apt-get update -y
sudo apt-get install salt-master -y
sudo apt-get install salt-minion -y
# setup top files to test the formula
# Bootstaps a SaltStack master server
# salt-formula configures the salt master using salt itself. This includes establishing connections allowing salt to serve assets from git and s3 endpoints.
# Before this can happen, we need to perform a lightweight saltstack installation, clone salt-formula, and call a salt highstate.
# Note: The state and pillar for this formula stay in the repo from the formula and are copied into /srv/salt and /srv/pillar upon invocation of this script.
# This repo will be the source of truth for our state and pillar tops, even though we will recieve configuration via gitfs.
# Instructions
_collect_soc_workpaper_files() {
declare -a _source_file_paths=("${!2}")
mkdir "${_id_dest_path}"
for _path in "${_source_file_paths[@]}"; do
cp -a "${_path}" "${_id_dest_path}"