Giter Site home page Giter Site logo

chenfang3 / ansible-vsphere-gos-validation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware/ansible-vsphere-gos-validation

0.0 0.0 0.0 9.26 MB

Guest OS validation test set for vSphere using Ansible

License: Other

Shell 12.84% Python 71.50% PowerShell 4.17% Batchfile 1.14% Dockerfile 2.26% Jinja 8.09%

ansible-vsphere-gos-validation's Introduction

Guest OS Validation 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
$ pip install -r requirements.txt
  1. Install required Ansible collections in requirements.yml
$ ansible-galaxy install -r requirements.yml
  1. To test VMware Photon OS, Debian, and Ubuntu with ISO installation, it is also required to install xorriso package on your control machine.
  2. 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"
  1. New folder for log files and files collected in test cases are created for current test run, e.g., "logs/test-vm/2021-07-06-09-27-51/", find test case results in "results.log", failed tasks in "failed_tasks.log", testing debug log in "full_debug.log".

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 file and known issues
  • 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
  • changelogs: Folder for changelog of each release

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 vm_python variable in vars/test.yml must be set with correct python path. Or user can set PATH in /etc/environment in guest OS to include the binary directory path to python.
    • 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, 9.0 ✔️ ✔️
CentOS 7.x, 8.x ✔️ ✔️
Oracle Linux 7.x, 8.x ✔️ ✔️
Rocky Linux 8.x ✔️ ✔️
AlmaLinux 8.x ✔️ ✔️
SUSE Linux Enterprise 15 SP3 and later ✔️ ✔️
SUSE Linux Enterprise 12 SP5, 15 SP0/SP1/SP2 ✔️
Photon OS 3.x ✔️ ✔️ ✔️
Photon OS 4.x ✔️ ✔️ ✔️
Ubuntu 18.04 and later live-server ✔️ ✔️
Ubuntu 20.04 and later cloud image ✔️ ✔️
Ubuntu 18.04 and later desktop ✔️
Flatcar 2592.0.0 and later ✔️ ✔️
Debian 11.x ✔️ ✔️
Debian 10.10 and later ✔️ ✔️
Debian 9, 10.9 and earlier ✔️
Windows 10, 11 ✔️ ✔️
Windows Server 2019, 2022 ✔️ ✔️
Windows Server SAC releases ✔️ ✔️

Note: This supported guest OS list is used for this project only. For guest OS support status on ESXi, please refer to VMware Compatibility Guide.

Docker images

  • Latest (Release v2.0):
    • projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
  • Release v2.0:
    • projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:v2.0

Launch testing using Docker image

  1. Execute below commands in your machine
$ docker pull projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
$ docker run -it --privileged projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
  1. Launch testing in the started container following the steps in this section Steps to Launch Testing

ansible-vsphere-gos-validation's People

Contributors

tomorrow9 avatar keirazhang avatar zouyuhua avatar dentist128 avatar bl33d avatar dianew9 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.