Skip to content

Commit c52d79b

Browse files
committed
Merging changes for v2.4.5
Merge branch 'Qubinode-master'
2 parents a6516e2 + dab43f7 commit c52d79b

29 files changed

+1117
-564
lines changed

.github/workflows/ansible-lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Ansible Lint
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
python-version: [3.6.10]
13+
ansible-version: [2.9.10]
14+
lint-version: [4.1.0]
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install Ansible ${{ matrix.ansible-version }}
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install ansible-lint==${{ matrix.lint-version }} ansible==${{ matrix.ansible-version }}
26+
- name: Lint playbook
27+
run: |
28+
git clone https://github.com/Qubinode/qubinode-installer.git
29+
cd qubinode-installer
30+
ansible-galaxy install git+https://github.com/Qubinode/ocp4_kvm_deployer.git,dev --force
31+
ansible-lint -x 206,204 playbooks/idm_vm_deployment.yml
32+

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Changelog
2+
3+
## [qbnv2.4.4](https://github.com/Qubinode/deploy-kvm-vm/tree/qbnv2.4.4) (2021-01-12)
4+
5+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/v1.2.0...qbnv2.4.4)
6+
7+
## [v1.2.0](https://github.com/Qubinode/deploy-kvm-vm/tree/v1.2.0) (2021-01-12)
8+
9+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/v1.2...v1.2.0)
10+
11+
## [v1.2](https://github.com/Qubinode/deploy-kvm-vm/tree/v1.2) (2020-12-31)
12+
13+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/v2.4.2...v1.2)
14+
15+
## [v2.4.2](https://github.com/Qubinode/deploy-kvm-vm/tree/v2.4.2) (2020-07-29)
16+
17+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/v2.4.0...v2.4.2)
18+
19+
## [v2.4.0](https://github.com/Qubinode/deploy-kvm-vm/tree/v2.4.0) (2020-05-31)
20+
21+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/v1.0.0...v2.4.0)
22+
23+
## [v1.0.0](https://github.com/Qubinode/deploy-kvm-vm/tree/v1.0.0) (2019-12-28)
24+
25+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/v1.1...v1.0.0)
26+
27+
**Merged pull requests:**
28+
29+
- removed /dev/sda1, replaced with dynamic variable [\#1](https://github.com/Qubinode/deploy-kvm-vm/pull/1) ([amalivert](https://github.com/amalivert))
30+
31+
## [v1.1](https://github.com/Qubinode/deploy-kvm-vm/tree/v1.1) (2019-11-07)
32+
33+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/v1.0...v1.1)
34+
35+
## [v1.0](https://github.com/Qubinode/deploy-kvm-vm/tree/v1.0) (2019-09-18)
36+
37+
[Full Changelog](https://github.com/Qubinode/deploy-kvm-vm/compare/df0ed43fe4f709a56e2a7500235b43cea121cdde...v1.0)
38+
39+
40+
41+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

README.md

Lines changed: 54 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,76 @@
1-
Deploy Red Hat KVM Image using cloud-init
2-
=========
1+
deploy-kvm-vm
2+
=============
3+
This role deploys a Libvirt KVM instance from a qcow image
34

4-
The following role will deploy a Red Hat Enterprise Linux 7.x KVM.
5+
Tested deployments:
6+
- Red Hat Enterprise Linux 7/8
7+
- Fedora 32
58

69
Requirements
710
------------
811
* kvm packages are installed
912

1013
Role Variables
1114
--------------
12-
13-
|Variables |Required |Default |Description |
14-
|-------------------------------------------------------|------------------|---------------------|-------------------------------------------------------------------------------------------------------|
15-
|admin_user |x |admin |User cloud-init creates |
16-
|admin_user_password |:heavy_check_mark:|see defaults/main.yml|Password for the cloud-init user |
17-
|cidata_iso_name |x |cidata.iso |name of the iso created for cloud-init |
18-
|cloud_init_iso_image |x |see defaults/main.yml|full path where the cloud-init iso is stored |
19-
|cloud_init_meta_data |x |see defaults/main.yml|full path to cloud-init meta data file |
20-
|cloud_init_user_data |x |see defaults/main.yml|full path to cloud-init user data file |
21-
|cloud_init_vm_image | | |name of the qcow OS iso |
22-
|disk_opt |x |see defaults/main.yml|options to pass to qemu-img |
23-
|disk_sequence | |see defaults/main.yml|template to generate disk device names, e.g. vdc |
24-
|dns_servers | | |dns servers for /etc/resolv manged by cloud-init |
25-
|extra_disk_name | | |generated prefix for extra disk name |
26-
|extra_storage | | |dictionary of extra disk, see defaults/main.yml |
27-
|kvm_install_host | |localhost |kvm host to run these tasks on, for future use. |
28-
|kvm_vm_pool_dir |:heavy_check_mark:| |the libvirt pool where VM images are stored |
29-
|kvm_vm_root_pwd | |see defaults/main.yml|sets root's password when cloud-init is executed |
30-
|vm_virtinstall_net_opts | | |Libvirt network with opitions that VMs will sit on |
31-
|manage_dns | |yes |Enable cloud-init to setup /etc/resolv.conf |
32-
|os_disk |x |see defaults/main.yml|Full path to the OS primary qcow2 disk |
33-
|os_qcow_template |x |see defaults/main.yml|Full path to the OS qcow template |
34-
|os_variant |:heavy_check_mark:|see defaults/main.yml|Which Linux distro |
35-
|rhsm_activationkey rhsm_org rhsm_password rhsm_username|:heavy_check_mark:|none |Register system to Red Hat. Use either rhsm_activationkey & rhsm_org or rhsm_password and rhsm_username|
36-
|search_domains |x |see defaults/main.yml|sets /etc/resolv.conf search domains |
37-
|vm_cpu |:heavy_check_mark:|see defaults/main.yml|The number of vpcu's for the VM |
38-
|vm_data_dir |:heavy_check_mark:|see defaults/main.yml|files related to VM's are stored |
39-
|vm_domain |:heavy_check_mark:|see defaults/main.yml|domain for the VM |
40-
|vm_hostname |x |see defaults/main.yml| |
41-
|vm_local_hostname |x |see defaults/main.yml| |
42-
|vm_memory |:heavy_check_mark:|see defaults/main.yml|amount of memory for VM |
43-
|vm_name |:heavy_check_mark:|none |Short name of the vm |
44-
|vm_network_br |:heavy_check_mark:|see defaults/main.yml|Libvirt network bridge |
45-
|vm_provision_vars |:heavy_check_mark:|see defaults/main.yml|location for vars file created during play |
46-
|vm_public_key |x |see defaults/main.yml|user public key |
47-
|vm_recreate |x |false |recreates VM |
48-
|vm_teardown |x |false |delete VM and associated files VM |
49-
|vm_root_disk_size |:heavy_check_mark:|see defaults/main.yml|size of the OS root disk |
50-
|vm_virtinstall_script |:heavy_check_mark:| |full path to virt-install script generated |
51-
|update_inventory |x |false |updates the static inventory file |
52-
|inventory_file |x |none |path to local inventory file |
53-
15+
Please see defaults/main.yml
5416

5517
Dependencies
5618
------------
19+
N/A
5720

58-
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
21+
Example Playbooks
22+
-----------------
5923

60-
Example Playbook
61-
----------------
24+
**Deploy Fedora**
6225
```
63-
- hosts: localhost
64-
tags: provision
26+
- name: Fedora VM
27+
hosts: localhost
28+
become: yes
29+
6530
vars:
66-
update_inventory: true
67-
inventory_file: /inventory/instances/localhost
68-
kvm_vm_pool_dir: "/var/lib/libvirt/images"
69-
kvm_install_host: localhost
70-
vm_recreate: false
71-
vm_teardown: false
72-
cloud_init_vm_image: "rhel-server-7.6-x86_64-kvm.qcow2"
73-
vm_name: test0073
74-
vm_public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
31+
vm_name: "fedora32"
7532
vm_cpu: 2
7633
vm_memory: 2048
77-
vm_root_disk_size: 20G
78-
vm_libvirt_net: default
79-
rhsm_org: "7828949"
80-
rhsm_activationkey: "act-os-rhel-7Server"
81-
admin_user_password: mypassword
82-
extra_storage:
83-
- size: 80G
84-
enable: true
85-
- size: 50G
86-
enable: true
34+
vm_root_disk_size: 20
35+
vm_teardown: no
36+
vm_qcow_image: Fedora-Cloud-Base-32-1.6.x86_64.qcow2
37+
admin_user: changeme
38+
admin_user_password: changeme
39+
kvm_vm_root_pwd: changeme
40+
os_release: fedora31
41+
42+
43+
tasks:
44+
- name: deploy a kvm node
45+
include_role:
46+
name: deploy-kvm-vm
47+
```
48+
49+
**Deploy RHEL 8**
50+
```
51+
- name: Deploy RHEL 8.3 Beta VM
52+
hosts: localhost
53+
become: yes
54+
55+
vars:
56+
vm_name: "rhel83-beta"
57+
vm_cpu: 2
58+
vm_memory: 2048
59+
vm_root_disk_size: 20
60+
vm_teardown: no
61+
vm_qcow_image: rhel-8.3-beta-1-x86_64-kvm.qcow2
62+
admin_user: changeme
63+
admin_user_password: changeme
64+
kvm_vm_root_pwd: changeme
65+
os_release: rhel8.2
66+
rhsm_activationkey: rhel-server
67+
rhsm_org: 1234565
68+
69+
8770
tasks:
88-
- name: Create KVM VM
71+
- name: deploy a kvm node
8972
include_role:
90-
name: ansible-role-rhel7-kvm-cloud-init
73+
name: deploy-kvm-vm
9174
```
9275

9376
License

0 commit comments

Comments
 (0)