Thanks for the info Greg, some thoughts and info below.
>
>
>
>>
>>> Eric - apologies for the extended delay on this!
>>>
>>>>
>>>>
>>>> <snip>
>>>>
>>> I assume your are looking into this but don't have a strategy in place
>>>> yet. Have you investigated or do you have proposals on how you might do
>>>> this? I have been investigating solutions myself and am curious what others
>>>> are doing/trying.
>>>>
>>>> Eric
>>>>
>>>
>>> We have more of a strategy now than we did a month ago :-). We have some
>>> (rough) scripting in place which will generate the templates for products
>>> (and publish the CV's to all LC envs etc). We are now working to convert
>>> all these to API based scripts as hammer is proving to be less than ideal
>>> for this - they've grown organically. We are also doing likewise with
>>> scripting to create a new OS and to create the initial layout of locations
>>> (we will tie this into an internal data source for this). So fundamentally
>>> we'd end up with roughly the following:
>>>
>>> 1. Base structure creation scripts
>>> 1. Setup settings, lifecycles, base roles, auth sources, capsule
>>> mappings etc.
>>> 2. Metadata sync scripting
>>> 1. Synchronize metadata (locations etc) from external data
>>> sources.
>>> 3. OS creation / maintenance scripts
>>> 1. Create / sync OS from RHN (RHEL 7.2 f.e.)
>>> 2. Create CV_<os>, promote to all LC's.
>>> 3. Create activation keys, gpg keys
>>> 4. Create hostgroups structure according to above
>>> 4. Product creation / maintenance scripts
>>> 1. Create products, repositories
>>> 2. Create CV_<product> and CCV_<os>_<product>, promote to all LC's
>>> 3. Create activation kets, gpg keys
>>> 4. Create hostgroups
>>> 5. Create roles
>>>
>>> The idea behind the maintenance scripts would be to keep Sat up to date.
>>> So if a location was added we would create new objects etc.
>>>
>>
>>
> So it looks like I'm going down a very similar route to Andrew. We have a
> collection of bash wrappers of the hammer commands for building out the
> base of everything. I'm just getting started on the process of writing our
> publishing and promotion bits and in bash using hammer its quite meh.
>
> to add to the pool of answers for this:
>
>
>> If you don't mind sharing, we'd be curious to know:
>>
>> 1) Where does hammer fail you in building scripts for this work?
>>
> Some of the data needed for certain tasks is difficult to gather
> effectively. For instance…
>
> Update a content view in a composite view and promote to the next version
> you need to know:
> * what version was cut
> * what that version's component id is
> * the component id of all the existing content views in the composite view
>
> I am working on evaluating using the hammer csv plugin to see if that
> negates some of the things, but i remember being told it doesn't cover
> several items.
>
This has been a major area of feedback we've seen and will be making a
point of focus for the 3.1+ releases to improve the content view
experience. You'll likely here references to SOE (standard operating
environment) V2 effort that will be tackling these usability issues.
>
> 2) When using the API, are you using your own custom API wrapper? existing
>> libraries?
>>
> We've been talking about writing an ansible module for this but it hasn't
> been high enough on our priority list. This would might mean writing a
> simple api wrapper to include in ansible rather than depending on
> python-foreman, just to simplify the dependency chain for the katello
> subset.
>
I have been playing around with an Ansible module and playbook to mirror
and easily recreate our release entities within the application. I have not
put it anywhere public yet, but if you are interested in collaborating, I
can work on putting it up somewhere.
>
> 3) What programming language do you write your scripts in?
>>
> we prefer python, but have been writing these in bash since just calling
> hammer
>
The above mentioned Ansible module makes use of a python library that the
Satellite QE team works on and uses heavily called Nailgun [1]. This
creates an API wrapper in python around both the Foreman and plugin
ecosystem as well as the Satellite ecosystem. Further, there is a side
library that a member of the oVirt team has been working on to create a DSL
of sorts to managing entities [2]. If you are interested on seeing this
expanded more into the community, or would like more information please let
me know and I'd be happy to collaborate.
[1] https://pypi.python.org/pypi/nailgun/
[2] https://github.com/ifireball/python-satellite-dsl
>
>> 4) What generally makes building a set of entity maintenance scripts
>> hard? From the scripting perspective and from the "API makes this hard"
>> perspective?
>>
>
> Time. There is so many pieces to implementing this workflow that its a
> lot of poking and prodding. I found the composite view documentation
> lacking for what i described above.
>
>
>> 5) Do you use any tools to automate this or manage it? e.g. Jenkins,
>> Ansible, Puppet
>>
> I'm planning on running most of the bits from inside jenkins. Ansible
> would only come in if we go the module path.
>
The Satellite QE team also maintains all of their Jenkins jobs upstream in
an effort to be open source about the mechanisms in case it helps to
contribute to user workflows. Part of these jobs are installation, test
suite jobs they run against upstream and release jobs that use a dogfood
server to handle release repositories (the hope is to mirror this for some
upstream releasing too). Might be useful to peruse as it contains job
configurations for syncing, promoting and publishing content and pipelining
them together.
If there are workflows, tasks, etc. you'd be interested in learning about
or seeing more work put into for community use we'd love to hear about them.
[3] https://github.com/SatelliteQE/robottelo-ci
···
On Mon, May 9, 2016 at 1:33 PM, Greg Swift wrote:
> On Sat, May 7, 2016 at 9:08 AM Eric D Helms wrote:
>> On Thu, May 5, 2016 at 10:23 PM, Andrew Schofield >> wrote:
>>> On Wednesday, March 30, 2016 at 9:52:45 PM UTC-4, Eric Helms wrote:
-greg
–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.
–
Eric D. Helms
Red Hat Engineering
Ph.D. Student - North Carolina State University