stejzyy23

Katello-client-bootstrap workflow

Jul 14th, 2020
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. curl -O https://raw.githubusercontent.com/Katello/katello-client-bootstrap/master/bootstrap.py
  2. DOC: pydoc ./bootstrap.py
  3. Workflow: awk -F'# >' 'NF>1 {print $2}' ./bootstrap.py
  4.  
  5. Register our better HTTP processor as default opener for URLs.
  6. Gather MAC Address.
  7. Gather API port (HTTPS), ARCHITECTURE and (OS) RELEASE
  8. Define and parse the options
  9. Validate that the options make sense or exit with a message.
  10. Gather FQDN, HOSTNAME and DOMAIN using options.fqdn
  11. If socket.fqdn() returns an FQDN, derive HOSTNAME & DOMAIN using FQDN
  12. else, HOSTNAME isn't an FQDN
  13. if user passes --fqdn set FQDN, HOSTNAME and DOMAIN to the parameter that is given.
  14. Exit if DOMAIN isn't set and Puppet must be installed (without force)
  15. Gather primary IP address if none was given
  16. Ask for the password if not given as option
  17. If user wants to purge profile from RHN/Satellite 5, credentials are needed.
  18. Puppet won't be installed if Foreman Host shall not be created
  19. Output all parameters if verbose.
  20. Exit if the user isn't root.
  21. Check if Katello/Spacewalk/Satellite are installed already
  22. Try to import json or simplejson.
  23. Clean the environment from LD_... variables
  24. IF RHEL 5, not removing, and not moving to new capsule prepare the migration.
  25. IF remove, disassociate/delete host, unregister,
  26. uninstall katello and optionally puppet agents
  27. ELIF registered to RHN, install subscription-manager prerequs
  28. get CA RPM, optionally create host,
  29. migrate via rhn-classic-migrate-to-rhsm
  30. ELIF new_capsule and foreman_fqdn set, will migrate to other capsule
  31. will replace CA certificate, reinstall katello-agent, gofer
  32. will optionally update hostgroup and location
  33. wil update system definition to point to new capsule for content,
  34. Puppet, OpenSCAP and update Puppet configuration (if applicable)
  35. MANUAL SIGNING OF CSR OR MANUALLY CREATING AUTO-SIGN RULE STILL REQUIRED!
  36. API doesn't have a public endpoint for creating auto-sign entries yet!
  37. ELSE get CA RPM, optionally create host,
  38. register via subscription-manager
  39. IF not removing, install Katello agent, optionally update host,
  40. optionally clean and install Puppet agent
  41. optionally remove legacy RHN packages
Advertisement
Add Comment
Please, Sign In to add comment