[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] puppet friendly install process (rc script patch)



We deploy Pulp with Bcfg2, which is in the same solution space as
Puppet.  Bcfg2 has the notion of "bundles," which are basically groups
of configuration entries.  It has a facility to perform actions when
any element in a bundle is updated, so we just have our Pulp bundle
run pulp-migrate any time any other entry in the bundle -- including,
most importantly, the Pulp packages -- is updated.  AFAICT
pulp-migrate is idempotent, so this seems to work just fine, even if
pulp-migrate gets run (uselessly, and without effect) every time, say,
pulp.conf is updated.  Presumably Puppet has the ability to do
something similar.

On Mon, Feb 27, 2012 at 6:50 PM, Jason L Connor <jconnor redhat com> wrote:
> Hi Ryan,
>
> Thank you for the patch. However, with Fedora having moved to systemd
> and the systemctl command, we're going to move away from this solution
> entirely.
>
> We're still not entirely sure what out initialization and startup will
> look like in the future. So I'm unable to present a solution.
>
> We'll keep the community informed as get to these changes.
>
> On Sun, 2012-02-26 at 17:55 -0800, Ryan Bowlby wrote:
>> ugh..
>>
>> --- pulp-server    2012-02-24 11:34:11.000000000 -0800
>> +++ pulp-server.new    2012-02-24 23:31:54.065061046 -0800
>> @@ -30,16 +30,15 @@
>>      $SERVICE mongod start
>>      /usr/bin/pulp-migrate
>>      RETVAL=$?
>> -    [ $RETVAL = 0 ] && touch ${init_file}
>> +    if [ $RETVAL = 0 ]; then
>> +        touch ${init_file}
>> +        echo "Initialized Pulp database."
>> +    fi
>>      return $RETVAL
>>  }
>>
>>  start() {
>> -    if [ ! -f $init_file ]; then
>> -        echo $"Pulp database not initialized, please run: $0 init"
>> -        RETVAL=2
>> -        return $RETVAL
>> -    fi
>> +    [ ! -f $init_file ] && init
>>      $SERVICE mongod start || RETVAL=$?
>>      [ $RETVAL = 0 ] && $SERVICE qpidd start || RETVAL=$?
>>      [ $RETVAL = 0 ] && $SERVICE httpd start || RETVAL=$?
>>
>>
>>
>>
>> ----- Original Message -----
>> > From: Ryan Bowlby <rbowlby83 yahoo com>
>> > To: "pulp-list redhat com" <pulp-list redhat com>
>> > Cc:
>> > Sent: Sunday, February 26, 2012 5:51 PM
>> > Subject: [Pulp-list] puppet friendly install process (rc script patch)
>> >
>> >
>> >
>> > Hi All,
>> >
>> > I'm performing an initial Pulp install and decided to create a puppet module
>> > at the same time. The install instructions call for running
>> > "/etc/init.d/pulp init" before initial start. This is not very puppet
>> > friendly and also doing so manually seems like a superfluous step. Instead, why
>> > not just have the rc script perform this step if the init_file is not present?
>> > I've created the below patch, as this would make the install process more
>> > intuitive and the puppet module cleaner.
>> >
>> > --- pulp-server    2012-02-24 11:34:11.000000000 -0800
>> > +++ pulp-server.new    2012-02-24 23:24:46.984969522 -0800
>> > @@ -30,16 +30,14 @@
>> >      $SERVICE mongod start
>> >      /usr/bin/pulp-migrate
>> >      RETVAL=$?
>> > -    [ $RETVAL = 0 ] && touch ${init_file}
>> > +    if [ $RETVAL = 0 ]; then
>> > +        touch ${init_file}
>> > +        echo "Initialized Pulp database."
>> >      return $RETVAL
>> >  }
>> >
>> >  start() {
>> > -    if [ ! -f $init_file ]; then
>> > -        echo $"Pulp database not initialized, please run: $0 init"
>> > -        RETVAL=2
>> > -        return $RETVAL
>> > -    fi
>> > +    [ ! -f $init_file ] && init
>> >      $SERVICE mongod start || RETVAL=$?
>> >      [ $RETVAL = 0 ] && $SERVICE qpidd start || RETVAL=$?
>> >      [ $RETVAL = 0 ] && $SERVICE httpd start || RETVAL=$?
>> >
>> >
>> > Thanks,
>> > Ryan Bowlby
>> >
>> > _______________________________________________
>> > Pulp-list mailing list
>> > Pulp-list redhat com
>> > https://www.redhat.com/mailman/listinfo/pulp-list
>> >
>>
>> _______________________________________________
>> Pulp-list mailing list
>> Pulp-list redhat com
>> https://www.redhat.com/mailman/listinfo/pulp-list
>
> --
> Jason L Connor
> linear on freenode #pulp
> http://pulpproject.org/
> RHCE: 805010912355231
> GPG Fingerprint: 2048R/CC4ED7C1
>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list redhat com
> https://www.redhat.com/mailman/listinfo/pulp-list
>



-- 
Chris St. Pierre


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]