summaryrefslogtreecommitdiffstats
path: root/saltstack-server/src/main/vagrant
diff options
context:
space:
mode:
Diffstat (limited to 'saltstack-server/src/main/vagrant')
-rw-r--r--saltstack-server/src/main/vagrant/Vagrantfile-sample69
-rw-r--r--saltstack-server/src/main/vagrant/saltstack_sample_sls-2.yml34
-rw-r--r--saltstack-server/src/main/vagrant/saltstact_sample_sls.yml26
3 files changed, 129 insertions, 0 deletions
diff --git a/saltstack-server/src/main/vagrant/Vagrantfile-sample b/saltstack-server/src/main/vagrant/Vagrantfile-sample
new file mode 100644
index 00000000..5fbcfbb7
--- /dev/null
+++ b/saltstack-server/src/main/vagrant/Vagrantfile-sample
@@ -0,0 +1,69 @@
+# -*- 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|
+ os = "bento/ubuntu-16.04"
+ net_ip = "192.168.50"
+
+ config.vm.define :master, primary: true do |master_config|
+ master_config.vm.provider "virtualbox" do |vb|
+ vb.memory = "2048"
+ vb.cpus = 1
+ vb.name = "master"
+ end
+ master_config.vm.box = "#{os}"
+ master_config.vm.host_name = 'saltmaster.local'
+ master_config.vm.network "private_network", ip: "#{net_ip}.10"
+ master_config.vm.synced_folder "saltstack/salt/", "/srv/salt"
+ master_config.vm.synced_folder "saltstack/pillar/", "/srv/pillar"
+
+ master_config.vm.provision :salt do |salt|
+ salt.master_config = "saltstack/etc/master"
+ salt.master_key = "saltstack/keys/master_minion.pem"
+ salt.master_pub = "saltstack/keys/master_minion.pub"
+ salt.minion_key = "saltstack/keys/master_minion.pem"
+ salt.minion_pub = "saltstack/keys/master_minion.pub"
+ salt.seed_master = {
+ "minion1" => "saltstack/keys/minion1.pub",
+ "minion2" => "saltstack/keys/minion2.pub"
+ }
+
+ salt.install_type = "stable"
+ salt.install_master = true
+ salt.no_minion = true
+ salt.verbose = true
+ salt.colorize = true
+ salt.bootstrap_options = "-P -c /tmp"
+ end
+ end
+
+
+ [
+ ["minion1", "#{net_ip}.11", "1024", os ],
+ ["minion2", "#{net_ip}.12", "1024", os ],
+ ].each do |vmname,ip,mem,os|
+ config.vm.define "#{vmname}" do |minion_config|
+ minion_config.vm.provider "virtualbox" do |vb|
+ vb.memory = "#{mem}"
+ vb.cpus = 1
+ vb.name = "#{vmname}"
+ end
+ minion_config.vm.box = "#{os}"
+ minion_config.vm.hostname = "#{vmname}"
+ minion_config.vm.network "private_network", ip: "#{ip}"
+
+ minion_config.vm.provision :salt do |salt|
+ salt.minion_config = "saltstack/etc/#{vmname}"
+ salt.minion_key = "saltstack/keys/#{vmname}.pem"
+ salt.minion_pub = "saltstack/keys/#{vmname}.pub"
+ salt.install_type = "stable"
+ salt.verbose = true
+ salt.colorize = true
+ salt.bootstrap_options = "-P -c /tmp"
+ end
+ end
+ end
+ end \ No newline at end of file
diff --git a/saltstack-server/src/main/vagrant/saltstack_sample_sls-2.yml b/saltstack-server/src/main/vagrant/saltstack_sample_sls-2.yml
new file mode 100644
index 00000000..b96773e1
--- /dev/null
+++ b/saltstack-server/src/main/vagrant/saltstack_sample_sls-2.yml
@@ -0,0 +1,34 @@
+# /*-
+# * ============LICENSE_START=======================================================
+# * ONAP : CCSDK
+# * ================================================================================
+# * Copyright (C) 2018 Samsung Electronics. All rights reserved.
+# * ================================================================================
+# *
+# * =============================================================================
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * ============LICENSE_END=========================================================
+# */
+
+my-vim:
+ git.latest:
+ - name: https://github.com/nbari/my-vim
+ - target: /usr/local/share/my-vim
+ - rev: master
+ - submodules: True
+ cmd.wait:
+ - name: 'cd /usr/local/share/my-vim; git submodule init; git submodule foreach git pull origin master; git submodule update'
+ - watch:
+ - git: my-vim \ No newline at end of file
diff --git a/saltstack-server/src/main/vagrant/saltstact_sample_sls.yml b/saltstack-server/src/main/vagrant/saltstact_sample_sls.yml
new file mode 100644
index 00000000..84cc917b
--- /dev/null
+++ b/saltstack-server/src/main/vagrant/saltstact_sample_sls.yml
@@ -0,0 +1,26 @@
+# /*-
+# * ============LICENSE_START=======================================================
+# * ONAP : CCSDK
+# * ================================================================================
+# * Copyright (C) 2018 Samsung Electronics. All rights reserved.
+# * ================================================================================
+# *
+# * =============================================================================
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# *
+# * ============LICENSE_END=========================================================
+# */
+
+vim:
+ pkg.installed