You'll learn how to:
Estimated time: 10 minutes
Salt uses a utility called Salt SSH to connect to agentless systems. This utility can be installed on a management server, a development workstation, or your laptop. The simplest way is to install using pip:
pip install salt-ssh
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define :salt do |salt_config| salt_config.vm.box = "ubuntu/trusty64" salt_config.vm.host_name = 'salt.local' salt_config.vm.network "private_network", ip: "192.168.70.10" end config.vm.define :managed do |managed_config| managed_config.vm.box = "ubuntu/trusty64" managed_config.vm.host_name = 'managed.local' managed_config.vm.network "private_network", ip: "192.168.70.11" end end
This uses the same base image as the Demo Environment from the SaltStack Fundamentals guide, so if you have completed that guide this might save you some bandwidth.
To get you up and running quickly,
Tutorial sections show you how to install Salt SSH into a Python virtual environment with all Salt configuration files being loaded from a single directory.
This is a useful configuration to install on a development system or on your laptop, since you can easily load this virtual environment to quickly manage your servers using Salt. From a terminal:
which pip. If pip is not installed: pip.
which virtualenv. If virtualenv is not installed:
pip install virtualenv
salt-sshdirectory in our home directory. Create and
cdto this directory.
Run the following commands to create a virtual environment and install Salt SSH:
virtualenv venv source venv/bin/activate pip install salt-ssh
This directory now contains a virtual environment that you can activate any time you want to use
salt-ssh. Just open a terminal to the
salt-ssh directory and enter