<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/cloud_tests/setup_image.py, branch rolling</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-09-29T23:32:53+00:00</updated>
<entry>
<title>testing: remove cloud_tests (#1020)</title>
<updated>2021-09-29T23:32:53+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-09-29T23:32:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=ba083245537abd5bf5942fbe851e21eb8f245000'/>
<id>urn:sha1:ba083245537abd5bf5942fbe851e21eb8f245000</id>
<content type='text'>
Cloud tests have been replaced with integration tests</content>
</entry>
<entry>
<title>azurecloud: fix issues with instances not starting (#205)</title>
<updated>2020-02-13T20:11:17+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2020-02-13T20:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=ecffd25df840277ab1fa7d5372659abe833cacbe'/>
<id>urn:sha1:ecffd25df840277ab1fa7d5372659abe833cacbe</id>
<content type='text'>
The azurecloud platform did not always start instances
during collect runs.  This was a result of two issues. First
the image class _instance method did not invoke the start()
method which then allowed collect stage to attempt to run
scripts without an endpoint.  Second, azurecloud used the
image_id as both an instance handle (which is typically
vmName in azure api) as well as an image handle (for image
capture).  Resolve this by adding a .vm_name property to
the AzureCloudInstance and reference this property in
AzureCloudImage.

Also in this branch

- Fix error encoding user-data when value is None
- Add additional logging in AzureCloud platform
- Update logging format to print pathname,funcName and line number
  This greatly eases debugging.

LP: #1861921</content>
</entry>
<entry>
<title>cloud_tests: updates and fixes</title>
<updated>2019-07-18T19:53:50+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2019-07-18T19:53:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a02c0c9aa24a16f1983a81fe5dbfadac3d7e0ad3'/>
<id>urn:sha1:a02c0c9aa24a16f1983a81fe5dbfadac3d7e0ad3</id>
<content type='text'>
- Update paramiko and cryptography module versions (2.4.2) to
  address issues with algo and deprecation warnings.
- Modify ssh keypair generation to work with updated paramiko
- tools/xkvm sync with newer version from curtin
- Update NoCloudKvm instance.py to work with updated xkvm
  - pass -name to instance, useful for debugging on shared host
  - Add cache_mode platform config; default to cache=none,aio=native
- Switch to yaml.safe_load() in platforms.py
</content>
</entry>
<entry>
<title>tests: Collect build_info from system if available.</title>
<updated>2018-07-23T17:29:30+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-07-23T17:29:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6a9e576a204c36ba29e05da2bb265d1d6ed12b22'/>
<id>urn:sha1:6a9e576a204c36ba29e05da2bb265d1d6ed12b22</id>
<content type='text'>
This adds a script to always get the /etc/cloud/build.info file
if it exists, and a hook when preparing the image to log the information
if it is available.

INFO - setting up ubuntu-cosmic (build_name=server serial=20180718)

This is just useful for debug and reproduce.
</content>
</entry>
<entry>
<title>pylint: pay attention to unused variable warnings.</title>
<updated>2018-04-20T03:30:08+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-04-20T03:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1081962eacf2814fea6f4fa3255c530de14e4a24'/>
<id>urn:sha1:1081962eacf2814fea6f4fa3255c530de14e4a24</id>
<content type='text'>
This enables warnings produced by pylint for unused variables (W0612),
and fixes the existing errors.
</content>
</entry>
<entry>
<title>tests: Enable AWS EC2 Integration Testing</title>
<updated>2018-01-06T01:30:33+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2017-12-07T20:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=34595e9b4abacc10ac599aad97c95861af34ea54'/>
<id>urn:sha1:34595e9b4abacc10ac599aad97c95861af34ea54</id>
<content type='text'>
This enables integration tests to utilize AWS EC2 as a testing platform by
utilizing the boto3 Python library.

Usage will create and delete a custom VPC for every run. All resources
will be tagged with the ec2 tag, 'cii', and the date (e.g.
cii-20171220-102452).  The VPC is setup with both IPv4 and IPv6
capabilities, but will only hand out IPv4 addresses by default. Instances
will have complete Internet access and have full ingress and egress access
(i.e. no firewall).

SSH keys are generated with each run of the integration tests with the key
getting uploaded to AWS at the start of tests and deleted on exit.  To
enable creation when the platform is setup the SSH generation code is
moved to be completed by the platform setup and not during image setup.
The nocloud-kvm platform was updated with this change.

Creating a custom image will utilize the same clean script,
boot_clean_script, that the LXD platform uses as well. The custom AMI is
generated, used, and de-registered after a test run.

The default instance type is set to t2.micro. This is one of the smallest
instance types and is free tier eligible.

The default timeout for ec2 was increased to 300 from 120 as many tests
hit up against the 2 minute timeout and depending on region load can
go over.

Documentation for the AWS platform was added with the expected
configuration files for the platform to be used. There are some
additional whitespace changes included as well.

pylint exception was added for paramiko and simplestreams. In the past
these were not already flagged due to no __init__.py in the subdirectories
of files that used these. boto3 was added to the list of dependencies in
the tox ci-test runner.

In order to grab console logs on EC2 the harness will now shut down an
instance before terminating and before collecting the console log.  This
is to address a behavior of EC2 where the console log is refreshed very
infrequently, but one point when it is refreshed is after shutdown.
</content>
</entry>
<entry>
<title>tests: Use apt-get to install a deb so that depends get resolved.</title>
<updated>2017-11-21T20:46:12+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2017-11-21T19:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=9ac735bb8c0dec5628a33d907adb3fc02fd902e8'/>
<id>urn:sha1:9ac735bb8c0dec5628a33d907adb3fc02fd902e8</id>
<content type='text'>
Instead of using 'dpkg -i' to install a package and then running
apt-get -f install, to hope that it would install needed dependencies
we can just use 'apt-get' directly to do the install.

The 'dpkg/apt-get -f' path was a problem if the installed deb was
older than the available deb. In that case it would get replaced.
</content>
</entry>
<entry>
<title>tests: Enable the NoCloud KVM platform</title>
<updated>2017-09-14T18:53:55+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2017-07-11T21:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=376168e251a1d4f2ee3643fed6092b8907f057ec'/>
<id>urn:sha1:376168e251a1d4f2ee3643fed6092b8907f057ec</id>
<content type='text'>
The NoCloud KVM platform includes:

  * Downloads daily Ubuntu images using streams and store in
    /srv/images
  * Image customization, if required, is done using
    mount-image-callback otherwise image is untouched
  * Launches KVM via the xkvm script, a wrapper around
    qemu-system, and sets custom port for SSH
  * Generation and inject an SSH (RSA 4096) key pair to use for
    communication with the guest to collect test artifacts
  * Add method to produce safe shell strings by base64 encoding
    the command

Additional Changes:

  * Set default backend to use LXD
  * Verify not running script as root in order to prevent images
    from becoming owned by root
  * Removed extra quotes around that were added when collecting
    the cloud-init version from the image
  * Added info about each release as previously the lxd backend
    was able to query that information from pylxd image info,
    however, other backends will not be able to obtain the same
    information as easily
</content>
</entry>
<entry>
<title>tests: execute: support command as string</title>
<updated>2017-09-14T01:16:43+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2017-09-11T17:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1ac4bc2a4758d330bb94cd1b2391121cf461ff6a'/>
<id>urn:sha1:1ac4bc2a4758d330bb94cd1b2391121cf461ff6a</id>
<content type='text'>
If a string is passed to execute, then invoke 'bash', '-c',
'string'. That allows the less verbose execution of simple
commands:
  image.execute("ls /run")
compared to the more explicit but longer winded:
  image.execute(["ls", "/run"])

If 'env' was ever modified in execute or a method that it called,
then the next invocation's default value would be changed. Instead
use None and then set to a new empty dict in the method.
</content>
</entry>
<entry>
<title>Integration Testing: tox env, pyxld 2.2.3, and revamp framework</title>
<updated>2017-06-08T22:24:17+00:00</updated>
<author>
<name>Wesley Wiedenmeier</name>
<email>wesley.wiedenmeier@gmail.com</email>
</author>
<published>2017-06-08T22:23:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=76d58265e34851b78e952a7f275340863c90a9f5'/>
<id>urn:sha1:76d58265e34851b78e952a7f275340863c90a9f5</id>
<content type='text'>
Massive update to clean up and greatly enhance the integration testing
framework developed by Wesley Wiedenmeier.

 - Updated tox environment to run integration test 'citest' to utilize
   pylxd 2.2.3
 - Add support for distro feature flags
   - add framework for feature flags to release config with feature groups
     and overrides allowed in any release conf override level
   - add support for feature flags in platform and config handling
   - during collect, skip testcases that require features not supported by
     the image with a warning message
 - Enable additional distros (i.e. centos, debian)
 - Add 'bddeb' command to build a deb from the current working tree
   cleanly in a container, so deps do not have to be installed on host
 - Adds a command line option '--preserve-data' that ensures that
   collected data will be left after tests run. This also allows the
   directory to store collected data in during the run command to be
   specified using '--data-dir'.
 - Updated Read the Docs testing page and doc strings for pep 257
   compliance
</content>
</entry>
</feed>
