[katello] Auto-publish Content-view

I'm a little confused by the documentation which says: "A Content Host can
now register directly to library and be attached to the content therein.
Updates will be available as soon as new content is synced or uploaded."

I have to assume this means that if attached to "Default Organizational
View", the updates are immediately available. Otherwise, when attached to
a content-view in "Library", I have to republish to see the updates.

In any case, assuming my Katello instance is working the way it's supposed
to, has anyone come up with a way to automate the publishing of
content-views, and the updating of composite views with the new version
numbers? I was going to try to script it, but hammer doesn't like it when
I try to awk things out.

Perhaps someone has a better way of organizing content-views too to make
publishing much easier. I have a large number of content views because I
use them to separate views for different system types.

As an aside, it would be great if by attaching to ANY library view, I could
get updates immediately, is there any intent on allowing this in the future?

Thanks.

> I'm a little confused by the documentation which says: "A Content Host can
> now register directly to library and be attached to the content therein.
> Updates will be available as soon as new content is synced or uploaded."
>
> I have to assume this means that if attached to "Default Organizational
> View", the updates are immediately available. Otherwise, when attached to
> a content-view in "Library", I have to republish to see the updates.

Right that only applies to the default organization view.

> In any case, assuming my Katello instance is working the way it's supposed
> to, has anyone come up with a way to automate the publishing of
> content-views, and the updating of composite views with the new version
> numbers? I was going to try to script it, but hammer doesn't like it when
> I try to awk things out.

There's some examples of hammer commands in our testing which uses
hammer: forklift/bats at master ¡ theforeman/forklift ¡ GitHub

See this for example:
https://github.com/Katello/katello-deploy/blob/master/bats/fb-content-katello.bats#L66

> Perhaps someone has a better way of organizing content-views too to make
> publishing much easier. I have a large number of content views because I
> use them to separate views for different system types.

Red Hat Consulting has done this for Satellite (a packaged supported
product built on Katello):
GitHub - RedHatSatellite/soe-ci: Jenkins integration scripts for use in an SOE Build Factory based on Red Hat Satellite 6.

You might find their stuff useful. There's a lot of stuff in there for
automating things with Jenkins. One of these days when I have time, I
want to bring that into the community and write up some docs about using
it with Katello.

> As an aside, it would be great if by attaching to ANY library view, I could
> get updates immediately, is there any intent on allowing this in the future?

I think that's a neat idea:
Foreman

¡¡¡ On Fri, Jan 09, 2015 at 05:42:42AM -0800, Garrett DeMarco wrote:

Thanks.

–
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 http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

–
Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht MĂźnchen, HRB 153243
Geschäftsfßhrer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters

Thanks, i'll look into these. I've submitted a new feature request as you
suggested.

I appreciate the feedback.

¡¡¡ On Friday, January 9, 2015 at 10:20:46 AM UTC-5, Stephen Benjamin wrote: > > On Fri, Jan 09, 2015 at 05:42:42AM -0800, Garrett DeMarco wrote: > > I'm a little confused by the documentation which says: "A Content Host > can > > now register directly to library and be attached to the content therein. > > Updates will be available as soon as new content is synced or uploaded." > > > > I have to assume this means that if attached to "Default Organizational > > View", the updates are immediately available. Otherwise, when attached > to > > a content-view in "Library", I have to republish to see the updates. > > Right that only applies to the default organization view. > > > In any case, assuming my Katello instance is working the way it's > supposed > > to, has anyone come up with a way to automate the publishing of > > content-views, and the updating of composite views with the new version > > numbers? I was going to try to script it, but hammer doesn't like it > when > > I try to awk things out. > > > There's some examples of hammer commands in our testing which uses > hammer: https://github.com/Katello/katello-deploy/tree/master/bats > > See this for example: > > https://github.com/Katello/katello-deploy/blob/master/bats/fb-content-katello.bats#L66 > > > Perhaps someone has a better way of organizing content-views too to make > > publishing much easier. I have a large number of content views because > I > > use them to separate views for different system types. > > Red Hat Consulting has done this for Satellite (a packaged supported > product built on Katello): > https://github.com/RedHatEMEA/soe-ci > > You might find their stuff useful. There's a lot of stuff in there for > automating things with Jenkins. One of these days when I have time, I > want to bring that into the community and write up some docs about using > it with Katello. > > > As an aside, it would be great if by attaching to ANY library view, I > could > > get updates immediately, is there any intent on allowing this in the > future? > > I think that's a neat idea: > http://projects.theforeman.org/projects/katello/issues/new > > > Thanks. > > > > -- > > 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-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > -- > Stephen Benjamin > > ______________________________________________________ > Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn > Handelsregister: Amtsgericht Mßnchen, HRB 153243 > Geschäftsfßhrer: Charles Cachera, Michael Cunningham, > Michael O'Neill, Charles Peters > > >

Hey GD,

have you ever figured out how to publish the composite view with the latest
version of child views ( after uploading new content to repo and publishing
the view )?
thanks.

¡¡¡ On Friday, January 9, 2015 at 7:35:24 PM UTC+1, GD wrote: > > Thanks, i'll look into these. I've submitted a new feature request as you > suggested. > > I appreciate the feedback. > > On Friday, January 9, 2015 at 10:20:46 AM UTC-5, Stephen Benjamin wrote: >> >> On Fri, Jan 09, 2015 at 05:42:42AM -0800, Garrett DeMarco wrote: >> > I'm a little confused by the documentation which says: "A Content Host >> can >> > now register directly to library and be attached to the content >> therein. >> > Updates will be available as soon as new content is synced or >> uploaded." >> > >> > I have to assume this means that if attached to "Default Organizational >> > View", the updates are immediately available. Otherwise, when attached >> to >> > a content-view in "Library", I have to republish to see the updates. >> >> Right that only applies to the default organization view. >> >> > In any case, assuming my Katello instance is working the way it's >> supposed >> > to, has anyone come up with a way to automate the publishing of >> > content-views, and the updating of composite views with the new version >> > numbers? I was going to try to script it, but hammer doesn't like it >> when >> > I try to awk things out. >> >> >> There's some examples of hammer commands in our testing which uses >> hammer: https://github.com/Katello/katello-deploy/tree/master/bats >> >> See this for example: >> >> https://github.com/Katello/katello-deploy/blob/master/bats/fb-content-katello.bats#L66 >> >> > Perhaps someone has a better way of organizing content-views too to >> make >> > publishing much easier. I have a large number of content views because >> I >> > use them to separate views for different system types. >> >> Red Hat Consulting has done this for Satellite (a packaged supported >> product built on Katello): >> https://github.com/RedHatEMEA/soe-ci >> >> You might find their stuff useful. There's a lot of stuff in there for >> automating things with Jenkins. One of these days when I have time, I >> want to bring that into the community and write up some docs about using >> it with Katello. >> >> > As an aside, it would be great if by attaching to ANY library view, I >> could >> > get updates immediately, is there any intent on allowing this in the >> future? >> >> I think that's a neat idea: >> http://projects.theforeman.org/projects/katello/issues/new >> >> > Thanks. >> > >> > -- >> > 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-user...@googlegroups.com. >> > To post to this group, send email to forema...@googlegroups.com. >> > Visit this group at http://groups.google.com/group/foreman-users. >> > For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> Stephen Benjamin >> >> ______________________________________________________ >> Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn >> Handelsregister: Amtsgericht Mßnchen, HRB 153243 >> Geschäftsfßhrer: Charles Cachera, Michael Cunningham, >> Michael O'Neill, Charles Peters >> >> >>

Hi Robert,

Red Hat has a complete guide to build a standard operating environment:
https://access.redhat.com/articles/1585273 (subscriber content)

In the guide you will find most of the commands and functions you are
looking for.

Publishing of composite views with the latest version of child views would
be done like this:

ORG=FLUFFY
function get_cv {
CVID=$(hammer --csv content-view list --name $1 --organization
${ORG} | grep -vi '^Content View ID,' | awk -F',' '{print $1}' )
VID=$(hammer content-view version list --content-view-id ${CVID} |
awk -F'|' '{print $1}' | sort -n | tac | head -n 1)
echo $VID
return 0
}

hammer content-view update --name ccv-common-base-rhel-7Server-x86_64
–organization ${ORG} --component-ids $(get_cv
cv-common-os-rhel-7Server-x86_64),$(get_cv cv-common-custom-puppet)

The function "get_cv" will collect the most current version ids of the
content views "cv-common-os-rhel-7Server-x86_64" and "
cv-common-custom-puppet".

I hope that helps?

Stefan

¡¡¡ On Tuesday, November 3, 2015 at 5:37:10 PM UTC+1, Robert N wrote: > > > Hey GD, > > have you ever figured out how to publish the composite view with the > latest version of child views ( after uploading new content to repo and > publishing the view )? > thanks. > > On Friday, January 9, 2015 at 7:35:24 PM UTC+1, GD wrote: >> >> Thanks, i'll look into these. I've submitted a new feature request as >> you suggested. >> >> I appreciate the feedback. >> >> On Friday, January 9, 2015 at 10:20:46 AM UTC-5, Stephen Benjamin wrote: >>> >>> On Fri, Jan 09, 2015 at 05:42:42AM -0800, Garrett DeMarco wrote: >>> > I'm a little confused by the documentation which says: "A Content Host >>> can >>> > now register directly to library and be attached to the content >>> therein. >>> > Updates will be available as soon as new content is synced or >>> uploaded." >>> > >>> > I have to assume this means that if attached to "Default >>> Organizational >>> > View", the updates are immediately available. Otherwise, when >>> attached to >>> > a content-view in "Library", I have to republish to see the updates. >>> >>> Right that only applies to the default organization view. >>> >>> > In any case, assuming my Katello instance is working the way it's >>> supposed >>> > to, has anyone come up with a way to automate the publishing of >>> > content-views, and the updating of composite views with the new >>> version >>> > numbers? I was going to try to script it, but hammer doesn't like it >>> when >>> > I try to awk things out. >>> >>> >>> There's some examples of hammer commands in our testing which uses >>> hammer: https://github.com/Katello/katello-deploy/tree/master/bats >>> >>> See this for example: >>> >>> https://github.com/Katello/katello-deploy/blob/master/bats/fb-content-katello.bats#L66 >>> >>> > Perhaps someone has a better way of organizing content-views too to >>> make >>> > publishing much easier. I have a large number of content views >>> because I >>> > use them to separate views for different system types. >>> >>> Red Hat Consulting has done this for Satellite (a packaged supported >>> product built on Katello): >>> https://github.com/RedHatEMEA/soe-ci >>> >>> You might find their stuff useful. There's a lot of stuff in there for >>> automating things with Jenkins. One of these days when I have time, I >>> want to bring that into the community and write up some docs about using >>> it with Katello. >>> >>> > As an aside, it would be great if by attaching to ANY library view, I >>> could >>> > get updates immediately, is there any intent on allowing this in the >>> future? >>> >>> I think that's a neat idea: >>> http://projects.theforeman.org/projects/katello/issues/new >>> >>> > Thanks. >>> > >>> > -- >>> > 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-user...@googlegroups.com. >>> > To post to this group, send email to forema...@googlegroups.com. >>> > Visit this group at http://groups.google.com/group/foreman-users. >>> > For more options, visit https://groups.google.com/d/optout. >>> >>> >>> -- >>> Stephen Benjamin >>> >>> ______________________________________________________ >>> Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn >>> Handelsregister: Amtsgericht Mßnchen, HRB 153243 >>> Geschäftsfßhrer: Charles Cachera, Michael Cunningham, >>> Michael O'Neill, Charles Peters >>> >>> >>>
1 Like

Thank you Stefan.

Very nice doc.

¡¡¡ On Wed, Nov 4, 2015 at 9:29 PM, Stefan Meyer wrote:

Hi Robert,

Red Hat has a complete guide to build a standard operating environment:
10 Steps to Build an SOE: How Red Hat Satellite 6 Supports Setting up a Standard Operating Environment - Red Hat Customer Portal (subscriber content)

In the guide you will find most of the commands and functions you are
looking for.

Publishing of composite views with the latest version of child views would
be done like this:

ORG=FLUFFY
function get_cv {
CVID=$(hammer --csv content-view list --name $1 --organization
${ORG} | grep -vi ‘^Content View ID,’ | awk -F’,’ ‘{print $1}’ )
VID=$(hammer content-view version list --content-view-id ${CVID} |
awk -F’|’ ‘{print $1}’ | sort -n | tac | head -n 1)
echo $VID
return 0
}

hammer content-view update --name ccv-common-base-rhel-7Server-x86_64
–organization ${ORG} --component-ids $(get_cv
cv-common-os-rhel-7Server-x86_64),$(get_cv cv-common-custom-puppet)

The function “get_cv” will collect the most current version ids of the
content views “cv-common-os-rhel-7Server-x86_64” and "
cv-common-custom-puppet".

I hope that helps?

Stefan

On Tuesday, November 3, 2015 at 5:37:10 PM UTC+1, Robert N wrote:

Hey GD,

have you ever figured out how to publish the composite view with the
latest version of child views ( after uploading new content to repo and
publishing the view )?
thanks.

On Friday, January 9, 2015 at 7:35:24 PM UTC+1, GD wrote:

Thanks, i’ll look into these. I’ve submitted a new feature request as
you suggested.

I appreciate the feedback.

On Friday, January 9, 2015 at 10:20:46 AM UTC-5, Stephen Benjamin wrote:

On Fri, Jan 09, 2015 at 05:42:42AM -0800, Garrett DeMarco wrote:

I’m a little confused by the documentation which says: “A Content
Host can
now register directly to library and be attached to the content
therein.
Updates will be available as soon as new content is synced or
uploaded.”

I have to assume this means that if attached to “Default
Organizational
View”, the updates are immediately available. Otherwise, when
attached to
a content-view in “Library”, I have to republish to see the updates.

Right that only applies to the default organization view.

In any case, assuming my Katello instance is working the way it’s
supposed
to, has anyone come up with a way to automate the publishing of
content-views, and the updating of composite views with the new
version
numbers? I was going to try to script it, but hammer doesn’t like it
when
I try to awk things out.

There’s some examples of hammer commands in our testing which uses
hammer: forklift/bats at master ¡ theforeman/forklift ¡ GitHub

See this for example:

https://github.com/Katello/katello-deploy/blob/master/bats/fb-content-katello.bats#L66

Perhaps someone has a better way of organizing content-views too to
make
publishing much easier. I have a large number of content views
because I
use them to separate views for different system types.

Red Hat Consulting has done this for Satellite (a packaged supported
product built on Katello):
GitHub - RedHatSatellite/soe-ci: Jenkins integration scripts for use in an SOE Build Factory based on Red Hat Satellite 6.

You might find their stuff useful. There’s a lot of stuff in there for
automating things with Jenkins. One of these days when I have time, I
want to bring that into the community and write up some docs about
using
it with Katello.

As an aside, it would be great if by attaching to ANY library view, I
could
get updates immediately, is there any intent on allowing this in the
future?

I think that’s a neat idea:
Foreman

Thanks.

–
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-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

–
Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht MĂźnchen, HRB 153243
Geschäftsfßhrer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters

–
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 http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.