Skip to main content

Molecule VMware Plugin :: run molecule tests on VMware

Project description

Molecule VMware Plugin

molecule-vmware-ci

Molecule VMware is designed to allow use of VMware vSphere environment for provisioning test resources.
Please note that this driver is currently in its early stage of development.

Installation and Usage

Install molecule-vmware and pre-requisites:

pip install molecule-vmware ansible pyvmomi

Please also install pywinrm if you want to use Windows in test instance.

pip install pywinrm

Create a new role with molecule using the vmware driver:

molecule init role <role_name> -d vmware

Configure <role_name>/molecule/default/molecule.yml with required parameters based on your vSphere environment.
A simple config is:

dependency:
  name: galaxy
driver:
  name: vmware
  vcenter_hostname: vcsa.local
  vcenter_username: administrator@vsphere.local
  vcenter_password: secret
  validate_certs: false
  datacenter: dc
  #esxi_hostname: change me to esxi hostname of deploying an instance. need it if not cluster specified
  cluster: cluster01
  folder: /vm/example
  vm_username: root
  vm_password: secret
  instance_os_type: linux # is possible only specify [linux or windows]
  # The below are possible parameters to be specified if using the windows template.
  #winrm_port: 5986 # is WinRM port
  #connection: winrm # is the connection type
  #winrm_transport: ntlm # is the authentication type
  #winrm_server_cert_validation: ignore # is the server certificate validation mode
  # The below list is possible to define DNS nameservers
  #dns_servers:
  #  - "8.8.8.8"
  #  - "8.8.4.4"
platforms:
  - name: instance1
    template: CentOS7
    hardware:
      num_cpus: 2
      memory_mb: 2048
    networks:
      - name: VM Network
        type: dhcp
  - name: instance2
    template: CentOS8
    snapshot_src: linked_clone # is a snapshot name to be possible specified if you want to use linked clone.
    resource_pool: rpool # is a resource pool to be possible specified
    hardware:
      num_cpus: 2
      memory_mb: 2048
    networks:
      - name: VM Network
        ip: 100.64.0.2
        netmask: 255.255.255.0
        gateway: 100.64.0.1
    # The below are possible parameters to be specified if using the windows template.
    #customization:
    #  fullname: molecule # is the server owner name
    #  orgname: molecule # is the organization name
provisioner:
  name: ansible
verifier:
  name: ansible

Template requirements

A template requires vmware tools because it is done Sysprep or Linuxprep to initialize OS.
When Linux, please also install Perl to the template.

License

The MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

molecule-vmware-0.3.6.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

molecule_vmware-0.3.6-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file molecule-vmware-0.3.6.tar.gz.

File metadata

  • Download URL: molecule-vmware-0.3.6.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.8

File hashes

Hashes for molecule-vmware-0.3.6.tar.gz
Algorithm Hash digest
SHA256 c8f9e8a80068a0856d076d750e441ae3b5153cf28847b1f807aa508aefea7318
MD5 d292d99ba14482fb66b028c3af2c4e34
BLAKE2b-256 4faea992bf7cd94a7b1b96a1408732ca124b634270fcb8518fc5f1541ea093fa

See more details on using hashes here.

File details

Details for the file molecule_vmware-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: molecule_vmware-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.8

File hashes

Hashes for molecule_vmware-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ba0e549a38f6d7b163ce71c5a49b880427184f4169e7a6cbb6e8eac62bb0e8c6
MD5 84eaf6d90481987ab982571ce1856e6e
BLAKE2b-256 45d6d35a22e233fee5a0a6817fbf9392393ac2f65b7a4ee23f6623e2f09e2838

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page