Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Test with differenct environment (VM, AMI)

Amos Kong edited this page Apr 26, 2017 · 1 revision

Virtual machine created by Libvirt

Description

The Virtual machines should be prepared firstly, Avocado will directly use them.

Cmdline example

sudo avocado --show all run scylla-artifacts.py --vm-domain centos7 --vm-cleanup --vm-username root --vm-hostname 192.168.122.xx --vm-password xxxxxx --xunit "$WORKSPACE/results.xml" --job-results-dir "$WORKSPACE" --multiplex scylla-artifacts.yaml

Virual machine related parameters:
--vm-domain centos7
--vm-cleanup
--vm-username root
--vm-hostname 192.168.122.xx
--vm-password 

Added second disk to virtual machine

The second disk is used for raid setup, 15G.

RHEL, virtual guide: 21.26. ADDING MULTIFUNCTION PCI DEVICES TO KVM GUEST VIRTUAL MACHINES

1. create a disk file (qcow2 format, same as first disk)

# cd /var/lib/libvirt/images/
# sudo qemu-img create -f qcow2 ubuntu16.04.disk2.qcow2 15G

2. revert domain to snapshot backup, and start it

# /jenkins/scylla-artifact-tests/libvirt-check.sh ubuntu16

3. edit the domain xml (add new disk)

# sudo edit ubuntu16

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/ubuntu16.04.disk2.qcow2'/>
      <target dev='vdb' bus='virtio'/>
    </disk>

4. restart vm check the second disk is identified

# fdisk -l

5. shutdown vm, recreate the internal snapshot

AMI instance

Description

AMI Instances will be created when test starts, Avocado uses avocado-ec2 project

AWS auth should be prepared.

$ ls ~/.aws
config          credentials

Cmdline example

avocado run scylla-artifacts.py --ec2-ami-id $scylla_ami_id --ec2-ami-distro-type el --ec2-login-timeout 300 --ec2-ami-username centos --ec2-security-group-ids sg-c5e1f7a0 --ec2-subnet-id subnet-ec4a72c4 --ec2-instance-type $ec2_instance_type --xunit "$WORKSPACE/$ec2_instance_type.results.xml" --job-results-dir "$WORKSPACE" --multiplex scylla-artifacts.yaml

EC2 related parameters:
--ec2-ami-id $scylla_ami_id
--ec2-ami-distro-type el --ec2-login-timeout 300
--ec2-ami-username centos
--ec2-security-group-ids sg-c5e1f7a0
--ec2-subnet-id subnet-ec4a72c4
--ec2-instance-type $ec2_instance_type