/vmware_tasks

Primary LanguagePowerShellMIT LicenseMIT

vmware_tasks

This module contains tasks for a PoC showing Relay+PE capabilities in managing VMWare-backed infrastructure.

PoC setup

  1. Install PE 2021.5 on an on-prem VM with network access to a VCenter cluster

  2. Install newest Powershell

    curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
    yum install -y powershell
  3. Install PowerCLI

    pwsh
    Install-Module VMware.PowerCLI
  4. Set the HOME environment variable for the pxp-agent service. Otherwize, pxp-agent running a powershell task won't be able to find and import available modules:

    echo "HOME=/root" >> /etc/sysconfig/pxp-agent
    systemctl restart pxp-agent
  5. Install this module. If you don't use Code Manager, make sure to install it into /opt/puppetlabs/puppet/modules so PE will see the plans inside it.

  6. Check that you can see the tasks inside the module

    puppet task show|grep vmware

You should see the tasks in this module listed.

  1. Check that you can see the plans inside the module

    puppet plan show|grep vmware

You should see the plans in this module listed.

  1. Run a test task

    puppet task run vmware_tasks::test -n <primary_certname>
  2. Install the modified puppetlabs-lvm module in /opt/puppetlabs/puppet/modules so PE will see the plans inside it even if CodeManager is not used:

    git clone https://github.com/timidri/puppetlabs-lvm.git lvm
    cd lvm
    git checkout fix-logical-volumes-fact
    puppet agent -t
  3. Run puppet agent -t to install lvm module's types and providers

  4. Check whether you can see the module's plan and facts:

    puppet plan show|grep lvm
    facter -p logical_volumes
  5. Install the puppetlabs-relay module and use it to install and configure the relay agent.

  6. Create a Relay workflow running a task inside vmware_tasks