forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update devenv script * Cleanup devenv script Remove things not needed to build an agent binary * Fix environment on devenv - When appending to PATH, fetch previous value from the registry, instead of using $Env:PATH. This prevents the script from clobbering paths that were added by chocolatey install. - Add rtloader\bin directory to the path, so that agent.exe can find our rtloader.dll. - Add gopath\bin to the path, so we can run tools installed by go get. * Add gcloud devenv image builder
- Loading branch information
Showing
2 changed files
with
65 additions
and
32 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,45 @@ | ||
# Packer script to build devenv image on GCP. | ||
# | ||
# Usage: | ||
# packer init gcloud.pkr.hcl | ||
# packer build gcloud.pkr.hcl | ||
|
||
packer { | ||
required_plugins { | ||
googlecompute = { | ||
version = ">= 0.0.1" | ||
source = "github.com/hashicorp/googlecompute" | ||
} | ||
} | ||
} | ||
|
||
source "googlecompute" "datadog-agent-windows-dev" { | ||
project_id = | ||
network = | ||
subnetwork = | ||
|
||
source_image_family = "windows-2019" | ||
zone = "europe-west1-b" | ||
disk_size = 50 | ||
machine_type = "e2-standard-4" | ||
communicator = "winrm" | ||
winrm_username = "packer_user" | ||
winrm_insecure = true | ||
winrm_use_ssl = true | ||
image_name = "agent-windows-dev-{{timestamp}}" | ||
image_family = "agent-windows-dev" | ||
metadata = { | ||
windows-startup-script-cmd = "winrm quickconfig -quiet & net user /add packer_user & net localgroup administrators packer_user /add & winrm set winrm/config/service/auth @{Basic=\"true\"}" | ||
} | ||
} | ||
|
||
build { | ||
sources = ["sources.googlecompute.datadog-agent-windows-dev"] | ||
provisioner "powershell" { | ||
scripts = [ | ||
"scripts/Install-DevEnv.ps1", | ||
"scripts/Disable-WinRM.ps1" | ||
] | ||
} | ||
} | ||
|
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