/ansible-vsphere-gos-validation

Guest OS validation test set for vSphere using Ansible

Primary LanguagePythonOtherNOASSERTION

Project for Guest OS Validation test on vSphere using Ansible

Getting Started

Prerequisites

  1. Install Ansible on your control machine, please refer to Installing Ansible
  2. Install required Python libraries in requirements.txt
  3. Install required Ansible collections in requirements.yml
  4. Log in to local control machine as root or a user in sudoers

Steps to Launch Testing

  1. Git clone project from github to your workspace on control machine,
  2. Set the parameters required for testing in this file: vars/test.yml,
  3. Modify the test cases in test case list file in below default path,
    • For Linux testing: linux/gosv_testcase_list.yml
    • For Windows testing: windows/gosv_testcase_list.yml
  4. Launch testing using below commands from the same path of "main.yml",
  # For Linux testing:
  # you can use below command to use the default variables file "vars/test.yml",
  # default test case list file "linux/gosv_testcase_list.yml"
  ansible-playbook main.yml

  # For Linux or Windows testing:
  # you can use below command to set the path of a customized variables file and
  # test case list file
  ansible-playbook main.yml -e "testing_vars_file=/path_to/test.yml testing_testcase_file=/path_to/gosv_testcase_list.yml"

Catalog

  • main.yml: Main playbook for Guest OS validation test
  • ansible.cfg: User customized Ansible configuration file
  • autoinstall: Folder for guest OS unattend install configuration files
  • common: Folder for common tasks called in test cases
  • docs: Folder for guide files
  • env_setup: Folder for playbooks or tasks which to prepare or cleanup testing environment
  • linux: Folder for playbooks to test Linux guest OS
  • Windows: Folder for playbooks to test Windows guest OS
  • plugin: Folder for plugin scripts
  • tools: Folder for 3rd-party tools used in test cases
  • vars: Folder for variable files used in testing
  • logs: Folder generated by default for files collected and logs generated in test run

Supported Testing Scenarios

This project supports below scenarios for end-to-end guest OS validation testing

  • Deploy VM and install guest OS from ISO image
  • Deploy VM from an OVA template
  • Existing VM with installed guest OS, which should satisfy below requirments.
    • SSH and Python are installed and enabled
    • The root user should be enabled and permitted to log in through SSH in Linux guest OS
    • Execute ConfigureRemotingForAnsible.ps1 script in Windows guest OS in advance

Supported Guest OS

Guest OS types/versions Automatic install from ISO image Deploy from ova template Existing VM and installed guest OS
Red Hat Enterprise Linux 7.x, 8.x ✔️ ✔️
CentOS 7.x, 8.x ✔️ ✔️
Oracle Linux 7.x, 8.x ✔️ ✔️
SUSE Linux Enterprise 15 SP2 ✔️ ✔️
SUSE Linux Enterprise 12 SP5, 15 SP0/SP1 ✔️
Photon OS 3.x ✔️ ✔️ ✔️
Photon OS 4.0 ✔️ ✔️
Ubuntu 18.04, 18.10, 20.04, 20.10 live-server ✔️ ✔️
Ubuntu 20.04, 20.10 cloud image ✔️ ✔️
Ubuntu 18.04, 18.10, 20.04, 20.10 desktop ✔️
Flatcar 2592.0.0 and later ✔️ ✔️
Debian 9.x, 10.x ✔️
Windows 10 ✔️ ✔️
Windows Server 2019 ✔️ ✔️