##What I had to do to get it installed:
##Make Sure the /etc/hosts is right
127.0.0.1 mul72.hohenfels.com mul72 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 mul72.hohenfels.com mul72 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.19 mul72.hohenfels.com mul72
##Made Sure everything was updated
sudo yum update
##Ran the Installer: Made sure under capsule (4) that TFTP was set to TRUE and that the DNS settings are correct.
sudo katello-installer -i Welcome to the Kafo installer! ------------------------------ This wizard will gather all required information. You can change any parameter to your needs. Ready to start? (y/n) y Main Config Menu 1. [?] Configure certs 2. [?] Configure katello 3. [?] Configure foreman 4. [?] Configure capsule 5. [?] Configure foreman_plugin_bootdisk 6. [?] Configure foreman_plugin_discovery 7. [?] Configure foreman_plugin_hooks 8. [?] Configure foreman_plugin_tasks 9. [?] Configure foreman_plugin_chef 10. [?] Configure foreman_plugin_default_hostgroup 11. [?] Configure foreman_plugin_puppetdb 12. [?] Configure foreman_plugin_setup 13. [?] Configure foreman_plugin_templates 14. Display current config 15. Save and run 16. Cancel run without Saving Chance all to a check and change 1 15 to go
##To get LibVirt/KVM going as a Compute Resource:
To provision systems on KVM using Red Hat Satellite 6 follow the below steps
- Create a .ssh directory under /usr/share/foreman and assign permissions as below.
[user@satellite ~]# sudo mkdir /usr/share/foreman/.ssh [user@satellite ~]# sudo chmod 700 /usr/share/foreman/.ssh [user@satellite ~]# sudo chown foreman:foreman /usr/share/foreman/.ssh
- Create ssh keys for foreman user to login to the KVM host.
[user@satellite ~]# sudo su - foreman -s /bin/bash bash-4.1$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/usr/share/foreman/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /usr/share/foreman/.ssh/id_rsa. Your public key has been saved in /usr/share/foreman/.ssh/id_rsa.pub. The key fingerprint is: 48:d2:f5:5b:2a:63:7e:ae:a3:c6:31:54:d2:33:21:25 foreman@satellite.example.com The key's randomart image is: +--[ RSA 2048]----+ | Eo+. | | ..+=. | | . oo o. . | | o.. + | | .. S o | | oo o | | . o. . | | o .o | | ....o. | +-----------------+ bash-4.1$ ssh-copy-id root@kvm.example.com The authenticity of host 'kvm.example.com (192.168.1.2)' can't be established. RSA key fingerprint is b8:4c:bf:8a:df:70:e1:2b:71:a1:6f:0a:d2:f9:2f:2a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'kvm.example.com' (RSA) to the list of known hosts. root@kvm.example.com's password: Now try logging into the machine, with "ssh 'root@kvm.example.com'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting. bash-4.1$ ssh root@kvm.example.com Last login: Fri Dec 5 23:34:35 2014 from host.example.com [root@kvm ~]# exit
- If SELinux is in enforcing mode, then restore the SELinux context for /usr/share/foreman/.ssh/ folder.
[user@satellite ~]# sudo restorecon -Rv /usr/share/foreman/.ssh/
- Make sure that KVM packages are installed on the KVM host and libvirtd service is running.
[user@kvm ~]# sudo service libvirtd status -----> On RHEL 6 [user@kvm ~]# sudo systemctl status libvirtd.service -----> On RHEL 7
Note: If KVM is not installed, install the packages as below on the KVM host
[user@kvm ~]#sudo yum install qemu-kvm libvirt virt-install bridge-utils virt-manager -y
- Start the libvirtd service as below
[user@kvm ~]#sudo service libvirtd start -----> on RHEL 6 [user@kvm ~]#sudo systemctl start libvirtd.service -----> on RHEL 7
- Enable the libvirtd service on boot
[user@kvm ~]#sudo chkconfig libvirtd on ---> on RHEL 6 [user@kvm ~]#sudo systemctl enable libvirtd.service ---> on RHEL 7
- On satellite 6 webUI —–> Infrastructure —–> Compute resources —> Click on New Compute Resource
Specify Name —–> My KVM Host
Select Provider —–> Libvirt
Specify URL —–> qemu+ssh://root@kvm.example.com/system
Click Test Connection - Finally provision a host using the above created Libvirt compute resource.
https://access.redhat.com/solutions/1288483
##Setting up HammerCLI
##Create the Directories
mkdir ~/.hammer chmod 700 ~/.hammer
##Create a cli_config.yml file in the new directory
vi ~/.hammer/cli_config.yml :foreman: :host: 'https://xxx' :username: 'admin' :password: 'xxx'
##Run it:
hammer shell
##I was getting a pulp-admin ssl error
pulp-admin -u erik -p password tasks cancel --task-id "7aa48f52-a6be-4c08-9810-16dd3a06d930" WARNING: The server's SSL certificate is untrusted! The server's SSL certificate was not signed by a trusted authority. This could be due to a man-in-the-middle attack, or it could be that the Pulp server needs to have its certificate signed by a trusted authority. If you are willing to accept the associated risks, you can set verify_ssl to False in the client config's [server] section to disable this check.
Here is how I fixed it – Not Secure:
Pulp has a setting called verify_ssl in these files: /etc/pulp/admin/admin.conf, /etc/pulp/consumer/consumer.conf, /etc/pulp/nodes.conf, and /etc/pulp/repo_auth.conf. If you configure these settings to false, the respective Pulp components will no longer validate the Pulp server's certificate signature.
REF: https://github.com/pulp/pulp/blob/master/docs/user-guide/installation.rst
#
