I am trying to eat own dog food.  Infrastructure as code...

So.. I have taken three physical servers.  Setup all the base packages, set
NICs, NTP, DNS, collected disk UUIDs etc..

The servers are prepped.

And one server has cockpit and ovirt-engine installed... and service
started.

#############################

---
# This task takes nodes prepaired and deploys cockpit, ovirt
deployment and scripts cluster initilization. ONLY RUN THIS ON FIRST
NODE OF CLUSTER
# v0.001 20210222
# file: /roles/task_hci_setup.yml
# Documentation
# Overview:
https://www.ovirt.org/documentation/gluster-hyperconverged/chap-Deploying_Hyperconverged.html

- name: Check if rpm ovirt-release44 is already installed
  yum:
    list: ovirt-release44
  register: yum_list
- name: Conditionally do next thing
  debug:
    msg: "ovirt-release44 Not installed"
  when:
yum_list.results | selectattr("yumstate", "match", "installed") | list
| length == 0

# Add oVirt Repo manual.
- name: Download oVirt Repo RPM
  get_url:
     url: https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm
     dest: ~/ovirt-release44.rpm
     mode: '0440'
  when:
yum_list.results | selectattr("yumstate", "match", "installed") | list
| length == 0

- name: Install Python3 as this is needed for oVirt.
  yum:
    name:
    - python3
    state: latest
  become: true

- name:
For some reason install of oVirt Repo fails as package so have to run as shell
  command: "rpm -ivh ~/ovirt-release44.rpm"
  when:
yum_list.results | selectattr("yumstate", "match", "installed") | list
| length == 0

- name: With new oVirt repo.. install rest of HCI dependancies
  yum:
    name:
    - cockpit-ovirt-dashboard
    - vdsm-gluster
    - ovirt-host
    - ovirt-ansible-roles
    - ovirt-ansible-infra
    state: latest
  become: true

# Set variable for first node in cluster list to set as ignition master
- name: Only on first node thor deploy ovirt-engine-appliance
  yum:
    name:
    - ovirt-engine-appliance
    state: latest
  become: true
  when: "'{{ hci_ignition_node }}' in inventory_hostname"

# on local ansible host install galaxy modules
# Broken: I need a means to check if installed. If so .. don't install again.
# - name: Install Galaxy Modules on local ansible host
#   local_action:
#     module: shell
#     _raw_params: ansible-galaxy install oVirt.ovirt-ansible-roles
#   # when: <check for something to show galaxy installed module

- name: Start cockpit service
  service:
    name=cockpit
    state=started
    enabled=yes
  when: "'{{ hci_ignition_node }}' in inventory_hostname"



################################
####### HCI Deploy #############
################################
# https://www.openvirtualization.pro/rhv-ovirt-ansible-getting-started/
#############################


What I am missing is the logic and though to get the last section of
playbook.. Which is ... what I would do in the wizard... ... but "step away
from the mouse".

# Ansible section:  from bastion node (laptop windows 10 WSL with ansible
and galaxy installed

# 1)  build playbook from my site variables... based on some ovirt master
sharing template of what that UI builds

# 2)   push the playbook that installs ansible on the first node.  Install
ansible as a first node...  Run ansible playbook from customized template
file

# 3)  Create vlans.

# 4) Setup new VM gluster shared volume from three other disk

# 5) Push a template VM into cluster, attached to new VLAN and attached to
new volume

#6) Deploy VM from this template

#7) Drink a cold beer



###############################

Question:
1) Can you do ansible deployment from "bastion host" or does the ansible
have to run on the node that is installed with the "ovirt-engine". If so..
how do you collect feedback etc..

2) I assume there is a template.  Maybe it is published but I could not
find it.  That I replace (or match) variables of my site that fill in that
file.

3) I installed galaxy oVirt.ovirt-ansible-roles      but.. how do I know it
is deployed on my bastion host?  I poked around in the ansible folder.. not
seeing anything.  And I assume this only is of help POST the above seven
steps being done.  But maybe this has deployment components and I am
missing documents.

Thanks,

-- 
p <jeremey.w...@gmail.com>enguinpages
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/T7BMS44D6DZZVUCGYUJ7SO6LHXMTMOC2/

Reply via email to