Project

Profile

Help

Actions

Virtualization quickstart » History » Revision 1

Revision 1/21 | Next »
kdelee@redhat.com, 07/25/2017 10:58 PM


Virtualization quickstart

SETTING UP VIRTUALIZATION TOOLS ON YOUR FEDORA MACHINE:

Install the following packages:

$ sudo dnf install libvirt qemu-kvm kvm libguestfs-tools virt-install

Then, download an image for the OS you want to run in your VM.
Here is a link to download an .iso for Fedora 26:
https://getfedora.org/en/workstation/download/

To launch "Virtual Machine Manager" press Super key and search "Virtual Machine Manager"

1) File -> New Virtual Machine
2) Local install media
* use file browser to find your downloaded image
3) accept default settings

==================================================

SETTING UP THE VM:
install fedora
* set hostname: give it a name other than localhost.
* make it meaningful
* set root password (weak one is OK)
* if you make a user, make sure to give them sudo access

---------------------------
NOTE:
If you forgot to make "admin" have sudo access:
Once VM is running, go to terminal and switch to root

[root@VM0 admin]# gpasswd --add admin wheel

Then restart

--------------------------
--------------------------
WARNING:
`localhost` is a BAD hostname. Each of your VMs should have a unique hostname. If you have cloned this VM from another, it will have the same hostname. This needs to change
It is imperative that you change your hostname before installing any pulp components, as they use the hostname and can produce undefined behavior if the hostname is changed after the fact.

See your current hostname with:

$ echo $HOSTNAME

To change your hostname, run

$ sudo hostnamectl set-hostname DESIRED_NAME

----------------------------

==========================================================
SETTING UP ANSIBLE (on the VM):

Install the ansible package:

$ sudo dnf install ansible git

Ansible info:
For documentation see http://docs.ansible.com/
Take the learning.redhat.com course DO407R (Automation with Ansible Online) course

Download the pulp_packaging repo:

$ git clone https://github.com/pulp/pulp_packaging.git

Now we need to make a `hosts` file for ansible. Use the results of the `hostname` command in the place of 'localhost':

$ cd pulp_packaging/ci/ansible
$ cat > hosts <<EOF

$(hostname)
> EOF

To choose the version of pulp that you will install, edit the file:
`pulp_packaging/ci/ansible/roles/pulp/defaults/main.yaml`
OR pass ` -e pulp_version=2.13 -e pulp_build=stable`
OR in hosts file, specify pulp_version and pulp_build on the same line as hostname, i.e.
“Nameofhost pulp_version=2.13 pulp_build=stable”

Now you are ready to run the ansible playbook:
$ sudo ansible-playbook -i hosts -e ansible_connection=local pulp_server.yaml
================================

Updated by kdelee@redhat.com over 6 years ago · 1 revisions