Git Product home page Git Product logo

ovirt-ansible's Introduction

Build Status

ovirt-ansible

Ansible roles for oVirt deployment.

Roles in this repository can configure nodes used as oVirt deployment members.

Host groups

Each role has documentation, where you can find Target systems section. This section specifies what kind of node you can apply relevant role.

engine

This host group is meant for node where the oVirt Engine management is supposed to be deployed.

hypervisors

This host groups are meant for all nodes which are supposed to be used as hypervisors of oVirt Engine.

Note that none of the roles in this repository adds these machines into oVirt Engine.

database

This host group is meant for node on which the database is supposed to be deployed.

dwh

This host group is meant for node on which the DWH is supposed to be deployed.

guest

This host group is meant for virtual machines hosted by oVirt Engine.

Implemented roles

Test

This project uses provision_docker an ansible role to run oVirt deployment roles against to docker containers.

In order to run oVirt deployment against to docker containers, the docker service has to be configured and running on your system.

Under tests directory, there are playbooks for different oVirt versions

  • tests/test-3.6.yml (Disabled because of #155)
  • tests/test-4.0.yml (Disabled because of #155)
  • tests/test-4.1.yml
  • tests/test-4.2.yml
# Install ansible and docker-py
pip install ansible docker-py
# Download depending ansible roles
ansible-galaxy install -r tests/requirements.yml -p tests/roles/
# Run oVirt deployment roles
ansible-playbook tests/test-4.2.yml -i tests/inventory

You can find the Dockerfile which was used to build the images which the tests are using under Dockerfiles directory.

ovirt-ansible's People

Contributors

kkoukiou avatar kobihk avatar leistnerova avatar lukas-bednar avatar mkalfon avatar mordechai avatar moshesheena avatar myakove avatar nellyc avatar petr-balogh avatar pkubica avatar stluke avatar tareqalayan avatar tasdikrahman avatar vkondula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ovirt-ansible's Issues

Project layout

Hi,

I was planning to reuse our roles. Unfortunatelly I can`t since the roles are not in their own repository. As an improvement I would recommend having the playbook in one repo and the roles in other repos.

If want to reuse your work, I need to copy your roles . This is not ideal.

Thanks for your efforts.

Test upgrade

Add tests for upgrade between versions 4.0 -> 4.1, 4.1 - > 4.2..
And add some doc / notes about it into ovirt-engine-setup readme.

Reconsider meaning of ovirt_repo & ovirt_dependency_repo variable

Today the ovirt-common role allows you to use ovirt-release-rpm and url to repository itself.
Apparently it expect url to repo file which is copied on target system.
Today I can not find such file which I could use on official ovirt site, so only use case for this parameter is that I can prepare repo file somewhere and then use it.
I would expect, that it accepts url to yum repository, as I did in #62 .

But that is just my point of view ... please make a decision in this manner.

Add role for engine-cleanup

@pkubica was so nice and added this role recently ๐Ÿ‘
I just enabled tests to run this role, and it failed on File contains parsing errors: /tmp/answerfile.txt \t[line 11]: 'ovirt-engine-websocket-proxy\\n'

In order to reproduce just enable test in tests/test.yml for ovirt-engine-cleanup role.

Also please add link to main README to include this role.

TASK [ovirt-engine-cleanup : run engine-cleanup with answerfile] ***************

fatal: [engine_centos7]: FAILED! => {"changed": true, "cmd": "engine-cleanup --config-append=/tmp/answerfile.txt", "delta": "0:00:00.382200", "end": "2017-03-03 15:41:39.559123", "failed": true, "rc": 1, "start": "2017-03-03 15:41:39.176923", "stderr": "", "stdout": "[ INFO  ] Stage: Initializing\n[ ERROR ] Failed to execute stage 'Initializing': File contains parsing errors: /tmp/answerfile.txt \t[line 11]: 'ovirt-engine-websocket-proxy\\n'\n[ INFO  ] Stage: Clean up\n          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-remove-20170303154139-ixrrys.log\n[ ERROR ] Failed to execute stage 'Clean up': 'NoneType' object has no attribute 'cleanup'\n[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20170303154139-cleanup.conf'\n[ INFO  ] Stage: Pre-termination\n[ INFO  ] Stage: Termination\n[ ERROR ] Execution of cleanup failed", "stdout_lines": ["[ INFO  ] Stage: Initializing", "[ ERROR ] Failed to execute stage 'Initializing': File contains parsing errors: /tmp/answerfile.txt \t[line 11]: 'ovirt-engine-websocket-proxy\\n'", "[ INFO  ] Stage: Clean up", "          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-remove-20170303154139-ixrrys.log", "[ ERROR ] Failed to execute stage 'Clean up': 'NoneType' object has no attribute 'cleanup'", "[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20170303154139-cleanup.conf'", "[ INFO  ] Stage: Pre-termination", "[ INFO  ] Stage: Termination", "[ ERROR ] Execution of cleanup failed"], "warnings": []}

Fail playbook when none of package sources are defined

I want to avoid to

TASK [ovirt-deployment/roles/ovirt-common : copy repository files] *************
skipping: [X.Y.Z.A] => (item=) 

TASK [ovirt-deployment/roles/ovirt-common : install rpm repository package] ****
skipping: [X.Y.Z.A]

TASK [ovirt-deployment/roles/ovirt-common : create repository files] ***********
skipping: [X.Y.Z.A] => (item=) 

Installing libselinux-python on hosts

Now role engine-install need package libselinux-python on the host.

  • When prompting engine-setup, it fail on selinux without this package but installing other packages on host may be not a good idea for solving this issue.
  • file: /roles/common/tasks/main.yml
    tasks: install libselinux-python for ansible

Get rid of deprication warnings

TASK [ovirt-deployment/roles/ovirt-common : create repository files] ***********
[DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this
 will be a fatal error.: 'ovirt_repo_file' is undefined.
This feature will be 
removed in a future release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.

Deploy engine and hypervisor on the same host

Hi,

I was test driving the installation quite sucessfull. There was only one issue when deploying engine and hypervisor on the same host.

First I ran the ansible roles for the engine and the GUI came up. Second I was able add the a new host over the GUI. After the sucessfully adding the host the engine GUI was offline, because firewalld was off. I turned it on and the gui was working again.

[root@vm01 ~]# systemctl status firewalld.service
โ— firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: active (running) since Do 2016-12-29 09:42:21 CET; 9min ago
     Docs: man:firewalld(1)
 Main PID: 19477 (firewalld)
   CGroup: /system.slice/firewalld.service
           โ””โ”€19477 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Workaround

[root@vm01 ~]# systemctl enable firewalld
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/basic.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
[root@vm01 ~]# systemctl start firewalld

Possible solution:
Have firewalld on at all times.

Anyway to cirumvent this odd behavior? Is it a bug?

Need fix Travis CI

"The repository at StLuke/rhevm-ansible was not found."

  • maybe just change URLs in README.md

multiple ovirt repos should not be allowed at the same time

Currently it's possible to specify multiple repos by using ovirt_rpm_repo, ovirt_repo_files and ovirt_repo_url variables at the same time.All repos will be installed. This can bring problems and dependencies hell.

I see few possible solutions (maybe there're more):

  1. Check if two of them were specified and raise.
  2. Use overriding (for example url overrides files and both of them overrides rpm).

Unable to copy repo file from http server

I run ansible with
-e '{"ovirt_repo_file": "http://host.fqdn/rhev.repo", "ovirt_engine_answer_file_type": "4.0_basic"}' playbooks/rhel-host-deploy/config.yml

and see this error:
fatal: [10.35.149.116]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'unicode object' has no attribute 'url'\n\nThe error appears to have been in '/root/provision/ansible/ansible-playbooks/roles/ovirt-deployment/roles/ovirt-common/tasks/main.yml': line 36, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# 1) get repository files\n- name: copy repository files\n ^ here\n"}

role ovirt-collect-logs fails on CentOS 7

In order to reproduce just enable test in tests/test.yml for ovirt-collect-logs role.

TASK [ovirt-collect-logs : Dump system information using shell commands] *******

changed: [engine_centos7] => (item={'key': u'iptables', 'value': u'iptables -L'})

changed: [engine_centos7] => (item={'key': u'sysctl', 'value': u'sysctl -a'})

failed: [engine_centos7] (item={'key': u'netstat', 'value': u'netstat -lnp'}) => {"changed": true, "cmd": "netstat -lnp &> /var/tmp/ovirt-logs/netstat.txt", "delta": "0:00:00.037480", "end": "2017-03-03 15:12:59.485342", "failed": true, "item": {"key": "netstat", "value": "netstat -lnp"}, "rc": 127, "start": "2017-03-03 15:12:59.447862", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}

changed: [engine_centos7] => (item={'key': u'rpm-list', 'value': u'rpm -qa | sort -f'})

changed: [engine_centos7] => (item={'key': u'yum-list', 'value': u'yum list installed'})

changed: [engine_centos7] => (item={'key': u'services', 'value': u"systemctl -t service --failed --no-legend | awk '{print $1}' | xargs -r -n1 journalctl -u"})

changed: [engine_centos7] => (item={'key': u'lsmod', 'value': u'lsmod'})

changed: [engine_centos7] => (item={'key': u'memory_usage', 'value': u'ps -e -orss=,args= | sort  -b -k1,1n | tac'})

failed: [engine_centos7] (item={'key': u'lspci', 'value': u'lspci'}) => {"changed": true, "cmd": "lspci &> /var/tmp/ovirt-logs/lspci.txt", "delta": "0:00:00.037323", "end": "2017-03-03 15:13:02.818711", "failed": true, "item": {"key": "lspci", "value": "lspci"}, "rc": 127, "start": "2017-03-03 15:13:02.781388", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}

failed: [engine_centos7] (item={'key': u'lsof', 'value': u'lsof -P'}) => {"changed": true, "cmd": "lsof -P &> /var/tmp/ovirt-logs/lsof.txt", "delta": "0:00:00.037518", "end": "2017-03-03 15:13:03.225583", "failed": true, "item": {"key": "lsof", "value": "lsof -P"}, "rc": 127, "start": "2017-03-03 15:13:03.188065", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}

...ignoring

failed: [engine_centos7] (item={'key': u'pstree', 'value': u'pstree -p'}) => {"changed": true, "cmd": "pstree -p &> /var/tmp/ovirt-logs/pstree.txt", "delta": "0:00:00.037774", "end": "2017-03-03 15:13:03.655815", "failed": true, "item": {"key": "pstree", "value": "pstree -p"}, "rc": 127, "start": "2017-03-03 15:13:03.618041", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}

TASK [ovirt-collect-logs : Link common logs] ***********************************

failed: [engine_centos7] (item={u'dest': u'messages', u'src': u'/var/log/messages'}) => {"failed": true, "item": {"dest": "messages", "src": "/var/log/messages"}, "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /var/log/messages", "path": "/var/tmp/ovirt-logs/messages", "src": "/var/log/messages", "state": "absent"}

Remove {{variables}} from role and task names

Remove variables from task names -> ovirt

TASK [ovirt-common : create repository backup] *********************************
changed: [192.168.1.1]

TASK [ovirt-common : copy {{ovirt_engine_type}} repository file] ***************
skipping: [192.168.1.1]

TASK [ovirt-engine-install-packages : yum install {{ovirt_engine_type}} engine]
ok: [192.168.1.1]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.