Project

Profile

Help

Virtualization quickstart » History » Sprint/Milestone 1

kdelee@redhat.com, 07/25/2017 10:58 PM

1 1 kdelee@redhat.com
# Virtualization quickstart
2
3
## SETTING UP VIRTUALIZATION TOOLS ON YOUR FEDORA MACHINE:  
4
Install the following packages:
5
6
`$ sudo dnf install libvirt qemu-kvm kvm libguestfs-tools virt-install`
7
8
Then, download an image for the OS you want to run in your VM.  
9
Here is a link to download an .iso for Fedora 26:  
10
https://getfedora.org/en/workstation/download/
11
12
To launch "Virtual Machine Manager" press Super key and search "Virtual Machine Manager"
13
14
1\) File -\> New Virtual Machine  
15
2\) Local install media  
16
\* use file browser to find your downloaded image  
17
3\) accept default settings
18
19
\==================================================
20
21
SETTING UP THE VM:  
22
install fedora  
23
\* set hostname: give it a name other than localhost.  
24
\* make it meaningful  
25
\* set root password (weak one is OK)  
26
\* if you make a user, make sure to give them sudo access
27
28
\---------------------------  
29
NOTE:  
30
If you forgot to make "admin" have sudo access:  
31
Once VM is running, go to terminal and switch to root
32
33
`[root@VM0 admin]# gpasswd --add admin wheel`
34
35
Then restart
36
37
\--------------------------  
38
\--------------------------  
39
WARNING:  
40
\`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  
41
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.
42
43
See your current hostname with:  
44
<code>  
45
$ echo $HOSTNAME
46
47
To change your hostname, run
48
49
$ sudo hostnamectl set-hostname DESIRED_NAME  
50
</code>  
51
\----------------------------
52
53
\==========================================================  
54
SETTING UP ANSIBLE (on the VM):
55
56
Install the ansible package:
57
58
`$ sudo dnf install ansible git`
59
60
Ansible info:  
61
For documentation see http://docs.ansible.com/  
62
Take the learning.redhat.com course DO407R (Automation with Ansible Online) course
63
64
Download the pulp_packaging repo:
65
66
`$ git clone https://github.com/pulp/pulp_packaging.git`
67
68
Now we need to make a \`hosts\` file for ansible. Use the results of the \`hostname\` command in the place of 'localhost':  
69
<code>  
70
$ cd pulp_packaging/ci/ansible  
71
$ cat \> hosts \<<EOF
72
> $(hostname)  
73
\> EOF  
74
</code>
75
76
To choose the version of pulp that you will install, edit the file:  
77
\`pulp_packaging/ci/ansible/roles/pulp/defaults/main.yaml\`  
78
OR pass \` -e pulp_version=2.13 -e pulp_build=stable\`  
79
OR in hosts file, specify pulp_version and pulp_build on the same line as hostname, i.e.  
80
“Nameofhost pulp_version=2.13 pulp_build=stable”
81
82
Now you are ready to run the ansible playbook:  
83
`$ sudo ansible-playbook -i hosts -e ansible_connection=local pulp_server.yaml`  
84
\================================