The argus.recipes.cloud.base Module

Base recipe for preparing instances for cloudbaseinit testing.

class argus.recipes.cloud.base.BaseCloudbaseinitRecipe(backend)

Base recipe for testing an instance with Cloudbaseinit.

The method prepare() does all the necessary work for preparing a new instance. The executed steps are:

  • wait for boot completion.
  • get an install script for CloudbaseInit
  • installs CloudbaseInit
  • waits for the finalization of the installation.
execution_prologue()

Executed before any downloaded script.

Do extra things to assure a successful remote powershell (and others) script execution.

get_installation_script()

Get the installation script for cloudbaseinit.

inject_cbinit_config()

Inject the conf in the instance.

install_cbinit()

Install the cloudbaseinit code.

pre_sysprep()

Run finalization code before sysprepping.

prepare(service_type=None, **kwargs)

Prepare the underlying instance.

The following operations will be executed:

  • wait for boot completion
  • get an installation script for CloudbaseInit
  • install CloudbaseInit by running the previously downloaded file.
  • wait until the instance is up and running.
prepare_cbinit_config(service_type)

Prepare the config objects.

Prepare self._cbinit_config and `self._cbinit_unattend_conf ` objects.

replace_code()

Do whatever is necessary to replace the code for cloudbaseinit.

replace_install()

Do whatever is necessary to replace the installation.

set_mtu(interface=None, subinterface_name=None, mtu_value=None, store_type=None)

Sets the MTU value for the underlying instance.

Sets the MTU value in order to avoid packet loss. More details about the parameters can be found below: https://technet.microsoft.com/en-us/library/cc731521(v=ws.10).aspx

sysprep()

Do the final steps after installing cloudbaseinit.

This requires running sysprep on Windows, but on other platforms there might be no need for calling it.

wait_cbinit_finalization()

Wait for the finalization of cloudbaseinit.

wait_for_boot_completion()

Wait for the instance to finish up booting.