Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Integration Testing Framework] Switch to using Terraform as provisioner #4879

Open
3 tasks
ycombinator opened this issue Jun 6, 2024 · 2 comments
Open
3 tasks
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Testing

Comments

@ycombinator
Copy link
Contributor

Based on the success of @pchila's POC, we've decided to switch to using Terraform as the provisioner for VMs and ESS deployments used by the integration testing framework.

Definition of done

  • The integration testing framework provisions Linux VMs using Terraform instead of OGC
  • The integration testing framework provisions Windows VMs using Terraform instead of OGC
  • The integration testing framework provisions ESS deployments using Terraform instead of directly calling the ESS API
@ycombinator ycombinator added enhancement New feature or request Testing Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Jun 6, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@rdner
Copy link
Member

rdner commented Jun 12, 2024

I suppose the most challenging part will be converting our instance definitions to Terraform ones and feeding them to the tool like we do for OGC

func osBatchToOGC(cacheDir string, batch runner.OSBatch) Layout {
tags := []string{
LayoutIntegrationTag,
batch.OS.Type,
batch.OS.Arch,
}
if batch.OS.Type == define.Linux {
tags = append(tags, strings.ToLower(fmt.Sprintf("%s-%s", batch.OS.Distro, strings.Replace(batch.OS.Version, ".", "-", -1))))
} else {
tags = append(tags, strings.ToLower(fmt.Sprintf("%s-%s", batch.OS.Type, strings.Replace(batch.OS.Version, ".", "-", -1))))
}
los, _ := findOSLayout(batch.OS.OS)
return Layout{
Name: batch.ID,
Provider: los.Provider,
InstanceSize: los.InstanceSize,
RunsOn: los.RunsOn,
RemotePath: los.RemotePath,
Scale: 1,
Username: los.Username,
SSHPrivateKey: cacheDir + "/id_rsa",
SSHPublicKey: cacheDir + "/id_rsa.pub",
Ports: []string{"22:22"},
Tags: tags,
Labels: map[string]string{
"division": "engineering",
"org": "platform",
"team": "ingest",
"project": "elastic-agent",
},
Scripts: "path", // not used; but required by OGC
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Testing
Projects
None yet
Development

No branches or pull requests

3 participants