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

Add two tasks to create and destroy VM stacks in Azure #958

Merged
merged 16 commits into from
Jul 19, 2024

Conversation

FlorentClarret
Copy link
Member

@FlorentClarret FlorentClarret commented Jul 18, 2024

What does this PR do?

  • Add two new tasks az.create-vm and az.destroy-vm to create VMs with the Agent in Azure. They are currently very basic and do not have all the parameters the AWS counterpart has but we'll add them in future PRs to keep this PR readable.
  • This is limited to Linux for now
  • Update the setup task to include the new parameter for Azure. We have also a key parameter for AWS thsat could be merged in a follow-up PR
  • Deprecate the create-vm and destroy-vm tasks in favour of aws.create-vm and aws.destroy-vm. The old commands still work. they print a deprecation message and redirect to the new version
  • Add an integration test for Azure with all the requirements to run it from the CI
  • We currently use the deploy function as is, where we have a lot of AWS specific stuff. I did not want to refactor too much and I'll open a PR in the future to move them to the AWS-specific command

To make it work, we need to have an ssh key to use for this instance. For instance:

  azure:
    publicKeyPath: /Users/florent.clarret/.ssh/id_rsa_azure.pub

I'll add documentation about this once this will be a bit more stable and usable for everyone. This parameter is not required unless you're trying to deploy a VM on Azure

Which scenarios this will impact?

Everyone who uses the create-vm or destroy-vm and people who want to deploy a VM in Azure.

Motivation

The Azure sandbox is out!

Additional Notes

Co-authored with @KevinFairise2

https://datadoghq.atlassian.net/browse/ADXT-487

@FlorentClarret FlorentClarret changed the title kfairise/wip azure Add two tasks to create and destroy VM stacks in Azure Jul 18, 2024
@FlorentClarret FlorentClarret marked this pull request as ready for review July 18, 2024 13:06
@FlorentClarret FlorentClarret requested a review from a team as a code owner July 18, 2024 13:06
Copy link
Contributor

@pducolin pducolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add it to integration tests too?

scenarios/azure/compute/vm.go Outdated Show resolved Hide resolved
tasks/az.py Outdated Show resolved Hide resolved
tasks/az.py Outdated Show resolved Hide resolved
tasks/az.py Outdated Show resolved Hide resolved
tasks/aws.py Outdated Show resolved Hide resolved
tasks/aws.py Outdated Show resolved Hide resolved
Co-authored-by: pducolin <45568537+pducolin@users.noreply.github.com>
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jul 18, 2024

Library Vulnerabilities

Critical badge  Medium badge

README.md Outdated Show resolved Hide resolved
@FlorentClarret
Copy link
Member Author

I commented the section to run integrations tests on Azure. We need https://github.com/DataDog/cloud-inventory/pull/20422 for this, it's currently broken and cloudops is having a look. I'll open a follow-up PR to address that.

Merging this one so we can move on with the refactoring of the tasks

@FlorentClarret
Copy link
Member Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jul 19, 2024

🚂 MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

@dd-devflow
Copy link

dd-devflow bot commented Jul 19, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 22m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit c672ca9 into main Jul 19, 2024
9 checks passed
@dd-mergequeue dd-mergequeue bot deleted the kfairise/wip-azure branch July 19, 2024 14:00
zhuminyi pushed a commit that referenced this pull request Jul 26, 2024
Co-authored-by: KevinFairise2 <kevin.fairise@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants