forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a single Vagrantfile to the root of the project that can be used by all beats for development. The Windows box has been updated. In addition to having golang and python like the previous one, this box has mingw64, winpcap, SSH (for vagrant ssh), and a desktop shortcut that launches a command prompt in the beats directory.
- Loading branch information
1 parent
55b5202
commit 5a58bce
Showing
4 changed files
with
60 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
### Documentation | ||
# This is a Vagrantfile for Beats development. | ||
# | ||
# Boxes | ||
# ===== | ||
# | ||
# win2012 | ||
# ------- | ||
# This box is used as a Windows development and testing environment for Beats. | ||
# | ||
# Usage and Features: | ||
# - Two users exist: Administartor and Vagrant. Both have the password: vagrant | ||
# - Use 'vagrant ssh' to open a Windows command prompt. | ||
# - Use 'vagrant rdp' to open a Windows Remote Deskop session. Mac users must | ||
# install the Microsoft Remote Desktop Client from the App Store. | ||
# - There is a desktop shortcut labeled "Beats Shell" that opens a command prompt | ||
# to C:\Gopath\src\github.com\elastic\beats where the code is mounted. | ||
# | ||
# add more boxes here | ||
# ------------------- | ||
# More development boxes can be added to this file and you can run commands | ||
# like "vagrant up solaris" or "vargrant up winxp" to start them. | ||
|
||
# Provisioning for Windows PowerShell | ||
$winPsProvision = <<SCRIPT | ||
echo 'Creating github.com\elastic in the GOPATH' | ||
New-Item -itemtype directory -path "C:\\Gopath\\src\\github.com\\elastic" -force | ||
echo "Symlinking C:\\Vagrant to C:\\Gopath\\src\\github.com\\elastic" | ||
cmd /c mklink /d C:\\Gopath\\src\\github.com\\elastic\\beats \\\\vboxsvr\\vagrant | ||
echo "Creating Beats Shell desktop shortcut" | ||
$WshShell = New-Object -comObject WScript.Shell | ||
$Shortcut = $WshShell.CreateShortcut("$Home\\Desktop\\Beats Shell.lnk") | ||
$Shortcut.TargetPath = "cmd.exe" | ||
$Shortcut.Arguments = "/K cd /d C:\\Gopath\\src\\github.com\\elastic\\beats" | ||
$Shortcut.Save() | ||
SCRIPT | ||
|
||
Vagrant.configure(2) do |config| | ||
|
||
config.vm.define "win2012", primary: true do |win2012| | ||
# Windows Server 2012 R2 | ||
win2012.vm.box = "https://s3.amazonaws.com/beats-files/vagrant/beats-win2012-r2-virtualbox.box" | ||
win2012.vm.guest = :windows | ||
|
||
# Communicator for windows boxes | ||
win2012.vm.communicator = "winrm" | ||
|
||
# Port forward WinRM and RDP | ||
win2012.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true | ||
win2012.vm.network :forwarded_port, guest: 3389, host: 33389, id: "rdp", auto_correct: true | ||
win2012.vm.network :forwarded_port, guest: 5985, host: 55985, id: "winrm", auto_correct: true | ||
|
||
win2012.vm.provision "shell", inline: $winPsProvision | ||
end | ||
|
||
end | ||
|
||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.