GithubHelp home page GithubHelp logo

vmware-archive / salty-vagrant Goto Github PK

View Code? Open in Web Editor NEW
371.0 53.0 64.0 180 KB

Use Salt as a Vagrant provisioner.

License: BSD 2-Clause "Simplified" License

Ruby 15.30% Shell 84.56% SaltStack 0.14%

salty-vagrant's Introduction

Salty Vagrant

Provision Vagrant boxes using Saltstack.

Help and discussion can be found at #salt on Freenode IRC (just ping akoumjian) or the salt-users mailing list.

Warning

DEPRECATED: Vagrant includes a salt provisioner for versions 1.3.0 and above

Introduction

Salty Vagrant is a plugin for Vagrant which lets you use salt as a provisioning tool. You can use your existing salt formulas and configs to build up development environments.

The simplest way to use Salty Vagrant is by configuring it for masterless mode. With this setup, you use a standalone minion along with your file_roots and/or pillar_roots. See the examples/ folder for more details.

Masterless (Quick Start)

  1. Install Vagrant
  2. Install Salty Vagrant (vagrant plugin install vagrant-salt)
  3. Get the Ubuntu 12.04 base box: vagrant box add precise64 http://files.vagrantup.com/precise64.box
  4. Create/Update your Vagrantfile (Detailed in Configuration) [2]
  5. Place your minion config in salt/minion [1]
  6. Run vagrant up and you should be good to go.
[1]Make sure your minion config sets file_client: local for masterless
[2]Don't forget to create a shared folder for your salt file root

Configuration

Here is an extremely simple Vagrantfile, to be used with the above masterless setup:

Vagrant.configure("2") do |config|
  ## Choose your base box
  config.vm.box = "precise64"

  ## For masterless, mount your salt file root
  config.vm.synced_folder "salt/roots/", "/srv/salt/"

  ## Use all the defaults:
  config.vm.provision :salt do |salt|

    salt.minion_config = "salt/minion"
    salt.run_highstate = true

  end
end

Actions

run_highstate (true/false)
Executes state.highstate on vagrant up
accept_keys (true/false)
Accept all keys if running a master. DEPRECATED: use seed_master

Install Options

install_master (true/false)
Install the salt-master
no_minion (true/false)
Don't install the minion
install_syndic (true/false)
Install the salt-syndic
install_type (stable | git | daily)
Whether to install from a distribution's stable package manager, a daily ppa, or git treeish.
install_args (develop)
When performing a git install, you can specify a branch, tag, or any treeish.
always_install (true/false)
Installs salt binaries even if they are already detected

Minion Options

minion_config (salt/minion)
Path to a custom salt minion config file.
minion_key (salt/key/minion.pem)
Path to your minion key
minion_pub (salt/key/minion.pub)
Path to your minion public key

Master Options

master_config (salt/minion)
Path to a custom salt master config file
master_key (salt/key/master.pem)
Path to your master key
master_pub (salt/key/master.pub)
Path to your master public key
seed_master {minion_name:/path/to/key.pub}
Upload keys to master, thereby pre-seeding it before use.

Other

bootstrap_script (salt/bootstrap_salt.sh)
Path to a custom bootstrap script
temp_config_dir (/tmp)
Path on the guest box that config and bootstrap files will be copied to before placing in the salt directories
pillar_data
Get pillar data that has been set (this is read only because data should be set using the pillar command referenced below)
verbose (true/false)
Prints bootstrap script output to screen

Installation Notes

Supported Operating Systems

  • Ubuntu 10.x/11.x/12.x
  • Debian 6.x/7.x
  • CentOS 6.3
  • Fedora
  • Arch
  • FreeBSD 9.0

Installing from source

  1. git clone https://github.com/saltstack/salty-vagrant.git
  2. cd salty-vagrant
  3. git submodule init
  4. git submodule update
  5. gem install rubygems-bundler
  6. gem build vagrant-salt.gemspec
  7. vagrant plugin install vagrant-salt-[version].gem

If you'd like to include the latest stable revision of the salt-bootstrap script, run the following after step 5:

  1. cd scripts
  2. git pull origin stable
  3. Rebuild the gem if you had built it previously.

Miscellaneous

Pillar Data

You can export pillar data for use during provisioning by using the pillar command. Each call will merge the data so you can safely call it multiple times. The data passed in should only be hashes and lists. Here is an example:

config.vm.provision :salt do |salt|

  # Export hostnames for webserver config
  salt.pillar({
    "hostnames" => {
      "www" => "www.example.com",
      "intranet" => "intranet.example.com"
    }
  })

  # Export database credentials
  salt.pillar({
    "database" => {
      "user" => "jdoe",
      "password" => "topsecret"
    }
  })

  salt.run_highstate = true

end

Using Remote Salt Master

If you are already using Salt for deployment, you can use your existing master to provision your vagrant boxes as well. You will need to do one of the following:

  1. Manually accept the vagrant's minion key after it boots. [3]
  2. Preseed the Vagrant box with minion keys pre-generated on the master
[3]This is not recommended. If your developers need to destroy and rebuild their VM, you will have to repeat the process.

Preseeding Vagrant Minion Keys

On the master, create the keypair and add the public key to the accepted minions folder:

root@saltmaster# salt-key --gen-keys=[minion_id]
root@saltmaster# cp [minion_id].pub /etc/salt/pki/master/minions/[minion_id]

Replace [minion_id] with the id you would like to assign the minion.

Next you want to bundle the key pair along with your Vagrantfile, the salt_provisioner.rb, and your minion config. The directory should look something like this:

myvagrant/
    Vagrantfile
    salt/
        minion.conf
        key/
            minion.pem
            minion.pub

You will need to determine your own secure method of transferring this package. Leaking the minion's private key poses a security risk to your salt network.

The are two required settings for your minion.conf file:

master: [master_fqdn]
id: [minion_id]

Make sure you use the same [minion_id] that you used on the master or it will not match with the key.

Create/Update your Vagrantfile per the example provided in the Configuration section.

Finally, you should be able to run vagrant up and the salt should put your vagrant minion in state.highstate.

salty-vagrant's People

Contributors

akoumjian avatar alecthomas avatar basepi avatar benhosmer avatar cameron avatar ev0rtex avatar ewdurbin avatar ffa avatar gussy avatar ifnull avatar ipmb avatar jarus avatar kiall avatar maspwr avatar raadad avatar russkel avatar s0undt3ch avatar thatch45 avatar vmwghbot avatar whitmo avatar zeliklil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

salty-vagrant's Issues

Installation from source instructions are broken

After untarring, the directory is not a git repository, so the steps

  1. git submodule init
  2. git submodule update

don't work. (Yay markdown renumbering: those are 4 and 5.)

I got it done from cloning and checking out the branch / commit of interest, but the instructions should be fixed. Ideally the tarball would include the right version, but I don't think that's a git option let alone a github option. The instructions should probably be updated to say do a git clone, as I don't see an easier way to get the bootstrap script

Installing gem with vagrant gem installs vagrant-salt globally

This issue is the same as #6 but I couldn't reopen it.

I'm running Arch Linux and vagrant 1.0.5, when I do:

$ vagrant gem install vagrant-salt
# ... Installs all the things
Installing RDoc documentation for vagrant-salt-0.3.1.

Then, if i do

$ gem list
# ...
vagrant-salt (0.3.1)
# but
$ vagrant gem list

** LOCAL GEMS **

# shows NOTHING!

I can require vagrant-salt form an irb console:

irb(main):001:0> require 'vagrant-salt'
=> true

But when trying to start vagrant it will fail with the following message:

$ vagrant up
There was a problem with the configuration of Vagrant. The error message(s)
are printed below:

vm:
* The provisioner 'salt' doesn't exist.

Looks like the gem installed via vagrant is not installed correctly?

where to report bugs since salt became native vagrant provisioner? (and adding relevant hint into salty-vagrant README)

As issue #72 "Bundle salt provisioner with Vagrant" is now resolved (and salt became native Vagrant provisioner - the question is: Where to report bug since now?

I would expect to move to Vagrant repo.

If this is to happen, I would appreciate, if README get somewhere a note, stating, further development was moved to the Vagrant repo.

If, on the other hand, there is a process, which keeps updates inside of this repo to be regularly pushed into Vagrant repo, such and information would be also valuable (in the README).

boostrap_salt.sh out of date defaults to epel-testing for stable installations

in v0.4.0 the bootstrap_salt.sh script included via git submodule defaults to the epel-testing repo even when a stable installation type is chosen.

this causes madness and confusion, especially around major versions of salt (0.16 -> 0.17) for instance.

a new version of salty-vagrant including updated boostrap scripts would be much appreciated.

Error on file_client: local for masterless salt (Debian 6)

Although the configuration file specified in the Vagrantfile contains the file_client: local definition, whenever starting up with vagrant up, the configuration never overwrites the one put in /etc/salt/minion by the bootstrap-salt-minion.sh installation script.

Maybe I'me getting that wrong, but I'm not able to have a debian squeeze start correctly, without copying the configuration manually in the right place.

Salt Master did not receive minion key.

When using with a salt-master, if vagrant reload is called and the minion key was already accepted, it attempts to wait for the key again and fails:

Salt successfully configured!
Waiting for minion key...
Salt Master did not receive minion key.

salt-key -L

Accepted Keys:
precise64

Unaccepted Keys:

Rejected Keys:

You can additionally duplicate this issue if you pass in a master config, and set auto_accept: True in the master config. It will wait, and the give up because the key has already been accepted.

Windows install fails due to JSON gem dependency.

I'm not much of a Ruby guy, but it looks like there's a dependency on a JSON gem somewhere. This particular gem includes C extension that needs to be compiled, which causes the build to bomb on Windows:

C:\temp\vagtest>vagrant plugin install vagrant-salt
Installing the 'vagrant-salt' plugin. This can take a few minutes...
C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:556:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        C:/vagrant/vagrant/embedded/bin/ruby.exe extconf.rb
creating Makefile

make
generating generator-i386-mingw32.def
compiling generator.c
make: gcc: Command not found
make: *** [generator.o] Error 127


Gem files will remain installed in C:/Users/jjbegin/.vagrant.d/gems/gems/json-1.7.7 for inspection.
Results logged to C:/Users/jjbegin/.vagrant.d/gems/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:534:in `block in build_extensions'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:509:in `each'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:509:in `build_extensions'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in `install'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-.1.2/plugins/commands/plugin/action/install_gem.rb:27:in `block in call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-.1.2/plugins/commands/plugin/action/install_gem.rb:23:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-.1.2/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builder.rb:109:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `block in run'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `run'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/commands/plugin/command/base.rb:17:in `action'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-.1.2/plugins/commands/plugin/command/install.rb:28:in `execute'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/commands/plugin/command/root.rb:47:in `execute'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/cli.rb:46:in `execute'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/environment.rb:406:in `cli'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.2/bin/vagrant:60:in `<top (required)>'
        from C:/vagrant/vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `load'
        from C:/vagrant/vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `<main>'

C:\temp\vagtest>

Is there any way "json_pure" can be used to eliminate the need for the C extension?

Explore using vagrant-vbguest gem to update guest additions on vagrant up

I found this while troubleshooting an earlier issue with my Virtualbox guest additions being newer than the guest additions installed on the vagrant box I was using.

This blog post here gives an idea of what it does.

The repo is here, but I think I just installed it as a gem.

It might be an option. I used it a little, but wound up just updating the additions myself and then exporting a new box because if I remember properly, salty still had a conflict.

New release in the near future

Hi,
thanks for salty-vagrant but will be there a new release in the near future. This would add support of vagrant boxes with Debian Wheezy.

"daily" does not work on CentOS 6.3

Appears to be missing a bunch of dependency packages:

[default] Bootstrapping salt-minion on VM...
[default]  * System Information:
[default]      CPU:          GenuineIntel
[default]      CPU Arch:     x86_64
[default]      OS Name:      Linux
[default]      OS Version:   2.6.32-279.14.1.el6.x86_64
[default]      Distribution: CentOS 6.3
[default]  * INFO: install_centos_63_daily_deps not found....
[default]  * INFO: install_centos_63_deps not found....
[default]  * INFO: install_centos_daily_deps not found....
[default]  * INFO: install_centos_deps not found....
[default]  * INFO: install_centos_63_daily not found....
[default]  * INFO: install_centos_daily not found....
[default]  * INFO: config_centos_63_daily_minion not found....
[default]  * INFO: config_centos_63_minon not found....
[default]  * INFO: config_centos_daily_minion not found....
[default]  * INFO: config_centos_minion not found....
[default]  * INFO: Found function config_minion
[default]  * INFO: install_centos_63_daily_post not found....
[default]  * INFO: install_centos_63_post not found....
[default]  * INFO: install_centos_daily_post not found....
[default]  * INFO: install_centos_post not found....
 * ERROR: No dependencies installation function found. Exiting...
 * Removing the logging pipe /tmp/bootstrap-salt-minion.logpipe
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/tmp/bootstrap-salt-minion.sh -c /tmp/ daily 

Enhancement: add config option for masterless

I brought up a related idea (separate provisioner for masterless) in the vagrant-salt-natively issue.

My motivation is that a common use case for vagrant is to use it with baked-in config (ie without a CM server somewhere). This is made very straightforward for Chef and Puppet, but in the simplest case for Salt will require creating a single-line (file_client: local) minion config file, and adding a line in the Vagrantfile to point to it.

My initial suggestion was to add a masterless provisioner, mirroring the setup that Chef and Puppet have.

@akoumjian's comment:

I'm not sure I really like that design. I would rather not make any assumptions about people's setups (as many do not user masterless). I would rather have lots of documented examples for different configs, rather than building a separate provisioner for what is essentially just a flag in a config file.

I agree with this—a separate provisioner is silly. However, I still think the common use case of masterless could be streamlined a bit. My thought: add a salt.masterless config option that ensures that file_client: local is in the minion config. This includes creating an otherwise empty minion config if none is given.

I think the existence of the accept_keys flag supports this addition, as that too is ‘just a flag in a config file’, yet warrants a convenience option in the vagrant configuration.

Get timeout error only when NOT using Precise 64 from vagrantup but Raring64 from Ubuntu

Am using Vagrant 1.3.1 but had similar issues before as well.

So if I run Precise 64 as in:
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"

I have no problems with my SQL setups from Salt with MySQL and PostgreSQL.

...
However if I run Raring 64 as in:
config.vm.box = "raring64-ubuntu-13.04LTS"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"

I keep getting this error (mostly), although a few times it has NOT happened:

[dbmsSQL] Waiting for machine to boot. This may take a few minutes...
Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.ssh.timeout" value) time period. This can mean a number of things.

If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes.

Verify that authentication configurations are also setup properly, as well.

If the box appears to be booting properly, you may want to increase the timeout ("config.ssh.timeout") value.

...
I try to increase config.vm.timeout to 20 but that parameter is not accepted as saying timeout does not exists.

Any particular reason for this?

Thank you.

Is it possible to install from source into vagrant which is also installed from source within rvm?

I am looking to work with some unreleased vagrant features along with unreleased vagrant-salt features. I am building both gems from their source and installing from there.

I can install a build of vagrant-salt fine if using vagrant installed from the official package.

How is this handled in the development of vagrant-salt? Maybe someone has written about this in another issue?

Thanks to anyone who may have any advice. This is just a shot in the dark for me so feel free to close if this issue if it is in no way related to vagrant-salt.

[12:06:50] $ vagrant plugin install ../salty-vagrant/vagrant-salt-0.4.0.gem
You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.
/Users/brentsmyth/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/rubygems/format.rb:62:in from_io': private methodopen' called for Gem::Package:Class (NoMethodError)
from /Users/brentsmyth/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/rubygems/format.rb:46:in block in from_file_by_path' from /Users/brentsmyth/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/rubygems/format.rb:45:inopen'
from /Users/brentsmyth/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/rubygems/format.rb:45:in from_file_by_path' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/plugins/commands/plugin/action/install_gem.rb:29:incall'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/action/warden.rb:34:in call' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/plugins/commands/plugin/action/bundler_check.rb:20:incall'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/action/warden.rb:34:in call' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/action/builder.rb:116:incall'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/action/runner.rb:61:in block in run' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/util/busy.rb:19:inbusy'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/action/runner.rb:61:in run' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/plugins/commands/plugin/command/base.rb:17:inaction'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/plugins/commands/plugin/command/install.rb:27:in execute' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/plugins/commands/plugin/command/root.rb:52:inexecute'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/cli.rb:38:in execute' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/lib/vagrant/environment.rb:478:incli'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/gems/vagrant-1.3.6.dev/bin/vagrant:96:in <top (required)>' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/bin/vagrant:23:inload'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/bin/vagrant:23:in <main>' from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/bin/ruby_noexec_wrapper:14:ineval'
from /Users/brentsmyth/.rvm/gems/ruby-1.9.3-p362@caisbs/bin/ruby_noexec_wrapper:14:in `

'

Pillar data in Vagrantfiles doesn't appear to be available on highstate run

I'm seeing this with vagrant-salt == 0.4.0, salt == 0.16.3, and vagrant == 1.2.7.

I'm new here, so it's possible I'm misunderstanding something pretty basic about how pillar data is exposed, or when it should be available. But this does seem like a bug at the moment.

To reproduce:

In your Vagrantfile:

config.vm.provision :salt do |salt|
    salt.minion_config = "salt/minion"
    salt.verbose = true
    salt.pillar({"key" => "value"})
    salt.run_highstate = true
end

In some init.sls file:

{% for pillar_key in pillar.keys() %}
do-pillar-{{ pillar_key }}:
    cmd.run:
        - name: echo {{ pillar_key }}
{% endfor %}

Now run vagrant provision. You should see output for every available pillar key.

Expected result:

The key key is present in pillar

Actual result:

The key key is not present in pillar. (I only see one key, called master.)

Since this is annoying to reproduce, I've created a repository that should just reproduce it directly. git clone https://github.com/davepeck/salty-vagrant-pillar-question and then vagrant up.

Config to install salt develop still installs latest release

I've set my Vagrantfile like this:

Vagrant::Config.run do |config|
  ## Chose your base box
  config.vm.box = "bensprecise64"
  config.vm.network :hostonly, "192.168.33.19"

  ## For masterless, mount your salt file root
  config.vm.share_folder "salt_file_root", "/srv", "salt/roots/salt"


  ## Use all the defaults:
  config.vm.provision :salt do |salt|
    salt.run_highstate = true

    ## Optional Settings:
    salt.minion_config = "salt/minion.conf"
    # salt.temp_config_dir = "/existing/folder/on/basebox/"
    salt.salt_install_type = "git"
    salt.salt_install_args = "develop"

    ## If you have a remote master setup, you can add
    ## your preseeded minion key
    # salt.minion_key = "salt/key/minion.pem"
    # salt.minion_pub = "salt/key/minion.pub"
  end
end

But, I still end up with:

vagrant@precise64:~$ salt-minion --version
salt-minion 0.10.5
vagrant@precise64:~$ salt-call --version
salt-call 0.10.5

Develop branch of plugin broken

When calling

state.highstate... (this may take a while)

I get

provisioner.rb:165:in `get_pillar': undefined method `empty?' for nil:NilClass (NoMethodError) 

This does not occur in previous commit.

Once this is fixed ill be able to finalize the pull request into vagrant
hashicorp/vagrant#1626

/tmp/bootstrap_salt.sh

[default] Running provisioner: VagrantPlugins::Salt::Provisioner...
Checking if salt-minion is installed
salt-minion was not found.
Checking if salt-call is installed
salt-call was not found.
Bootstrapping Salt... (this may take a while)
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/tmp/bootstrap_salt.sh 

I assume this means salt is not installed inside the vagrant box? Strange, because earlier tonight, on the same vagrant box, it worked ... I can't remember if I had to install it in the box or if it was done on vagrant up. I'm confused.

Vagrant 1.1.1
Vagrant-Salt 0.4.0

Debian 7 requires salt bootstrap 1.5.5

The current version 1.5.4 that is submodule'd will fail on bootstrapping debian 7. This is due to salt being in the unstable packages repo and apt not being configured for that repo.

salt-minion debian package seems to be missing

I am getting the below feedback when trying to spin up a new machine. This was working up until today.

Reading package lists...
[default]
[default] * Running install_debian_60_stable()
[default] Reading package lists...
[default]
[default] Building dependency tree...
[default]
[default] Reading state information...
[default]
[default] E
[default] :
[default] Unable to locate package salt-minion
[default]
[default] * Failed to run install_debian_60_stable()!!!
[default] * Removing the logging pipe /tmp/bootstrap-salt-minion.logpipe
[default] * Killing logging pipe tee's with pid(s): 1451

This also happens when I follow these instructions... http://salt.readthedocs.org/en/latest/topics/installation/debian.html

Bundle Salt provisioner with Vagrant

I know this has been discussed before, but given that the long awaited and significant Vagrant 1.1 upgrade triggered the Ansible provisioner to (de facto) be migrated to Vagrant core (see hashicorp/vagrant#1465) and @mitchellh also adding a CFEngine provisioner a couple of days ago (see hashicorp/vagrant@5fb5a60), this trend to bundle relevant and mature provisioners in Vagrant core seems to call for 'Salty Vagrant' joining the parade :)

  • While maintaining the provisioner within the saltstack organization might make more sense from a development point of view, I'd argue that end users being able to provision readily configured Vagrant machines with Salt out of the box is a more important aspect from a usability point of view, thus fostering Salt adoption.

Unfortunately I'm not in a position to help out with this myself, so I'm basically aiming to raise awareness, but since the migration to 1.1 has already been done (see #59), I'd hope this might actually be a fairly straight forward task for those in the know (if desired in the first place of course).

Hangs on boot after highstate on CentOS 6.3

Whenever I issue vagrant up, salt or vagrant+ssh hangs at the end of the salt.highstate run and never returns to the console.

The only way to return to control is to ^C a couple of times.

Salt not installed if local /roots/pillar doesn't exist

This is from here: https://github.com/akoumjian/salty-vagrant/issues/1 before the repo was moved under saltstack.

I wanted to update that I was using salty-vagrant for testing today and noticed that if there wasn't a local roots/pillar directory present, the salt binaries weren't installed during vagrant up.

If this is by design, let me know and I will be happy to update the documentation to include this fact to make it more obvious to the user. I don't know much ruby, but I'll do my best to help out.

Gem-ified doesn't work

I am using a Windows system.

I installed salty-vagrant as:
gem install vagrant-salt

I installed Vagrant both from the Windows installer and as a gem

I tried to run the example:

C:\workspace\salty-vagrant\example>vagrant up
C:/usr/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- vagrant-salt/provisioner (LoadError) from C:/usr/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from C:/workspace/salty-vagrant/lib/vagrant-salt.rb:2:in <top (required)>' from C:/usr/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from C:/workspace/salty-vagrant/example/Vagrantfile:1:in<top (required)>'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config/loader.rb:115:in load' from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config/loader.rb:115:inblock in procs_for_source'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config.rb:41:in block in capture_configures' from <internal:prelude>:10:insynchronize'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config.rb:36:in capture_configures' from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config/loader.rb:114:inprocs_for_source'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config/loader.rb:51:in block in set' from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config/loader.rb:45:ineach'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/config/loader.rb:45:in set' from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/environment.rb:377:inblock in load_config!'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/environment.rb:392:in call' from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/environment.rb:392:inload_config!'
from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/lib/vagrant/environment.rb:327:in load!' from C:/usr/vagrant/vagrant/embedded/lib/ruby/gems/1.9.1/gems/vagrant-1.0.3/bin/vagrant:40:in<top (required)>'
from C:/usr/vagrant/vagrant/bin//../embedded/bin/vagrant:19:in load' from C:/usr/vagrant/vagrant/bin//../embedded/bin/vagrant:19:in

'

Error when providing both master_key and master_pub

My vagrant config:

Vagrant.configure("2") do |config|

  config.vm.define :master do |v|
    v.vm.box = "raring64"

    v.vm.network :private_network, ip: "192.168.35.101"
    v.vm.synced_folder "roots/", "/srv/roots"
    v.vm.synced_folder "pillar/", "/srv/pillar"

    v.vm.provision :salt do |salt|
      salt.minion_config = "minion-configs/salt-master.minion"
      salt.run_highstate = true
      salt.install_type = 'daily'
      salt.master_key = 'keys/salt-master.pem'
      salt.master_pub = 'keys/salt-master.pub'

      salt.verbose = true
    end
  end

Doing a vagrant up master gives:

salt:
* You must include both public and private keys.

OS X support?

I get the following error when I try to install vagrant-salt with vagrant plugin install vagrant-salt on OS X 10.8.4:

ld: in '/usr/local/Cellar/gcc/4.7.2/gcc/lib/libgcc_s.1.dylib', missing required architecture i386 in file /usr/local/Cellar/gcc/4.7.2/gcc/lib/libgcc_s.1.dylib (1 slices) for architecture i386

See https://gist.github.com/jmagnusson/58f87e67b31b6134724c for full error message.

New config dir option breaks other options

@s0undt3ch , just got this when trying to install from daily ppa and configuring tmp dir:

[default] 
[default]  * ERROR: Too many arguments.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/tmp/bootstrap-salt-minion.sh daily -c /tmp/

Gentoo support

salty-vagrant works with Gentoo after updating to a newer bootstrap script. Can this be noted on the README? (and perhaps the bootstrap updated?)

Bump version to v0.1.x or v0.2

GitHub currently has a v0.1 tag that differs from the rubygems.org v0.1.

Probably my fault for leaving 0.1 in the gemspec though ;)

EDIT: FYI .. rake release should automatically build, tag and release.

Salt not bootstrapped on VM on first run(s)

Whenever I do a "vagrant up" for the first time, bootstrapping is not happening.
This is on Mac OS X (10.8.5), Virtualbox (4.2.18), vagrant-salt (0.4.0)

After destroying the box, and "upping" it again, it works

➜  dev-machine-test git:(master) ✗ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Mounting shared folders...
[default] -- /srv
[default] -- /vagrant
➜  dev-machine-test git:(master) ✗ vagrant halt
[default] Attempting graceful shutdown of VM...
➜  dev-machine-test git:(master) ✗ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Mounting shared folders...
[default] -- /srv
[default] -- /vagrant
➜  dev-machine-test git:(master) ✗ vagrant halt
[default] Attempting graceful shutdown of VM...
➜  dev-machine-test git:(master) ✗ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Mounting shared folders...
[default] -- /srv
[default] -- /vagrant
➜  dev-machine-test git:(master) ✗ vagrant destroy
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Forcing shutdown of VM...
[default] Destroying VM and associated drives...
[default] Running cleanup tasks for 'salt' provisioner...
➜  dev-machine-test git:(master) ✗ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Mounting shared folders...
[default] -- /srv
[default] -- /vagrant
[default] Running provisioner: salt...
Copying salt minion config to vm.
Checking if salt-minion is installed
salt-minion was not found.
Checking if salt-call is installed
salt-call was not found.
Bootstrapping Salt... (this may take a while)

Allow multiple salt state directories to be supplied for masterless minions

So previously when provisioning with puppet my set allowed for devs to maintain a set of their own manifests containing vim configs, bashrc setting etc. The way i achieved this was setting a predifined set of dirs in the host in the vagrant file and mounting each of those onto the guest like so

config.vm.share_folder("common-dev", "/home/vagrant/modules/dev", "../../../modules/dev")

puppet.options = ["--modulepath", "some/paths"]

it would be great to be able to replicate this functionality with salt!! in the mean time even a work around with the minion.conf file would be greatly appreciated if anyone knows of one!

example/complete fails with salt '*' saltutil.sync_all and "stdin: is not a tty"

Trying to run "complete" example, learning about preseeding minion keys to a master, the sample fails.

vagrant version: 1.2.7
OS: Ubuntu 13.04 64 bit

  1. installed salty-vagrant from source code as described in readme - Installing from source. Git shows last commit being 0476bcb
  2. cd to examples/complete
  3. in Vagrantfile, commented out the first line:
#require '../../../salty-vagrant/lib/vagrant-salt/plugin'
  1. run $ vagrant up
  2. got and error as follows:
Salt successfully configured and installed!
ATTENTION: 'salt.accept_keys' is deprecated. Please use salt.seed_master to upload your minion keys
Waiting for minion key...
Adding 2 key(s) for minion(s)
Calling state.highstate... (this may take a while)
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

salt '*' saltutil.sync_all

Stdout from the command:

No minions matched the target. No command was sent, no jid was assigned.



Stderr from the command:

stdin: is not a tty
  1. checking status on VM:
$ vagrant ssh
$ sudo su
$ salt-key
Accepted Keys:
Unaccepted Keys:
precise64
Rejected Keys:
$ cd /etc/salt/pki
$ find .
.
./minions
./minions/seed-minion.pub
./minion
./minion/minion.pub
./minion/minion.pem
./master
./master/minions
./master/minions_rejected
./master/master.pem
./master/minions_pre
./master/minions_pre/precise64
./master/master.pub

Setup now prompting to confirm about minion config issue

Just today I compiled a gem from the HEAD revision on github and installed it to Vagrant. I am now getting prompted to confirm this when bringing a new machine up...

[default] Setting up salt-common (0.10.1-3bpo60+1) ...
[default] Setting up salt-minion (0.10.1-3
bpo60+1) ...
[default] Configuration file /etc/salt/minion' [default] ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. [default] What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation [default] The default action is to keep your current version. [default] *** minion (Y/I/N/O/D/Z) [default=N] ? [default] Configuration file/etc/salt/minion'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** minion (Y/I/N/O/D/Z) [default=N] ?

This was not happening with the revision from last week. The main issue here is that Vagrant doesn't really let me properly input anything to continue, so it really just fails.

I am using a debain 6 box. I am compiling from github because an issue was fixed last week where the bootstrap script was having issues with debian version 6.0.6. This is what is in the Vagrantfile...

config.vm.provision :salt do |salt|
salt.run_highstate = true

## Optional Settings:
salt.minion_config = "config/salt/minion.conf"
# salt.salt_install_type = "git"
# salt.salt_install_args = "develop"

## Only Use these with a masterless setup to
## load your state tree:
salt.salt_file_root_path = "config/salt/roots/salt"
salt.salt_pillar_root_path = "config/salt/roots/pillar"

end

Any help is really appreciated. For now I will just roll back the repo which I cloned to an earlier state and compile the gem from that.

Thanks!

Vagrant config fails with "Undefined method `run_highstate='"

I'm trying to use salty-vagrant (moving from a custom bootstrap script) and it's not quite working correctly. I've included as much information as I can. I'm really a Python guy, so I'm not sure exactly how to fix the issue I'm seeing here - is there a prerelease gem or something else I could try?

Reproduce:

sudo gem install vagrant
vagrant gem install
# add vagrant-salt stuff to gemfile, given below
vagrant status

Versions:

  • OSX 10.7.5
  • ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]

Gems:

archive-tar-minitar (0.5.2)
childprocess (0.3.9)
erubis (2.7.0)
ffi (1.4.0)
i18n (0.6.4)
json (1.5.5)
log4r (1.1.10)
net-scp (1.0.4)
net-ssh (2.2.2)
vagrant (1.0.6)
vagrant-salt (0.3.2)

Vagrantfile:

def template(config, name, port)
  id = name.sub("-", "_").to_sym
  config.vm.define id do |cfg|
    cfg.vm.host_name = name
    cfg.vm.box = "precise64"
    cfg.vm.share_folder "salt_file_root", "/srv", "srv"
    cfg.vm.forward_port 80, port

    cfg.run_highstate = true
    cfg.minion_config = "bootstrap/minion.conf"
  end
end

Vagrant::Config.run do |config|
  # a bunch of vagrant configs (for various server profiles) follow, elided except for an example
  template config, "server-name", 8080
end

Minion.conf:

grains:
  staging: True

file_client: local
pillar_client: local
state_verbose: False

Stacktrace:

/Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/config/top.rb:29:in `method_missing': undefined method `run_highstate=' for #<Vagrant::Config::Top:0x10b684640> (NoMethodError)
from /Users/brian.hicks/code/salt/Vagrantfile:9:in `template'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:83:in `call'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:83:in `load'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:79:in `each'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:79:in `load'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:76:in `each'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:76:in `load'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/environment.rb:387:in `load_config!'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/environment.rb:414:in `[]'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/environment.rb:414:in `load_config!'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/environment.rb:408:in `map'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/environment.rb:408:in `load_config!'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/lib/vagrant/environment.rb:327:in `load!'
from /Library/Ruby/Gems/1.8/gems/vagrant-1.0.6/bin/vagrant:40
from /usr/bin/vagrant:19:in `load'
from /usr/bin/vagrant:19

Wrong Debian version/codename

The Readme shows that this is compatible with Debian 6.0 however in the install script it is looking for a codename of "wheezy" or "jessie". Wheezy is Debian 7.0 and Jessie will be Debain 8.0.

I tried using this with a Debain 6.0 "Squeeze" 32 bit image and it failed with the following error message:

[default] Adding salt repository.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

add-apt-repository -y ppa:saltstack/salt

It would seem that for some reason Debain Squeeze is being treated as if it is Ubuntu...

salt-call state.highstate -l debug not running

Hello,
I am using salt plugin with vagrant. The sls files are completing with the installation of the packages. but after the run. salt tries to run the high.state with the debug option on the vm and fails. Looks to be that this run should have sudo prepended to it in the bootstrap_sh script. but that just my assumption as I am a novice on this.
I am not sure if I am heading in the right direction.

https://gist.github.com/vinitkhandagle/5575699

linbynd:=> {master} ~/vagrant_machines$ vagrant -v
Vagrant version 1.2.2
linbynd:=> {master} ~/vagrant_machines$ vagrant plugin list
vagrant-ansible (0.0.5)
vagrant-salt (0.4.0)
vagrant-vbguest (0.8.0)
linbynd:=> {master} ~/vagrant_machines$

Vagrant error msg

When I use salty vagrant (version 1.2.2) I got an error msg.

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

salt-call state.highstate -l debug

It seems that salt-call return exit code status equal to 2 even when every works fine.

vagrant ssh
sudo salt-call state.highstate -l debug
echo $?

I'm running salt in masterless mode and I got the same error with the masterless example.
The configuration works fine but it's s a bit annoying that vagrant return this error msg.
Is there a way to silent it ?

Salt installation handlers for other OS

This tool currently relies on assuming the user is provisioning an Ubuntu virtual machine. There need to be handlers that check the virtual machine for the type distribution and then bootstrap salt with the appropriate package or source management tools.

Suggest looking at the salt/pkg module for some guidance on how this is done.

Bug in seed_master option

In ruby script you copy preseeded keys to temporary dir with filenames like seed-#{name}.pub. Then you copy them to final directory with bash bootstrap script and leave them in "temporary" format seed-#{name}.pub. But under directories like /etc/salt/pki/master/minions/ keys must be in format #{name} (without seed- prefix and .pub extension).

Update please provisioner.rb lib or bootstrap-salt.sh script (I attached simple solution for ruby file bellow).

Thank you!

diff --git a/lib/vagrant-salt/provisioner.rb b/lib/vagrant-salt/provisioner.rb
index 2b50dd6..1291b7a 100644
--- a/lib/vagrant-salt/provisioner.rb
+++ b/lib/vagrant-salt/provisioner.rb
@@ -119,10 +119,10 @@ module VagrantPlugins
           @machine.communicate.sudo("mkdir -p -m777 #{seed_dir}")
           @config.seed_master.each do |name, keyfile|
             sourcepath = expanded_path(keyfile).to_s
-            dest = "#{seed_dir}/seed-#{name}.pub"
-            @machine.communicate.upload(sourcepath, dest)   
+            dest = "#{seed_dir}/#{name}"
+            @machine.communicate.upload(sourcepath, dest)
           end
-          options = "#{options} -k #{seed_dir}" 
+          options = "#{options} -k #{seed_dir}"
         end

Archlinux moves minion config

It appears the minion config gets moved when salt is installed from /etc/salt/minion to /etc/salt/minion.pacorig

Probably best to bootstrap then place the config then start the appropriate service.

Use a specific Salt environment from the Vagrantfile?

I'm trying to use the same Salt roots for production and development (in development I'm using Salty Vagrant).

Is it possible to configure Salty Vagrant to use my "dev" environment? Otherwise it just uses base.

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.