Sha256: 54407a0b2b94744c784cabb54cc7ea910b0475f09b54f75da1192f266712dac1

Contents?: true

Size: 1.52 KB

Versions: 8

Compression:

Stored size: 1.52 KB

Contents

require 'net/http'

iso_mirror = 'http://mirrors.kernel.org/archlinux/iso/2013.12.01'
uri = "#{iso_mirror}/md5sums.txt"
response = Net::HTTP.get_response(URI.parse(uri)).body.split
iso = response[1]
iso_md5 = response[0]

root_password = 'veewee'

Veewee::Definition.declare({
  :cpu_count   => '1',
  :memory_size => '256',
  :disk_size   => '10140',
  :disk_format => 'VDI',
  :hostiocache => 'off',
  :os_type_id  => 'ArchLinux_64',
  :iso_file    => iso,
  :iso_src     => "#{iso_mirror}/#{iso}",
  :iso_md5     => iso_md5,
  :iso_download_timeout => '1000',
  :boot_wait   => '5',
  :boot_cmd_sequence => [
    '<Enter>',
    '<Wait>' * 30,
    'echo "sshd: ALL" > /etc/hosts.allow<Enter>',
    'passwd<Enter>',
    "#{root_password}<Enter>",
    "#{root_password}<Enter>",
    'systemctl start sshd.service<Enter><Wait>',
  ],
  :ssh_login_timeout => '10000',
  :ssh_user          => 'root',
  :ssh_password      => "#{root_password}",
  :ssh_key           => '',
  :ssh_host_port     => '7222',
  :ssh_guest_port    => '22',
  :sudo_cmd          => "sh '%f'",
  :shutdown_cmd      => 'shutdown -h now',
  :postinstall_files => [
    'base.sh',
    'pacman.sh',
    'bootloader.sh',
    'ssh.sh',
    'reboot.sh',
    'sudo.sh',
    'user.sh',
    'aur.sh',
    'virtualbox.sh',
    'ruby.sh',
    'chef.sh',
    'puppet.sh',
    'vagrant.sh',
    'reboot.sh',
    'cleanup.sh',
    'zerodisk.sh',
  ],
  :postinstall_timeout => '10000',
  :params => {
    #:PACMAN_REFLECTOR_ARGS => '--verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist',
  }
})

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
veewee-0.4.5.1 templates/archlinux-x86_64/definition.rb
veewee-0.4.5 templates/archlinux-x86_64/definition.rb
veewee-0.4.5.pre1 templates/archlinux-x86_64/definition.rb
veewee-0.4.4 templates/archlinux-x86_64/definition.rb
veewee-0.4.3 templates/archlinux-x86_64/definition.rb
veewee-0.4.2 templates/archlinux-x86_64/definition.rb
veewee-0.4.1 templates/archlinux-x86_64/definition.rb
veewee-0.4.0 templates/archlinux-x86_64/definition.rb