RHEL EDGE Management

The following role builds images for fleet manager.

Requirements

Red Hat API Tokens

  • An SSH Public Key
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa
  • install ansible collections
ansible-galaxy collection install -r collections/requirements.yml

Role Variables

Type Description Default Value
rh_offline_authentication_api_bearer_token offline Token for API Acccess rh_api_offline_token
rh_authentication_basic_username RHEL username username
rh_authentication_basic_password RHEL Password password
ssh_pub_key Public SSH key "ssh-rsa XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
device_group_name Name of device Group "my-device-name-group"
image_name Name of image "test-image"
username Name of user of target edge device "admin"
distribution RHEL Build distribution "rhel-86"
description Descrition of image "sample description"
packages example package list to be installed on image "curl net-tools podman tar bind-utils git"
arch RHEL architecture for taget enviornments "x86_64"
rhc_org_id RHEL ORG ID used to register devices "your_rhc_org_id"
rhc_activation_key RHEL activation Key used to register devices "your_rhc_activation_key"
os_variant OS variant target for KVM testing "rhel8.6"

Dependencies

  • Ansible

Example Playbook

- hosts: localhost
  remote_user: root
  roles:
    - rhel-edge-mangement-role

Example Vars

cat >your_vars.yml<<EOF
---
rh_offline_authentication_api_bearer_token: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXc"
rh_authentication_basic_username:  login@example.com
rh_authentication_basic_password:  yourpassword 

ssh_pub_key: "ssh-rsa XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"


create_device_name_group: true
device_group_name: "my-device-name-group"
create_image: true


#########################################################
## image atrributes
image_name: "imagename"
username: "admin"
distribution: "rhel-86"
description: "sample description"
packages: 'curl net-tools podman tar bind-utils git'
arch: "x86_64"

rhc_org_id: "your_rhc_org_id"
rhc_activation_key: "your_rhc_activation_key"
EOF

How-To

To Deploy

ansible-playbook -i inventory myplaybook.yml --extra-vars "@your_vars.yml"

Create device group on the redhat console website

https://console.redhat.com/edge/fleet-management

 ansible-playbook -i inventory myplaybook.yml --extra-vars "@your_vars.yml" - -t create_device_group

Create and build rhel image on redhat console.

https://console.redhat.com/edge/manage-images

 ansible-playbook -i inventory myplaybook.yml --extra-vars "@your_vars.yml" -t build_image

Wait for build to complete

https://console.redhat.com/edge/manage-images

 ansible-playbook -i inventory myplaybook.yml --extra-vars "@your_vars.yml" -t get_build_status

Download ISO from redhat console

https://console.redhat.com/edge/manage-images

 ansible-playbook -i inventory myplaybook.yml --extra-vars "@your_vars.yml" -t download_latest_iso

Auto register vms so they will populate on

https://console.redhat.com/insights/inventory/

 ansible-playbook -i inventory myplaybook.yml --extra-vars "@your_vars.yml" -t configure_auto_registration

Currently WIP

  • Update images
  • custom kickstart integration

API Documentation

https://console.redhat.com/docs/api/edge

Links

License

BSD

Author Information

Tosin Akinosho