From 8dac3d6360805ca40955dddb5431f54d7485610f Mon Sep 17 00:00:00 2001 From: Dale Bewley Date: Thu, 9 Jul 2015 22:37:45 -0700 Subject: fixes #331 causes NetworkManager to yield 2nd NIC --- Vagrantfile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index 648bc5171..a832ae84e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -39,6 +39,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "node#{node_index}" do |node| node.vm.hostname = "ose3-node#{node_index}.example.com" node.vm.network :private_network, ip: "192.168.100.#{200 + n}" + config.vm.provision "shell", inline: "nmcli connection reload; systemctl restart network.service" end end @@ -46,6 +47,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| master.vm.hostname = "ose3-master.example.com" master.vm.network :private_network, ip: "192.168.100.100" master.vm.network :forwarded_port, guest: 8443, host: 8443 + config.vm.provision "shell", inline: "nmcli connection reload; systemctl restart network.service" master.vm.provision "ansible" do |ansible| ansible.limit = 'all' ansible.sudo = true -- cgit v1.2.3 From 8f951b8d458c9ec58614a65e4dad4f3ce2b74293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pep=20Turr=C3=B3=20Mauri?= Date: Thu, 16 Jul 2015 16:46:33 +0200 Subject: Reference deployment_type instead of hardcoding origin --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index a832ae84e..f0aa0387b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -56,7 +56,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| "nodes" => ["node1", "node2"], } ansible.extra_vars = { - openshift_deployment_type: "origin", + openshift_deployment_type: deployment_type, } ansible.playbook = "playbooks/byo/config.yml" end -- cgit v1.2.3 From 5d7753a8ecb03634f045b057dc33369178615f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pep=20Turr=C3=B3=20Mauri?= Date: Sat, 1 Aug 2015 17:22:24 +0200 Subject: Deploying enterprise with Vagrant --- Vagrantfile | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index f0aa0387b..20cf0b5bd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -15,6 +15,28 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.hostmanager.manage_host = true config.hostmanager.include_offline = true config.ssh.insert_key = false + + if deployment_type === 'enterprise' + unless Vagrant.has_plugin?('vagrant-registration') + raise 'vagrant-registration-plugin is required for enterprise deployment' + end + username = ENV['rhel_subscription_user'] + password = ENV['rhel_subscription_pass'] + unless username and password + raise 'rhel_subscription_user and rhel_subscription_pass are required' + end + config.registration.username = username + config.registration.password = password + # FIXME this is temporary until vagrant/ansible registration modules + # are capable of handling specific subscription pools + if not ENV['rhel_subscription_pool'].nil? + config.vm.provision "shell" do |s| + s.inline = "subscription-manager attach --pool=$1 || true" + s.args = "#{ENV['rhel_subscription_pool']}" + end + end + end + config.vm.provider "virtualbox" do |vbox, override| override.vm.box = "chef/centos-7.1" vbox.memory = 1024 @@ -28,10 +50,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| libvirt.cpus = 2 libvirt.memory = 1024 libvirt.driver = 'kvm' - override.vm.box = "centos-7.1" - override.vm.box_url = "https://download.gluster.org/pub/gluster/purpleidea/vagrant/centos-7.1/centos-7.1.box" - override.vm.box_download_checksum = "b2a9f7421e04e73a5acad6fbaf4e9aba78b5aeabf4230eebacc9942e577c1e05" - override.vm.box_download_checksum_type = "sha256" + case deployment_type + when "enterprise" + override.vm.box = "rhel-7" + when "origin" + override.vm.box = "centos-7.1" + override.vm.box_url = "https://download.gluster.org/pub/gluster/purpleidea/vagrant/centos-7.1/centos-7.1.box" + override.vm.box_download_checksum = "b2a9f7421e04e73a5acad6fbaf4e9aba78b5aeabf4230eebacc9942e577c1e05" + override.vm.box_download_checksum_type = "sha256" + end end num_nodes.times do |n| @@ -53,12 +80,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| ansible.sudo = true ansible.groups = { "masters" => ["master"], - "nodes" => ["node1", "node2"], + "nodes" => ["master", "node1", "node2"], } ansible.extra_vars = { openshift_deployment_type: deployment_type, } - ansible.playbook = "playbooks/byo/config.yml" + ansible.playbook = "playbooks/byo/vagrant.yml" end end end -- cgit v1.2.3 From e438f0c19e86241e11853970aa7e94e90c5fffeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pep=20Turr=C3=B3=20Mauri?= Date: Mon, 3 Aug 2015 16:40:06 +0200 Subject: Use deployment_type, not openshift_deployment_type This seems to be what's used in other places --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index 20cf0b5bd..4675b5d60 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -83,7 +83,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| "nodes" => ["master", "node1", "node2"], } ansible.extra_vars = { - openshift_deployment_type: deployment_type, + deployment_type: deployment_type, } ansible.playbook = "playbooks/byo/vagrant.yml" end -- cgit v1.2.3 From a24c8ac1a2d07cada1228aed27077251edecc328 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Thu, 3 Sep 2015 11:14:30 -0400 Subject: Use official centos images for Vagrantfile --- Vagrantfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index 4675b5d60..33532cd63 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -38,7 +38,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end config.vm.provider "virtualbox" do |vbox, override| - override.vm.box = "chef/centos-7.1" + override.vm.box = "centos/7" vbox.memory = 1024 vbox.cpus = 2 @@ -54,8 +54,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| when "enterprise" override.vm.box = "rhel-7" when "origin" - override.vm.box = "centos-7.1" - override.vm.box_url = "https://download.gluster.org/pub/gluster/purpleidea/vagrant/centos-7.1/centos-7.1.box" + override.vm.box = "centos/7" override.vm.box_download_checksum = "b2a9f7421e04e73a5acad6fbaf4e9aba78b5aeabf4230eebacc9942e577c1e05" override.vm.box_download_checksum_type = "sha256" end @@ -66,7 +65,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "node#{node_index}" do |node| node.vm.hostname = "ose3-node#{node_index}.example.com" node.vm.network :private_network, ip: "192.168.100.#{200 + n}" - config.vm.provision "shell", inline: "nmcli connection reload; systemctl restart network.service" + config.vm.provision "shell", inline: "nmcli connection reload; systemctl restart NetworkManager.service" end end @@ -74,7 +73,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| master.vm.hostname = "ose3-master.example.com" master.vm.network :private_network, ip: "192.168.100.100" master.vm.network :forwarded_port, guest: 8443, host: 8443 - config.vm.provision "shell", inline: "nmcli connection reload; systemctl restart network.service" + config.vm.provision "shell", inline: "nmcli connection reload; systemctl restart NetworkManager.service" master.vm.provision "ansible" do |ansible| ansible.limit = 'all' ansible.sudo = true -- cgit v1.2.3