Generate "Compiled catalog"/yaml for a node?

瀏覽次數:2,759 次
跳到第一則未讀訊息

Yushu Yao

未讀,
2011年5月6日 下午4:59:472011/5/6
收件者:puppet-users
Hi Experts,

I remember we had this discussion before, but could find it.

Can I run a command to generate a "Compiled catalog" for a specific node (on the master node)? And apply this on the client node? What are the limitations for doing this?

Basically we have special handling for the webserver/CA part of puppet.

Thank you very much!

-Yushu

+-------------------------------------------------+
| Yushu Yao
| Ph:1-510-486-4690 
|
| Lawrence Berkeley National Lab
| Mailstop 50B-6222
| 1 Cyclotron Road
| Berkeley CA 94720-8147 - USA
+-------------------------------------------------+


Nan Liu

未讀,
2011年5月6日 下午5:12:002011/5/6
收件者:puppet...@googlegroups.com
On Fri, May 6, 2011 at 8:59 PM, Yushu Yao <yao....@gmail.com> wrote:
> Hi Experts,
>
> I remember we had this discussion before, but could find it.
>
> Can I run a command to generate a "Compiled catalog" for a specific node (on
> the master node)? And apply this on the client node? What are the
> limitations for doing this?

Compiling the catalog is straightfoward. The tricky issues are syncing
facts, and uploading facts from agent to master, and you need to have
means to distribute files out of band to the agent without it
requesting via https from the master. (local mount nfs, rsync to
local, probably some other creative ways I haven't thought of.)

Past threads:
https://groups.google.com/group/puppet-users/browse_thread/thread/871d3e6f7dde759e/b63bdb45eaa71db6?lnk=gst&q=catalog+dmz#b63bdb45eaa71db6

Thanks,

Nan

Patrick

未讀,
2011年5月6日 下午5:22:132011/5/6
收件者:puppet...@googlegroups.com

On May 6, 2011, at 1:59 PM, Yushu Yao wrote:

> Hi Experts,
>
> I remember we had this discussion before, but could find it.
>
> Can I run a command to generate a "Compiled catalog" for a specific node (on the master node)? And apply this on the client node? What are the limitations for doing this?
>
> Basically we have special handling for the webserver/CA part of puppet.
>
> Thank you very much!
>
> -Yushu


1) You can generate the catalog using "puppet master --verbose --compile computer.name.domain_name"
2) Anything that uses "puppet:///whatever" won't work, unless the client can connect to the master.

Yushu Yao

未讀,
2011年5月6日 下午5:43:412011/5/6
收件者:puppet...@googlegroups.com
Thanks.



1) You can generate the catalog using "puppet master --verbose --compile computer.name.domain_name"
2) Anything that uses "puppet:///whatever" won't work, unless the client can connect to the master.
Does this mean the file templates will not work as well?

Thanks.
 

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Daniel Pittman

未讀,
2011年5月6日 下午5:48:072011/5/6
收件者:puppet...@googlegroups.com
On Fri, May 6, 2011 at 14:43, Yushu Yao <yy...@lbl.gov> wrote:

>> 1) You can generate the catalog using "puppet master --verbose --compile
>> computer.name.domain_name"
>> 2) Anything that uses "puppet:///whatever" won't work, unless the client
>> can connect to the master.
>
> Does this mean the file templates will not work as well?

They work fine; so does file 'content'; just 'source' doesn't work
without communication to the master.

You might also want to look at moonshine and shadow puppet, both built
atop Puppet: https://github.com/railsmachine/moonshine/wiki/shadow-puppet-overview-and-examples

Regards,
Daniel
--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <dan...@puppetlabs.com>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

Yushu Yao

未讀,
2011年5月7日 凌晨1:50:542011/5/7
收件者:puppet...@googlegroups.com
Thanks Folks for the answers.

Before I go into this direction, I just want to make sure one thing from the developers:

Is this a feature that you think will stay inside puppet? (in 3.0, 4.0, etc)

Or has there been any discussion to remove this feature?

Feel safer if I know this feature will stay long. Thanks


-Yushu


+-------------------------------------------------+
| Yushu Yao
| Ph:1-510-486-4690 
|
| Lawrence Berkeley National Lab
| 1 Cyclotron Road
| Berkeley CA 94720 - USA
+-------------------------------------------------+





--

Nigel Kersten

未讀,
2011年5月7日 中午12:00:012011/5/7
收件者:puppet...@googlegroups.com
On Sat, May 7, 2011 at 5:50 AM, Yushu Yao <yy...@lbl.gov> wrote:
Thanks Folks for the answers.

Before I go into this direction, I just want to make sure one thing from the developers:

Is this a feature that you think will stay inside puppet? (in 3.0, 4.0, etc)

Or has there been any discussion to remove this feature?

Feel safer if I know this feature will stay long. Thanks


You're only going to see more flexible control over out of band catalog compilation like this Yushu, not less.

We won't be removing this feature, we'll be improving it.


 
--
Nigel Kersten
Product, Puppet Labs
@nigelkersten

Yushu Yao

未讀,
2011年5月23日 晚上7:21:382011/5/23
收件者:puppet...@googlegroups.com
One Follow up question:

how do I apply the compiled catalog on the client?

The yaml I get from puppet master --compile is like:
cat mytest.yaml
{
  "data": {
    "edges": [
      {
        "target": "Class[main]",
        "source": "Stage[main]"
.... ...
}

If I do on the client: puppet apply --test --debug mytest.yaml, I get
Could not parse for environment production: Syntax error at '{'; expected '}' at /root/mytest.yaml:1 on node 192.168.2.199

Am I missing anything?

Thanks a lot!


-Yushu

+-------------------------------------------------+
| Yushu Yao
| Ph:1-510-486-4690 
|
| Lawrence Berkeley National Lab
| 1 Cyclotron Road
| Berkeley CA 94720 - USA
+-------------------------------------------------+





--

Nan Liu

未讀,
2011年5月23日 晚上7:41:362011/5/23
收件者:puppet...@googlegroups.com
On Mon, May 23, 2011 at 4:21 PM, Yushu Yao <yy...@lbl.gov> wrote:
> One Follow up question:
>
> how do I apply the compiled catalog on the client?
>
> The yaml I get from puppet master --compile is like:
> cat mytest.yaml
> {
>   "data": {
>     "edges": [
>       {
>         "target": "Class[main]",
>         "source": "Stage[main]"
> .... ...
> }
>
> If I do on the client: puppet apply --test --debug mytest.yaml, I get
> Could not parse for environment production: Syntax error at '{'; expected
> '}' at /root/mytest.yaml:1 on node 192.168.2.199

Not the most intuitive thing, puppet apply -t -d --apply mytest.yaml.
Most likely will get expired catalog, but that can either be updated
by changing expire datetime in the catalog, or controlling expiration
using --runinterval (it's overloading the same option for two
purpose).

HTH,

Nan

Yushu Yao

未讀,
2011年5月23日 晚上11:08:062011/5/23
收件者:puppet...@googlegroups.com
That works.

Thanks a lot@
-yushu


+-------------------------------------------------+
| Yushu Yao
| Ph:1-510-486-4690 
|
| Lawrence Berkeley National Lab
| 1 Cyclotron Road
| Berkeley CA 94720 - USA
+-------------------------------------------------+




回覆所有人
回覆作者
轉寄
0 則新訊息