Showing posts with label vagrant. Show all posts
Showing posts with label vagrant. Show all posts

Friday, 20 September 2013

Set IPs on vagrant-lxc VMs

Cross-communication is always nice.

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.define "web", primary: true do |web|
    web.vm.box = "quantal64"
    web.vm.provider :lxc do |lxc|
      lxc.customize 'network.ipv4', '10.0.3.100/32'
    end
  end

  config.vm.define "db" do |db|
    db.vm.box = "quantal64"
    db.vm.provider :lxc do |lxc|
      lxc.customize 'network.ipv4', '10.0.3.101/32'
    end
  end

end


FYI, versioning info:

vagrant -v
Vagrant 1.3.3

vagrant plugin list
vagrant-lxc (0.6.0)

Friday, 15 March 2013

vagrant on aws


  1. vagrant plugin install vagrant-aws
  2. vagrant box add aws001 https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
  3. vagrant init
  4. Adapt below and put in the "Vagrantfile" file
  5. vagrant up --provider=aws
  6. vagrant ssh
  7. vagrant destroy
Vagrant.configure("2") do |config|
  config.vm.box = "aws001"

  config.vm.provider :aws do |aws|
    aws.access_key_id = "<your_aws_key_id>"
    aws.secret_access_key = "<your_aws_secret>"
    aws.keypair_name = "<your_keypair_name>"
    aws.ssh_private_key_path = "/home/<you>/.ssh/<your_keypair_name>.pem"

    aws.region = "eu-west-1"
    aws.ami = "ami-01080b75"
    aws.ssh_username = "ubuntu"
  end
end

Thursday, 31 January 2013

Vagrant: how to set vm memory and force gui mode


# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant::Config.run do |config|

  config.vm.define :zenoss do |zenoss_config|
      zenoss_config.vm.box  = "quantal64"
      zenoss_config.vm.network :hostonly, "10.66.66.10"
      zenoss_config.vm.forward_port 80, 8885
      zenoss_config.vm.customize ["modifyvm", :id, "--memory", 1024]
  end

  config.vm.define :desktop do |desktop_config|
      desktop_config.vm.box  = "quantal64"
      desktop_config.vm.network :hostonly, "10.66.66.20"
      desktop_config.vm.boot_mode = :gui
  end

end

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...