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

Onboarding MDE for Linux to LISA #3113

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Azure Runbook with test case support
  • Loading branch information
Zeeshan Akhter committed Dec 9, 2023
commit 0a001c4a15c958d26a6125b7455dab2a39aed6f0
22 changes: 20 additions & 2 deletions lisa/sut_orchestrator/azure/tools.py
Original file line number Diff line number Diff line change
@@ -580,13 +580,31 @@ def can_install(self) -> bool:
def _install(self) -> bool:
self._log.info(f"Inside the func: [{sys._getframe().f_code.co_name}]")
posix_os: Posix = cast(Posix, self.node.os)
posix_os.add_azure_core_repo()
cur_repo = posix_os.get_repositories();
self._log.info(f"{cur_repo}")

#posix_os.add_azure_core_repo(code_name="bionic")
arch_name = "arm64,armhf,amd64"
repo_url = "https://packages.microsoft.com/ubuntu/18.04/prod"
code_name = "insiders-fast"
posix_os.add_repository(
repo=(f"deb [arch={arch_name}] {repo_url} {code_name} main"),
keys_location=[
"https://packages.microsoft.com/keys/microsoft.asc",
"https://packages.microsoft.com/keys/msopentech.asc",
],
)


cur_repo = posix_os.get_repositories();
self._log.info(f"{cur_repo}")

if posix_os.is_package_in_repo(self.command):
posix_os.install_packages(self.command)
self._log.info(f"{self.command} is installed successfully")
else:
raise UnsupportedDistroException(
node.os, f"The distro doesn't have {package} in its repo")
self.node.os, f"The distro doesn't have {self.command} in its repo")
return self._check_exists()

def get_result(
57 changes: 57 additions & 0 deletions microsoft/runbook/my.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: azure default
Copy link
Author

Choose a reason for hiding this comment

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

This is just for testing purpose. Will remove it once incorporate all the review comments

include:
- path: ./debug.yml
variable:
- name: origin
value: tiers/tier.yml
- name: case
value: verify_cpu_count
- name: location
value: "westus3"
- name: keep_environment
value: "no"
- name: resource_group_name
value: ""
- name: marketplace_image
value: ""
- name: vhd
value: ""
- name: vm_size
value: ""
- name: deploy
value: true
- name: wait_delete
value: false
- name: concurrency
value: 5
- name: admin_private_key_file
value: ""
is_secret: true
- name: admin_password
value: ""
is_secret: true
- name: case
value: verify_cpu_count
concurrency: $(concurrency)
notifier:
- type: html
- type: env_stats
platform:
- type: azure
admin_private_key_file: $(admin_private_key_file)
admin_password: $(admin_password)
keep_environment: $(keep_environment)
azure:
resource_group_name: $(resource_group_name)
deploy: $(deploy)
subscription_id: $(subscription_id)
wait_delete: $(wait_delete)
requirement:
core_count:
min: 2
azure:
marketplace: $(marketplace_image)
vhd: $(vhd)
location: $(location)
vm_size: $(vm_size)