-
Notifications
You must be signed in to change notification settings - Fork 4
Sharing IDS Between Aeolus and Katello
It is a requirment of Katello to be able to determin if a given instance is being managed by Aeolus. Katello has an agent that will be running in the instance which can collect facts.
During boot time the Aeolus Audrey Start Agent will notify the Katello agent that the system is being manage by Aeolus by storing data as JSON facts for Katello to consume.
The IDs to be provided by Aeolus’s Audrey Agent for Katello to consume are: instance_uuid and image_uuid
The data used for the instance_UUID will be that which is generated by the Aeolus Config Server for the instance and passed to it down through the user data.
This data and the mechanism to make it available to the instance is already in place.
The image_UUID will be data stored in the image, at image construction, by imagefactory.
The mechanism for making this data available to the instance is not currently in place.
Imagefactory would have to be updated to store this data in the image, perhaps using oz as the mechanism for injecting it.
Support for making the image_UUID avaible is not required for version 1.0.
- Conductor/Config Server
- Audrey Agent
- Katello Agent
- Imagefactory
Currently the Config Server generates an instance UUID as a contract between the Config Server and the Audrey agent.
This will be expanded so the UUID is stored in the database whenever a new instance object is created. At launch time, one of the parameters that the
conductor automatically inserts will be the UUID, and then at boot will be passed to the Audrey agent in the user data.
This means a method will need to be added to the conductor REST implementation to look up instances by UUID, which is already under consideration.
The Audrey Agent will use a tooling script to create the JSON “facts” file: /etc/rhsm/facts/aeolus.facts
In order for this to happen the user must specify the tooling script for a service in the Deployable.XML when launching the Deployment.
Examples of the tooling required to create the JSON “facts” file can be found in the tooling_examples
directory of the Audrey source tree here:
> https://github.com/aeolusproject/audrey/tree/master/tooling_examples
> An example of the Deployable.XML is:
> > https://github.com/aeolusproject/audrey/blob/master/tooling_examples/katello_example_deployable.xml
>
> This example Deployable.XML shows two Services,
> > * One to create the JSON “facts” file for Katello.
> > * The other is used to show how multiple services can be started and simply logs some information.
>
> An example of the tooling script is for creating the JSON “facts” file for Katello:
> > https://github.com/aeolusproject/audrey/blob/master/tooling_examples/katello_start.bash
>
> An example of the simple tooling script:
> > https://github.com/aeolusproject/audrey/blob/master/tooling_examples/simple_start.bash
Using the provided, katello_start.bash, tooling script with the provided, katello_example_deployable.xml, Deployable.XML, the Audrey agent will invoke the tooling to create the JSON “facts” file: /etc/rhsm/facts/aeolus.facts
With the content of the form: {"fact1": “value1”,“fact2”: "value2"}
For example:
% cat /etc/rhsm/facts/aeolus.facts
{"instance_uuid":“7634fa9a-f042-11e0-80e0-52540020e3d1”,“image_uuid”:“a70fc2a0-8a5a-46ec-bed9-c069d3ce4399”}
Katello’s agent (susbcription-manager) will look for the JSON “facts” file
generated by the Audrey Agent and record the content as as facts:
aeolus_instance_uuid = XYZ
aeolus_image_uuid = PDQ
The absence of the JSON “facts” file will be treated as the indicator that the instance is not managed by Aeolus.
For version 1.0 the Audrey and Katello agents will both be updated to provide the functionality required for sharing the instance_UUID.
For a future release Conductor and Imagefactory will require updates to provide the functionality required for sharing the image_UUID. Once in place the Audrey and Katello agents will also be updated.