Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Vagrantfile 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
  4. VAGRANTFILE_API_VERSION = "2"
  5. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  6. # All Vagrant configuration is done here. The most common configuration
  7. # options are documented and commented below. For a complete reference,
  8. # please see the online documentation at vagrantup.com.
  9. # Every Vagrant virtual environment requires a box to build off of.
  10. config.vm.box = "trusty64"
  11. # The url from where the 'config.vm.box' box will be fetched if it
  12. # doesn't already exist on the user's system.
  13. config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
  14. # Create a forwarded port mapping which allows access to a specific port
  15. # within the machine from a port on the host machine. In the example below,
  16. # accessing "localhost:8080" will access port 80 on the guest machine.
  17. # config.vm.network :forwarded_port, guest: 80, host: 8080
  18. # Create a private network, which allows host-only access to the machine
  19. # using a specific IP.
  20. # config.vm.network :private_network, ip: "192.168.33.10"
  21. # Create a public network, which generally matched to bridged network.
  22. # Bridged networks make the machine appear as another physical device on
  23. # your network.
  24. # config.vm.network :public_network
  25. # If true, then any SSH connections made will enable agent forwarding.
  26. # Default value: false
  27. # config.ssh.forward_agent = true
  28. # Share an additional folder to the guest VM. The first argument is
  29. # the path on the host to the actual folder. The second argument is
  30. # the path on the guest to mount the folder. And the optional third
  31. # argument is a set of non-required options.
  32. # config.vm.synced_folder "../data", "/vagrant_data"
  33. # Provider-specific configuration so you can fine-tune various
  34. # backing providers for Vagrant. These expose provider-specific options.
  35. # Example for VirtualBox:
  36. #
  37. # config.vm.provider :virtualbox do |vb|
  38. # # Don't boot with headless mode
  39. # vb.gui = true
  40. #
  41. # # Use VBoxManage to customize the VM. For example to change memory:
  42. # vb.customize ["modifyvm", :id, "--memory", "1024"]
  43. # end
  44. #
  45. # View the documentation for the provider you're using for more
  46. # information on available options.
  47. # Enable provisioning with Puppet stand alone. Puppet manifests
  48. # are contained in a directory path relative to this Vagrantfile.
  49. # You will need to create the manifests directory and a manifest in
  50. # the file base.pp in the manifests_path directory.
  51. #
  52. # An example Puppet manifest to provision the message of the day:
  53. #
  54. # # group { "puppet":
  55. # # ensure => "present",
  56. # # }
  57. # #
  58. # # File { owner => 0, group => 0, mode => 0644 }
  59. # #
  60. # # file { '/etc/motd':
  61. # # content => "Welcome to your Vagrant-built virtual machine!
  62. # # Managed by Puppet.\n"
  63. # # }
  64. #
  65. # config.vm.provision :puppet do |puppet|
  66. # puppet.manifests_path = "manifests"
  67. # puppet.manifest_file = "init.pp"
  68. # end
  69. # Enable provisioning with chef solo, specifying a cookbooks path, roles
  70. # path, and data_bags path (all relative to this Vagrantfile), and adding
  71. # some recipes and/or roles.
  72. #
  73. # config.vm.provision :chef_solo do |chef|
  74. # chef.cookbooks_path = "../my-recipes/cookbooks"
  75. # chef.roles_path = "../my-recipes/roles"
  76. # chef.data_bags_path = "../my-recipes/data_bags"
  77. # chef.add_recipe "mysql"
  78. # chef.add_role "web"
  79. #
  80. # # You may also specify custom JSON attributes:
  81. # chef.json = { :mysql_password => "foo" }
  82. # end
  83. $script = %Q{
  84. sudo apt-get update
  85. sudo apt-get install nasm make build-essential grub qemu zip -y
  86. sudo apt-get install git vde2 zlibc libgmp-dev openssl libssl-dev libgee-dev libpth-dev libgcrypt11-dev autoconf cmake autogen mawk gawk
  87. sudo vde_switch -t tap0 -t tap1 -d
  88. }
  89. config.vm.provision :shell, :inline => $script
  90. # Enable provisioning with chef server, specifying the chef server URL,
  91. # and the path to the validation key (relative to this Vagrantfile).
  92. #
  93. # The Opscode Platform uses HTTPS. Substitute your organization for
  94. # ORGNAME in the URL and validation key.
  95. #
  96. # If you have your own Chef Server, use the appropriate URL, which may be
  97. # HTTP instead of HTTPS depending on your configuration. Also change the
  98. # validation key to validation.pem.
  99. #
  100. # config.vm.provision :chef_client do |chef|
  101. # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
  102. # chef.validation_key_path = "ORGNAME-validator.pem"
  103. # end
  104. #
  105. # If you're using the Opscode platform, your validator client is
  106. # ORGNAME-validator, replacing ORGNAME with your organization name.
  107. #
  108. # If you have your own Chef Server, the default validation client name is
  109. # chef-validator, unless you changed the configuration.
  110. #
  111. # chef.validation_client_name = "ORGNAME-validator"
  112. end