• Home
  • Raw
  • Download

Lines Matching +full:use +full:- +full:fedora

2 # SPDX-License-Identifier: MIT
3 set -ev
5 TEST_RUNNER="scripts/ci/fedora-test-runner.sh"
8 # Variables for controlling the Fedora Image version and download URLs.
10 if [ -z "$FEDORA_MAJOR" ] || [ -z "$FEDORA_MINOR" ]; then
15 BASE_URL="https://download.fedoraproject.org/pub/fedora/linux/releases"
16 IMAGE_BASE_NAME="Fedora-Cloud-Base-$FEDORA_MAJOR-$FEDORA_MINOR.x86_64"
18 …CK_URL="$BASE_URL/$FEDORA_MAJOR/Cloud/x86_64/images/Fedora-Cloud-$FEDORA_MAJOR-$FEDORA_MINOR-x86_6…
19 GPG_URL="https://getfedora.org/static/fedora.gpg"
23 # https://docs.travis-ci.com/user/reference/overview/
29 sudo apt-get update
30 sudo apt-get install qemu-kvm libvirt-bin virtinst bridge-utils cpu-checker libguestfs-tools
32 sudo usermod -a -G kvm,libvirt,libvirt-qemu "$USER"
35 kvm-ok
41 ssh-keygen -N "" -f "$HOME/.ssh/id_rsa"
44 # Get the Fedora Cloud Image, It is a base image that small and ready to go, extract it and modify …
45 # - https://alt.fedoraproject.org/en/verify.html
50 curl "$GPG_URL" | gpg --import
52 gpg --verify-files ./*-CHECKSUM
53 sha256sum --ignore-missing -c ./*-CHECKSUM
56 unxz -T0 "$IMAGE_BASE_NAME.raw.xz"
63 # - Enable a login, we just use root
64 # - Enable passwordless login
65 # - Force a relabel to fix labels on ssh keys
67 sudo virt-sysprep -a "$IMAGE_BASE_NAME.raw" \
68 --root-password password:123456 \
69 --hostname fedoravm \
70 --append-line '/etc/ssh/sshd_config:PermitRootLogin yes' \
71 --append-line '/etc/ssh/sshd_config:PubkeyAuthentication yes' \
72 --mkdir /root/.ssh \
73 --upload "$HOME/.ssh/id_rsa.pub:/root/.ssh/authorized_keys" \
74 --chmod '0600:/root/.ssh/authorized_keys' \
75 --run-command 'chown root:root /root/.ssh/authorized_keys' \
76 --copy-in "$TRAVIS_BUILD_DIR:/root" \
77 --network \
78 --selinux-relabel
81 # Now we create a domain by using virt-install. This not only creates the domain, but runs the VM a…
84 sudo virt-install \
85 --name fedoravm \
86 --memory $MEMORY \
87 --vcpus $VCPUS \
88 --disk "$IMAGE_BASE_NAME.raw" \
89 --import --noautoconsole
93 # can check the net-dhcp leases, for our host. We have to poll, and we will poll for up to 3 minute…
94 # intervals, so 30 poll attempts (0-29 inclusive).
103 sudo virsh net-dhcp-leases default | tee dhcp-leases.txt
106 ipaddy="$(grep fedoravm dhcp-leases.txt | awk '{print $5}' | cut -d'/' -f 1-1)"
107 if [ -n "$ipaddy" ]; then
116 if [ -z "$ipaddy" ]; then
122 # Great we have a host running, ssh into it. We specify -o so
128 ssh -tt -o StrictHostKeyChecking=no -o LogLevel=QUIET "root@$ipaddy" "SELINUX_DIR=/root/$project_di…