GithubHelp home page GithubHelp logo

ovirt / ovirt-ansible-engine-setup Goto Github PK

View Code? Open in Web Editor NEW
15.0 18.0 23.0 105 KB

This project is now archived, development moved to https://github.com/ovirt/ovirt-ansible-collection

License: Apache License 2.0

Shell 28.76% HTML 71.24%

ovirt-ansible-engine-setup's Introduction

oVirt Engine Setup

This role has been migrated to oVirt Ansible Collection, please use latest version from there. This repository is now readonly and no longer used for active development

Installs required packages for oVirt Engine deployment, generates answerfile and runs engine-setup. Optionally the role updates oVirt engine packages.

Note

Please note that when installing this role from Ansible Galaxy you are instructed to run following command:

$ ansible-galaxy install ovirt.engine-setup

This will download the role to the directory with the same name as you specified on the command line, in this case ovirt.engine-setup. However note that this is case sensitive. Therefore if you specify for example OVIRT.engine-setup, the same role will be downloaded, but it will be placed in a directory named OVIRT.engine-setup. If this is the case, you always have to use this role with the upper case prefix. That's why you need to be careful how you specify the name of the role on command line.

For the RPM installation we install three legacy names - oVirt.engine-setup, ovirt.engine-setup and ovirt-engine-setup. You can use any of these names. This documentation and examples in this repository use name ovirt.engine-setup. oVirt.engine-setup and ovirt-engine-setup role names have been deprecated.

Target Systems

  • engine

Requirements

  • Environment with configured repositories
  • Ansible version 2.9.0

Role Variables

By default engine-setup uses an answer file specific for version of oVirt based on ovirt_engine_setup_version parameter. You can provide your own answer file to ovirt_engine_setup_answer_file_path variable.

  • Common options for role:
Name Default value Description
ovirt_engine_setup_answer_file_path UNDEF Path to custom answerfile for engine-setup.
ovirt_engine_setup_use_remote_answer_file False If True, use answerfile's path on the remote machine. This option should be used if the installation occurs on the remote machine and the answerfile is located there as well.
ovirt_engine_setup_update_setup_packages False If True, setup packages will be updated before engine-setup is executed. It makes sense if Engine has already been installed.
ovirt_engine_setup_perform_upgrade False If True, this role is used to perform an upgrade.
ovirt_engine_setup_product_type oVirt One of ["oVirt", "RHV"], case insensitive.
ovirt_engine_setup_offline False If True, updates for all packages will be disabled.
ovirt_engine_setup_restore_engine_cleanup False Remove the configuration files and clean the database associated with the Engine, relevant only when ovirt_engine_setup_restore_file is defined
ovirt_engine_setup_restore_file UNDEF Restored the engine with a backup file which created with engine-backup.
ovirt_engine_setup_restore_scopes UNDEF List of scopes following values are available: ["all", "files", "db", "dwhdb", "cinderlibdb"].
ovirt_engine_setup_restore_options {} Dictionary that will add engine restore options as "--key=value" when value is not empty, otherwise it will append "--key" only.
  • Common options for engine:
Name Default value Description
ovirt_engine_setup_version 4.4 Allowed versions: [4.1, 4.2, 4.3, 4.4].
ovirt_engine_setup_package_list [] List of extra packages to be installed on engine apart from ovirt-engine package.
ovirt_engine_setup_fqdn UNDEF Host fully qualified DNS name of the server.
ovirt_engine_setup_organization UNDEF Organization name for certificate.
ovirt_engine_setup_firewall_manager firewalld Specify the type of firewall manager to configure on Engine host, following values are available: firewalld,iptables or empty value (null) to skip firewall configuration.
ovirt_engine_setup_require_rollback UNDEF If True, setup will require to be able to rollback new packages in case of a failure. If not specified, the default answer from engine-setup will be used. Valid for updating/upgrading.
ovirt_engine_setup_admin_password UNDEF Password for the automatically created administrative user of the oVirt Engine.
ovirt_engine_setup_wait_running_tasks False If True, engine-setup will wait for running tasks to finish. Valid for ovirt_engine_setup_version >= 4.2.
ovirt_engine_cinderlib_enable False If True, cinderlib is enabled. Valid for ovirt_engine_setup_version >= 4.3.
ovirt_engine_grafana_enable True If True, Grafana integration will be set up. Valid for ovirt_engine_setup_version >= 4.4.
ovirt_engine_setup_engine_configs [] List of dictionaries with keys key, value and version. The engine-config will be called with parametrs "-s key=value" when specified version it will append "--cver=version" to the config.
  • Engine Database:
Name Default value Description
ovirt_engine_setup_db_host localhost IP address or host name of a PostgreSQL server for Engine database. By default the database will be configured on the same host as the Engine.
ovirt_engine_setup_db_port 5432 Engine database port.
ovirt_engine_setup_db_name engine Engine database name.
ovirt_engine_setup_db_user engine Engine database user.
ovirt_engine_setup_db_password UNDEF Engine database password.
ovirt_engine_setup_engine_vacuum_full False Used only when upgrading. If True, engine database vacuum will be performed before upgrade.
  • Engine Data Warehouse Database:
Name Default value Description
ovirt_engine_setup_dwh_db_configure True If True, the DWH Database will be configured manually.
ovirt_engine_setup_dwh_db_host localhost IP address or host name of a PostgreSQL server for DWH database. By default the DWH database will be configured on the same host as the Engine.
ovirt_engine_setup_dwh_db_port 5432 DWH database port.
ovirt_engine_setup_dwh_db_name ovirt_engine_history DWH database name.
ovirt_engine_setup_dwh_db_user ovirt_engine_history DWH database user.
ovirt_engine_setup_dwh_db_password UNDEF DWH database password.
ovirt_engine_setup_dwh_vacuum_full False Used only when upgrading. If True, DWH databse vacuum will be performed before upgrade.
  • OVN related options:
Name Default value Description
ovirt_engine_setup_provider_ovn_configure True If True, OVN provider will be configured. Valid for ovirt_engine_setup_version >= 4.2.
ovirt_engine_setup_provider_ovn_username admin@internal Username for OVN.
ovirt_engine_setup_provider_ovn_password UNDEF Password for OVN.
  • Apache related options:
Name Default value Description
ovirt_engine_setup_apache_config_root_redirection True If True, engine-setup will configure the default page in Apache to automatically redirect clients to ovirt-engine default page.
ovirt_engine_setup_apache_config_ssl True If False, engine-setup will not configure Apache SSL settings and administrators will need to configure it manually.

Dependencies

None

Example Playbook

---
# Example of oVirt setup:
- name: Setup oVirt
  hosts: engine
  vars_files:
    # Contains encrypted `ovirt_engine_setup_admin_password` variable using ansible-vault
    - passwords.yml
  vars:
    ovirt_engine_setup_version: '4.2'
    ovirt_engine_setup_organization: 'of.ovirt.engine.com'
  roles:
    - ovirt.engine-setup


# Example of RHV setup:
- name: Setup RHV
  hosts: engine
  vars_files:
    # Contains encrypted `ovirt_engine_setup_admin_password` variable using ansible-vault
    - passwords.yml
  vars:
    ovirt_engine_setup_version: '4.2'
    ovirt_engine_setup_organization: 'rhv.redhat.com'
    ovirt_engine_setup_product_type: 'rhv'
  roles:
    - ovirt.engine-setup


# Example of oVirt setup with engine_configs:
- name: Setup oVirt
  hosts: engine
  vars_files:
    # Contains encrypted `ovirt_engine_setup_admin_password` variable using ansible-vault
    - passwords.yml
  vars:
    ovirt_engine_setup_version: '4.4'
    ovirt_engine_setup_organization: 'of.ovirt.engine.com'
    ovirt_engine_setup_engine_configs:
      - key: SpiceProxyDefault
        value: prot://proxy
        version: general

  roles:
    - ovirt.engine-setup


# Example of oVirt engine restore from file with cleanup engine before:
- name: restore oVirt engine
  hosts: engine
  vars_files:
    # Contains encrypted `ovirt_engine_setup_admin_password` variable using ansible-vault
    - passwords.yml
  vars:
    ovirt_engine_setup_version: '4.4'
    ovirt_engine_setup_organization: 'of.ovirt.engine.com'
    ovirt_engine_setup_restore_engine_cleanup: true
    ovirt_engine_setup_restore_file: '/path/to/backup.file'
    ovirt_engine_setup_restore_scopes:
      - 'files'
      - 'db'
    ovirt_engine_setup_restore_options:
      log: '/path/to/file.log'
      restore-permissions: ''
      provision-all-databases: ''

  roles:
    - ovirt.engine-setup

ovirt-ansible-engine-setup's People

Contributors

arachmani avatar gregsheremeta avatar irosenzw avatar kkoukiou avatar klaas- avatar kobihk avatar machacekondra avatar mkowalski avatar mnecas avatar mwperina avatar myakove avatar petr-balogh avatar sandrobonazzola avatar tareqalayan avatar tiraboschi avatar

Stargazers

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

Watchers

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

ovirt-ansible-engine-setup's Issues

ovirt_engine_setup_offline and ovirt_engine_setup_update_all_packages discrepancy

I suggest to squash these into just a single option. You either want to update everything ro run in offline environment.
But having e.g. ovirt_engine_setup_update_all_packages=true and ovirt_engine_setup_offline=true doesn't make sense - you update all the packages and then setup fails because it's not allowed to install matching packages (in versionlock). Similarly the other way around.

It makes sense to only have a single option and derive a correct --offline parameter from it

aaa-ldap integration

Hi,
would you consider this role to be the right place for ldap or general auth configuration? I am currently thinking about implementing this and I am not sure if I should extend this role or create a "post install engine" role

Greetings
Klaas

Playbook fail with "Python 2 yum module is needed for this module"

Hi,

When I try to deploy the hosted_engine I always get this error:

[ INFO  ] TASK [ovirt.hosted_engine_setup : Install oVirt Hosted Engine packages]
[ ERROR ] fatal: [localhost]: FAILED! => {"attempts": 10, "changed": false, "msg": "The Python 2 yum module is needed for this module. If you require Python 3 support use the `dnf` Ansible module instead."}
[ ERROR ] Failed to execute stage 'Closing up': Failed executing ansible-playbook
[ INFO  ] Stage: Clean up

I'm using ovirt node 4.4.11

Let me know if more information is needed.

Regards.

Performing upgrade/update failing with missing rhvm package when product is RHV

This task is problematic and failing when performing update/upgrade cause once rhvm is installed it's locked by yum versionlock plugin and looks like unavailable. So installing of this package in task below:

- name: Install RHV package
  package:
    name: "{{ 'rhevm' if ovirt_engine_setup_version is version('4.2', '<') else 'rhvm' }}"
    state: present
  when: ovirt_engine_setup_product_type | lower == 'rhv'

Failing with:
2018-11-29 17:17:36,417 p=58857 u=root | fatal: [jenkins-vm-03.lab.eng.tlv2.redhat.com]: FAILED! => {"changed": false, "msg": "No package matching 'rhvm' found available, installed or updated", "rc": 126, "results": ["No package matching 'rhvm' found available, installed or updated"]}

Failing when ovirt_engine_setup_use_remote_answer_file is not defined

I see our automation is failing cause of this variable is not defined.

Error:
18:57:41 fatal: [jenkins-vm-03.lab.eng.tlv2.redhat.com]: FAILED! => {"msg": "The conditional check 'ovirt_engine_setup_use_remote_answer_file' failed. The error was: error while evaluating conditional (ovirt_engine_setup_use_remote_answer_file): 'ovirt_engine_setup_use_remote_answer_file' is undefined\n\nThe error appears to have been in '/var/lib/jenkins/workspace/rhv-ge-deploy-4.2@2/ansible-roles-deps/oVirt.engine-setup/tasks/engine_setup.yml': line 25, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Use remote's answer file\n ^ here\n"}

I think that it should be fixed by some default value.

README says this works with ovirt_engine_setup_version set to 4.0 but template file missing for 4.0

The README says this works with ovirt_engine_setup_version: '4.0' but get the below error when attempting to use.

TASK [oVirt.engine-setup : Use the default answerfile] *************************************************************************************
fatal: [rhevm.rhc-lab.iad.redhat.com]: FAILED! => {
    "changed": false,
    "failed": true
}

MSG:

Could not find or access 'answerfile_4.0_basic.txt.j2'
Searched in:
	/root/ansible-rhc_lab/roles/oVirt.engine-setup/templates/answerfile_4.0_basic.txt.j2
	/root/ansible-rhc_lab/roles/oVirt.engine-setup/answerfile_4.0_basic.txt.j2
	/root/ansible-rhc_lab/roles/oVirt.engine-setup/tasks/templates/answerfile_4.0_basic.txt.j2
	/root/ansible-rhc_lab/roles/oVirt.engine-setup/tasks/answerfile_4.0_basic.txt.j2
	/root/ansible-rhc_lab/playbooks/templates/answerfile_4.0_basic.txt.j2
	/root/ansible-rhc_lab/playbooks/answerfile_4.0_basic.txt.j2

No possibility to set a custom FQDN

During an interactive installation it is possible to set a custom FQDN which gets transformed into OVESETUP_CONFIG/fqdn value in the answer file.

Currently this ansible role does not seem to provide any mechanism to benefit from this, instead it always relies on the automatically detected hostname what is not a desired solution in the environment consisting of virtual hosts.

Some parts of the code refer to ovirt_engine_setup_hostname, but this variable is actually not used during the installation process.

missing el8 build causes dependency failures on el8 hosts

17:05:10,442 INFO anaconda:program: Problem: package ovirt-release-host-node-4.4.0-0.0.alpha.20191126164154.git1ba5b84.el8.noarch requires ovirt-host, but none of the providers can be installed
17:05:10,442 INFO anaconda:program: - package ovirt-host-4.4.0-0.2.alpha.el8.x86_64 requires ovirt-hosted-engine-setup, but none of the providers can be installed
17:05:10,443 INFO anaconda:program: - cannot install the best candidate for the job
17:05:10,443 INFO anaconda:program: - nothing provides ovirt-ansible-engine-setup >= 1.1.9 needed by ovirt-hosted-engine-setup-2.4.0-1.el8.noarch

offending patch is

commit a3217da
Author: mnecas [email protected]
Date: Mon Nov 11 14:01:40 2019 +0100

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.