[Puppet Users] Windows Features/Roles vs. DISM

2013-04-07 Thread Joaquin Menchaca
I was wondering what experiences (or how to get started) with configuring 
features and roles (some of which may require reboot) on Windows 2008R2 
(and other versions) that others might have had.  

Manually, I have experimented with DISM and ServerManagerCmd.exe on 
Win2k8r2.  I found DISM to be quite dismal as it doesn't do any dependency 
resolution, so it can install partial orphaned components, and it's 
multi-line record format is hard to parse.  I found out that 
ServerManagerCmd supports the full dependencies, such that if you install a 
component in the hierarchy, it will install all the prereqs.  Also, if 
there are any cross dependencies, it will resolve those as well, and 
install everything that you would install from the GUI.  And when you print 
out what is installed, it presents it in a checklist tree format that 
matches the GUI and behavior of Windows.

A good scenario is to install ASP.NET, which will require IIS7, and have 
some requirements of features in other areas.

What I would like to have ideally is to have this behavior supported 
somehow, which would be ala RPM-like on Windows.  Any thoughts or 
experiences?

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




[Puppet Users] Windows Installers with EULA agreement GUI

2013-04-07 Thread Joaquin Menchaca
There are a few packages from Microsoft, such as the MVC libraries with 
.NET that we use.  The unfortunate experience is that these have to go 
through a GUI installer that requires the user to AGREE to the EULA.  I was 
wondering if there was a way to bypass the GUI in general and have it 
auto-agree to get these types of packages that require GUI interaction 
installed?


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




[Puppet Users] Debugging a Node form site.pp?

2014-02-11 Thread Joaquin Menchaca
I was wondering is there is a way to see what puppet things a node resource 
is, such as classes it includes.  Somehow in our environment it is picking 
up a class that we did not specify.  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2995e5f1-489e-41df-a114-af3d570c26ec%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Debugging a Node form site.pp?

2014-02-12 Thread Joaquin Menchaca
Is there a way to blow away the cache and refresh?  We don't use ENC in 
this environment, just a simple site.pp, which references nodes.pp.  

Segue, what I like about ENC is that you can call your homegrown script, 
get a yaml of params, classes for that node.  I wish I could get something 
similar with site.pp.  It would just be another level of debugging that 
could prove helpful.

This is what I have in a nutshell (simplified version):

nodes.pp

node /^stg-resque[0-9][0-9].mycompany.com$/ inherits base {
  $packages = [ 'ImageMagick', 'git', 'libxml2-devel', 'libxslt-devel', ... 
]
  include network, nrpe, deployenv, deployenv::rvm, ...
}

The problem, is that there are deployenv, deployenv::passenger, and 
deployenv::rvm.  Somehow, deployenv::passenger is being picked up, even 
though it is not explicitly specified in the nodes.pp.

deployent/manifests/rvm.pp

class deployenv::rvm () {
  exec { gems: ... }
  exec { bundler: ... }
}

deployent/manifests/init.pp

class deployenv {
   group { deploy: ...}
   user { deploy: ...}
   file { .ssh: ...}
   file { deploy_dirs: ... }
}

deployent/manifests/passenger.pp

class deployenv::passenger () {
  file { nginx.conf: ... }
  exec { nginx_install: ...}
}



On Wednesday, February 12, 2014 6:27:15 AM UTC-8, jcbollinger wrote:
>
>
>
> On Tuesday, February 11, 2014 6:05:54 PM UTC-6, Joaquin Menchaca wrote:
>>
>> I was wondering is there is a way to see what puppet things a node 
>> resource is, such as classes it includes.  Somehow in our environment it is 
>> picking up a class that we did not specify.
>>
>
>
> I could believe that you are getting a class that you did not realize you 
> were declaring, or that you did not declare directly in manifest code 
> written by you.  I could believe that the agent is applying a cached 
> catalog that contains a class that once was declared for the target node, 
> but no longer is.  I do not believe that the catalog compiler is randomly 
> throwing in classes that were not in some way declared for the target node.
>
> With that said, it's not altogether clear to me what you're actually 
> asking.  I suspect that what you really want is to determine is where the 
> unexpected class is declared, and for that purpose the 'grep' command is 
> your friend.  Search for the class's unqualified, lowercase name in your 
> manifests and hiera data.  If you use an ENC then you can run that manually 
> and grep for the class name in its output.
>
>
> John
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e4e9efe1-1ac9-432f-a7aa-5a8204ede731%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Debugging a Node form site.pp?

2014-02-12 Thread Joaquin Menchaca
Alright, I found the source of my problem, at least I think.  The 
puppetmaster includes path to modules based on an environment (staging, 
production, qa) and a global path shared by all environments.  The 
deployenv was in both locations, global and the environmental ones.  The 
module shared by everyone had "import passenger" in it.  

I still wish there was an easy way to generate a list from the site.pp 
manifests for debugging, similar to how an ENC can generate a YAML file of 
classes/params for the node.   What I did was go into 
/var/lib/puppet/client_data/catalog and looked at the json file to get some 
hints.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/cb4ad96c-f8af-4d04-84fb-83c0398cb6c9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Enumerating Puppet Arrays

2014-04-02 Thread Joaquin Menchaca
Is there a way to do something like this:

class make_it_so {
  $scripts = ["a.rb", "b.rb"]

  cron { $scripts:
command => "/path/$scripts",
user=> 'deploy',
hour=> '*/4',
minute  => '0',
  }

}

The attribute usage of the array will just take the entire array 
concatenated together. :'(

I would like to have each resource declaration have a correspond to a 
matching element of the array

I would like the attribute with $scripts to match to the iteration of the 
resource declaration $scripts.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6db6cb93-e9c4-4a42-91e7-36aa7583b5e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet and Windows ACLs (Access Control Lists)

2014-04-29 Thread Joaquin Menchaca
What is most important to me is to have the ability to set ACLS on existing 
resources, such as file, service, and registry (and other objects).  

For now, it would be an immediate boon to apply the, oh so ugly, SDDL for a 
given resource, like a service.  Later, we can have an SDDL builder, that 
has some comfortable readable language, ala subinacle styled ACEs, that 
builds the SDDL that will be applied to the attribute level.  This can be 
similar to how ERB is used in the content("stuff"). 

I think if you take this approach, you avoid gross complexity of trying to 
merge how Windows works and how Puppet works, and avoid feature-scope 
creep.  It also gives the opportunity to add immediate value to existing 
puppet, and and more robust features later.  

If a particular resource that needs an ACL applied, such as certificate 
store or active directory OU, one needs to implement an actual resource for 
that type in PuppetForce.  If you have ACL resource modifying various 
objects, it will get overly complex, and you are just re-implementing the 
wheel as far as existing resources already, and you are breaking the whole 
model.  You'll be doing an anti-pattern for Puppet, and making a lot of 
future hurt, especially from the crowd that may bicker that Puppet should 
work like Windows...

By having an attribute for the SDDL, one can manage resources in the scope 
of how puppet currently managers resources, rather than having two cross 
scopes from opposing models of maintaining resources.  

Also, if there is a utility function, like like ERB's content(" "), then 
sys admins around the world will rejoice, as they no longer have to do 
nasties like this below:

sc sdset  
"D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWPCR;;;S-1-5-21-2103278432-2794320136-1883075150-1000)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"

cacl c:\tools /s 
"D:PAI(D;OICI;FA;;;BG)(A;OICI;FA;;;BA)(A;OICIIO;FA;;;CO)(A;OICI;FA;;;SY)(A;OICI;FA;;;BU)"

setprinter \\”Print_Server_Name”\printer1 3 
pSecurityDescriptor="O:BAG:DUD:(A;;LCSWSDRCWDWO;;;BA)(A;OIIO;RPWPSDRCWDWO;;;BA)(A;;SWRC;;;S-1-5-21-329599412-2737779004-1408050790-2604)(A;CIIO;RC;;;CO)(A;OIIO;RPWPSDRCWDWO;;;CO)(A;CIIO;RC;;;S-1-5-21-329599412-2737779004-1408050790-2605)(A;OIIO;RPWPSDRCWDWO;;;S-1-5-21-329599412-2737779004-1408050790-2605)(A;;SWRC;;;S-1-5-21-329599412-2737779004-1408050790-2605)(A;;LCSWSDRCWDWO;;;PU)(A;OIIO;RPWPSDRCWDWO;;;PU)"

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/aa39f4f3-a1aa-405f-8307-3c4f08fba2de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet and Windows ACLs (Access Control Lists)

2014-05-01 Thread Joaquin Menchaca
I think to illustrate is better to make it more clear, let me get back to 
you on this, once I look it over.

On Wednesday, April 30, 2014 9:21:48 AM UTC-7, Rob Reynolds wrote:
>
>
>
> On Tue, Apr 29, 2014 at 5:45 PM, Joaquin Menchaca 
> 
> > wrote:
>
>> What is most important to me is to have the ability to set ACLS on 
>> existing resources, such as file, service, and registry (and other 
>> objects).  
>>
>
> We are starting with file, once we have that solid, we'll accept other 
> target types - 
> https://github.com/puppetlabs/puppetlabs-acl#acl-access-control-list
>
> Can you read over that and see if you believe that we should do anything 
> more complex with SDDLs?
>  
>
>>
>> For now, it would be an immediate boon to apply the, oh so ugly, SDDL for 
>> a given resource, like a service.  Later, we can have an SDDL builder, that 
>> has some comfortable readable language, ala subinacle styled ACEs, that 
>> builds the SDDL that will be applied to the attribute level.  This can be 
>> similar to how ERB is used in the content("stuff"). 
>>
>> I think if you take this approach, you avoid gross complexity of trying 
>> to merge how Windows works and how Puppet works, and avoid feature-scope 
>> creep.  It also gives the opportunity to add immediate value to existing 
>> puppet, and and more robust features later.  
>>
>> If a particular resource that needs an ACL applied, such as certificate 
>> store or active directory OU, one needs to implement an actual resource for 
>> that type in PuppetForce.  If you have ACL resource modifying various 
>> objects, it will get overly complex, and you are just re-implementing the 
>> wheel as far as existing resources already, and you are breaking the whole 
>> model.  You'll be doing an anti-pattern for Puppet, and making a lot of 
>> future hurt, especially from the crowd that may bicker that Puppet should 
>> work like Windows...
>>
>> By having an attribute for the SDDL, one can manage resources in the 
>> scope of how puppet currently managers resources, rather than having two 
>> cross scopes from opposing models of maintaining resources.  
>>
>> Also, if there is a utility function, like like ERB's content(" "), then 
>> sys admins around the world will rejoice, as they no longer have to do 
>> nasties like this below:
>>
>> sc sdset  
>> "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWPCR;;;S-1-5-21-2103278432-2794320136-1883075150-1000)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
>>
>> cacl c:\tools /s 
>> "D:PAI(D;OICI;FA;;;BG)(A;OICI;FA;;;BA)(A;OICIIO;FA;;;CO)(A;OICI;FA;;;SY)(A;OICI;FA;;;BU)"
>>
>> setprinter \\”Print_Server_Name”\printer1 3 
>> pSecurityDescriptor="O:BAG:DUD:(A;;LCSWSDRCWDWO;;;BA)(A;OIIO;RPWPSDRCWDWO;;;BA)(A;;SWRC;;;S-1-5-21-329599412-2737779004-1408050790-2604)(A;CIIO;RC;;;CO)(A;OIIO;RPWPSDRCWDWO;;;CO)(A;CIIO;RC;;;S-1-5-21-329599412-2737779004-1408050790-2605)(A;OIIO;RPWPSDRCWDWO;;;S-1-5-21-329599412-2737779004-1408050790-2605)(A;;SWRC;;;S-1-5-21-329599412-2737779004-1408050790-2605)(A;;LCSWSDRCWDWO;;;PU)(A;OIIO;RPWPSDRCWDWO;;;PU)"
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/aa39f4f3-a1aa-405f-8307-3c4f08fba2de%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/aa39f4f3-a1aa-405f-8307-3c4f08fba2de%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Rob Reynolds
> Developer, Puppet Labs
>
> *Join us at **PuppetConf 2014 <http://puppetconf.com>**, September 
> 23-24 in San Francisco*
> *Register by May 30th to take advantage of the Early Adopter discount 
> <http://links.puppetlabs.com/puppetconf-early-adopter> **—**save $349!*
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e7c4245f-505f-4ccf-9116-e98cf3dff8ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-16 Thread Joaquin Menchaca
Hello Jesse & Matt.

This might be a dumb question, but can you build a system manually with the 
various CMSes?  Are there a cross-set of technologies (Apache, PHP, MySQL) 
that will work on all CMSes in your organization?  I would think in terms 
in how you would build these systems manually w/o puppet in some organized 
way, then see how this can fit into puppet.   If you can build some 
reference platform that can host some or all of these, then you have your 
basic profile for that wonder-web-box system.

Complexity might come in when you start separating, such as putting php in 
it's own module and apache in another, then sequencing them in profile.  
You can use augues to scissor php specific configurations.  This is what I 
do for a nginx + php-fm configuration.

class profile::webserver {  class  { "nginx": } -> class  { "php": } }




On Friday, May 16, 2014 8:55:35 AM UTC-7, Jesse Cotton wrote:
>
> I work with Matt and am filling in for him since I posed this question to 
> him originally.
>
> Our confusion really lies around how you layout profiles for a 
> multi-function box. For example, suppose you have a role, "CMS App Server" 
> that will host various CMS like Wordpress, Drupal, and others. They are all 
> built on top of the same technologies, Apache, PHP, and MySQL. I don't 
> believe you can build a separate profile for each CMS b/c they will 
> conflict (at least within Puppet). Each will require a certain set of php 
> modules and settings, apache modules and settings, etc. So do you build a 
> single profile like profile::wordpress_drupal_cms3_cm4 or do you build a 
> profile::apachefpm profile? The later seems more logical to me however you 
> lose the ability to define profile specific hiera variables b/c 
> profile::apachefpm is generic.
>
>
> On Thursday, May 15, 2014 1:22:02 AM UTC-4, mjus...@gmail.com wrote:
>>
>> Hi all,
>>
>> We use the roles/profiles/components model originally suggested by Craig 
>> Dunn fairly heavily.  In our case:
>>
>>
>>- The role is a business name, like "Application X App Server"
>>- The profile is the technical name, like "Base Components" or 
>>"Webserver"
>>- The components are either wrapper classes around modules or modules 
>>themselves, like "PHP" or "Apache".
>>
>> For the most part, this works well.  We can have, for example:
>>
>>
>>- MyFace Application Server
>>   - Base Components
>>  - SSSD
>>  - Sudo
>>  - NTP
>>   - PHP Webserver
>>  - PHP
>>  - Apache
>>  - PHP-FPM
>>  - Memcache
>>   
>> However, we're running into trouble how to handle the situation where you're 
>> running a box with multiple functions... for example, WordPress and Drupal. 
>>  In that case, how do you handle configuration conflicts?  On the surface, 
>> it seems like we would create a more generic profile like "PHP Webserver" 
>> (like I did in the above example).  If I do this, however, I lose the 
>> ability to define profile specific variables such as firewall rules, cron 
>> jobs, etc.
>>
>> Any thoughts on this?
>>
>> Best,
>>
>> Matt
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b5e35060-be8e-4dcb-9755-159c20e1fc9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-16 Thread Joaquin Menchaca
Hello: This might be a dumb question, but can you build a system manually 
with the various CMSes?  Are there a cross-set of technologies (Apache, 
PHP, MySQL) that will work on all CMSes in your organization?  I would 
think in terms in how you would build these systems manually w/o puppet in 
some organized way, then see how this can fit into puppet.   If you can 
build some reference platform that can host some or all of these, then you 
have your basic profile for that wonder-web-box system.

Complexity might come in when you start separating, such as putting php in 
it's own module and apache in another, then sequencing them in profile.  
You can use augues to scissor in php specific configurations (or 
alternatively creative erb ruby code to other configurations).  This is 
what I do for a nginx + php-fm configuration.

class profile::webserver {  class  { "nginx": } -> class  { "php": } }


On Friday, May 16, 2014 8:55:35 AM UTC-7, Jesse Cotton wrote:
>
> I work with Matt and am filling in for him since I posed this question to 
> him originally.
>
> Our confusion really lies around how you layout profiles for a 
> multi-function box. For example, suppose you have a role, "CMS App Server" 
> that will host various CMS like Wordpress, Drupal, and others. They are all 
> built on top of the same technologies, Apache, PHP, and MySQL. I don't 
> believe you can build a separate profile for each CMS b/c they will 
> conflict (at least within Puppet). Each will require a certain set of php 
> modules and settings, apache modules and settings, etc. So do you build a 
> single profile like profile::wordpress_drupal_cms3_cm4 or do you build a 
> profile::apachefpm profile? The later seems more logical to me however you 
> lose the ability to define profile specific hiera variables b/c 
> profile::apachefpm is generic.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1b526acb-d961-484c-8525-4ded8f0c9472%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Nasty.

2014-05-16 Thread Joaquin Menchaca
My guess.  Incompatible underlying ruby version.

On Friday, May 16, 2014 7:20:49 AM UTC-7, Paul Seymour wrote:
>
> Hello,
>
> Just updated to 3.6.0 and a strange thing is happening (might not be 
> related to 3.6 specifically just testing before making the jump from 2.7 
> for real).
>
> I have a puppet master running under Apache/Passenger and when testing a 
> client this happens:-
>
> $ puppet agent -t --no-daemonize --noop
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Notice: /File[/var/lib/puppet/lib/puppet]/ensure: removed
> Notice: /File[/var/lib/puppet/lib/facter]/ensure: removed
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find class  for 
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> However if I shutdown the master and run it under a shell with "--debug 
> --no-daemonize" everything is fine and clients (re-download) the 
> facts/plugins
> and get a catalog etc.
>
> I am a bit mystified about this, and ideas ?
>
> Thanks
> Paul
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/aede6cf1-53f3-4a22-9276-711d66771530%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-19 Thread Joaquin Menchaca
Out of curiosity, what exactly are all the components you are trying to 
install, e.g. CMSes? Drupal? WordPress? Joomla?  Is that database going to 
be on the same system?

Note, segue here before I divulge a solution, perhaps sacrilegious, is that 
the role/profile might not be the best design pattern for, as it seems to 
be a top-down with functional decomposition, rather than a bottom-up 
approach (e.g. starting with apache, app-engine  child class, then cms  
child class, each one inheriting properties and actions of the parent).  
There are other OOP design patterns (yet to be documented) that could work 
for Puppet.  Still, here's a way to maybe get this to work with 
roles/profiles:

You could write maybe a fat_php module (not profile), but has parameters to 
turn on/off the features you want through parametrization.  Thus you can 
have this fat_php module support all the requirements to install everything 
under the sun, then a profile will toggle them on and off through 
parameters.  Thus, a package's ensure attribute can be set to "present" 
depending on what CMS the profile will build.  

The role would call whatever profile CMSes that are needed for that role, 
so it can call two or more CMS profiles.  Each one will toggle various 
options, such as a package's ensure to "present", appropriate to the that 
CMS.  When the catalog is compiled, and 2+ CMSes were enabled, packages 
will only be installed once.  If any custom code should have some way to 
avoid collisions, if it has already been invoked previously, so you need to 
be careful to ensure it is idempotent, especially for exec { command: }.

When you advanced the code base to use Hiera, you can just use class 
includes, to have pure idempotence, and avoid specifying parameters through 
class { param=value }, which might cause some unexpected, ala honey badger 
("don't give a shit"), results when classes might try to get installed 
twice or out of order between profiles included in the roles.

Similarly, you can have a fat MySQL module which has the needed schema and 
account configurations needed to make it work with whatever CMS.  These 
sets of configurations and actions are toggled on/off, and which will be 
set by the profile (or hiera config related to the profile).

On Saturday, May 17, 2014 5:39:05 AM UTC-7, Jesse Cotton wrote:
>
> Yes it is feasible :) So really the server is just a PHP app server. What 
> makes it useable for all of the CMSs is that the correct set of apache and 
> php modules are installed, and it has the correct firewall rules, cron jobs 
> and backup jobs configured. With this in mind, my inclination is to build a 
> cms_app_server profile but that seems more like a role then a profile.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a4b895df-02b6-4014-bbce-176d93c3ee07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Calculating network address - boolean opertors

2014-05-19 Thread Joaquin Menchaca
Did you escape the meta character of dot?

$octets = split($ip, '[.]')



On Monday, May 19, 2014 12:01:48 AM UTC-7, Michael Wörz wrote:
>
> Hello folks
>
> i need a bit of help calculating the network address from ip an netmask 
> avoiding the use of stdlib within a puppet maifest. 
>
> #given IP address and netmask
> $ip="10.122.3.177"
> $nm="255.255.255.128"
>
> #splitting into octets -  split() didnt work for some reason
> if $ip =~ /([0-9]+)\.[0-9]+\.[0-9]+\.[0-9]+/ {$ip1 = $1} #  same for $ip2 
> = $2  ...
> if $nm =~ /([0-9]+)\.[0-9]+\.[0-9]+\.[0-9]+/ {$nm1 = $1}
>
> # apply boolean AND 
> $oc1=$ip1 && $nm1
> # Could not parse for environment production: Could not match && at 
> ...
>
>
> notify {"$oc1":}
>
> thanks for your help
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/924ada39-3052-4f93-b92c-3df7bde1a67c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-19 Thread Joaquin Menchaca
You could do global variables, but you couldn't one set the hierarchy to 
the profile level?  Thus you isolate variables in preference to the 
profile, rather than a global mismash.  Stick with parametrization for now 
if this works, refactor later after getting it working, as you'll have a 
functional base state.
 

> We're aware of most of this and agree with most of this. However when you 
> always call include, you lose the ability to say a particular hiera 
> variable is attached to the profile. For example
>
> If you define:
>
> class profile::apache_phpfpm {
>   include ::apache
> }
>
> with the following in hiera:
>
> apache::keepalive = 1
>
> keepalive = 1 applies anywhere apache is included
>
> vs
>
> class profile::apache_phpfpm (
>   $keepalive = 1
> ) {
>   class { ::apache:
> keepalive => $keepalive
>   }
> }
>
> profile::apache_phpfpm::keepalive = 1
>
>
I am not sure about this... Personally, I get scared of having too many 
sub-classes beyond install.pp, config.pp, service.pp, etc. It might make 
those files verbose, but then it is easier to contain and debug.  
Afterwards, parts into separate pieces, if this helps.

Is cron a separate class?  Personally, I put my bottom level modules into 
their product role, which may require cron functionality.  I avoid crafting 
classes based on their functionality, as this would be the same as having a 
class called package that accepts an array packages to be installed.  It 
gets hard to identify what is involved in installing a product or 
scheduling cleanup tasks for the same product; the code to implement a 
particular product gets scattered across many files, rather than 
self-contained in one module.
 

> So below is an example for Drupal. It could literally be cloned for 
> Wordpress and Joomla. Unfortunately, b/c of the class declarations, it is 
> not composable.
>
> class profile::drupal (
>   $apache_listen = ['80'],
>   $apache_name_virtual_hosts = ['*:80'],
>   $apache_modules = ['fastcgi'],
>   $apache_fastcgi_servers = {
> 'www' => {
>   host => '127.0.0.1:9000',
>   faux_path => '/var/www/php.fcgi',
>   alias => '/php.fcgi',
>   file_type => 'application/x-httpd-php'
> }
>   },
>   $phpfpm_pools = {
> 'www' => {
>   listen  => '127.0.0.1:9000',
>   user => 'apache',
>   pm_max_requests => 500,
>   catch_workers_output => 'no',
>   php_admin_value => {},
>   php_value => {}
> }
>   },
>   $php_modules = [],
>   $firewall_rules = {},
>   $backup_jobs = {},
>   $cron_jobs = {}
> ) {
>
>   include ::apache
>   ::apache::listen { $apache_listen: }
>   ::apache::namevirtualhost { $apache_name_virtual_hosts: }
>   ::apache::mod { $apache_modules: }
>   create_resources(::apache::fastcgi::server, $apache_fastcgi_servers)
>
>   include ::php::fpm::daemon
>   create_resources(::php::fpm::conf, $phpfpm_pools)
>   ::php::module { $php_modules: } ~> Service['php-fpm']
>
>   # So the apache user is created before
>   # php-fpm starts
>   Class['::apache'] -> Class['::php::fpm::daemon']
>
>   create_resources(firewall, $firewall_rules)
>   create_resources(::duplicity::job, $backup_jobs)
>   create_resources(::cron::job, $cron_jobs)
> }
>  
>
>>
>> John
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/91d7bbf0-e290-444a-8741-07a1c763d325%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Agent broken on OS X (Yosemite w/ Ruby 2.2.0)?

2015-03-24 Thread Joaquin Menchaca

$ ruby --version
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]

$ puppet --version
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/defaults.rb:465:
 
warning: duplicated key at line 466 ignored: :queue_type
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in
 
`': uninitialized constant Syck (NameError)
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:in
 
`'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:132:in
 
`'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/vendor/require_vendored.rb:4:in
 
`'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/vendor.rb:40:in
 
`require_libs'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/vendor.rb:53:in
 
`load_vendored'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet.rb:172:in 
`'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet.rb:29:in 
`'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/lib/puppet/util/command_line.rb:12:in
 
`'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
 
`require'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/gems/puppet-3.7.4/bin/puppet:7:in `'
from /Users/vagrant/.rvm/gems/ruby-2.2.0/bin/puppet:23:in `load'
from /Users/vagrant/.rvm/gems/ruby-2.2.0/bin/puppet:23:in `'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from 
/Users/vagrant/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `'

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/934980d5-de05-42eb-8b1c-0422d5d5f15b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to Orchestrate State, such as use IPs of new systems for config other systems

2018-04-27 Thread Joaquin Menchaca
Hello Puppeteers,

Relearning Puppet (converting Ansible, Chef knowledge), not sure best 
approach for this.  How can I configure systems based on state of another 
system?   Essentially, I would use a tool like Terraform to bring up 
systems.  When their IP addresses are available, I would then use that 
information (their IP address) to configure other systems.

I have two simple use cases:

   1. local repository, and if up and available, want to configure all 
   clients, e.g. java clients, to use this system (such as /etc/hosts with 
   download.oracle.com)
   2. elastic search cluster where the elasticsearch.yml has ip addresses 
   of all nodes within the cluster.

Any way or best practice in the puppet community for this?  In Ansible, as 
it is orchestration, I can get state of systems with tags, use that to 
configure the system, and with Chef/Knife can configure an environment 
attributes (statically), or override it during initial bootstrap process.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b196d5dd-3300-4884-adc5-99087ec02f70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How to Orchestrate State, such as use IPs of new systems for config other systems

2018-04-30 Thread Joaquin Menchaca
For pure-cluster pattern, I have to deploy all at once first, then put the 
config on all the systems.  For load balancer + web nodes, the eventual 
convergence with puppetdb (poor person's service discovery) would work, but 
clusters are all or nothing deal, eventual convergence would set off alarms.

I am looking into roles/profiles w/ hiera (now roles/profiles w/ hiera + 
control repo), and trying to read up on this (and usign r10k).  It's a bit 
daunting starting out.

I was wondering about these possibilities (if they are possibilities): (1) 
custom or external facts, command line, or ruby class, (2) ENC to pass in 
values, which reads current cloud config (gcp or aws) or local vagrant 
settings for dev, which can pass these values to the class.  

Bolt has me curious.  I have dabbled around with it, running commands or a 
script to a remote node.  Are there other ways I could use this?  Could I 
use it to introduce custom facts, or inject values into puppetdb? hiera?  
The docs are not all that intuitive (had to step through gem source code to 
discern how to use ssh transport for my environment).


On Monday, April 30, 2018 at 5:19:08 AM UTC-7, Thomas Müller wrote:
>
>
>
> Am Samstag, 28. April 2018 03:31:24 UTC+2 schrieb Joaquin Menchaca:
>>
>> Hello Puppeteers,
>>
>> Relearning Puppet (converting Ansible, Chef knowledge), not sure best 
>> approach for this.  How can I configure systems based on state of another 
>> system?   Essentially, I would use a tool like Terraform to bring up 
>> systems.  When their IP addresses are available, I would then use that 
>> information (their IP address) to configure other systems.
>>
>> I have two simple use cases:
>>
>>1. local repository, and if up and available, want to configure all 
>>clients, e.g. java clients, to use this system (such as /etc/hosts with 
>>download.oracle.com)
>>2. elastic search cluster where the elasticsearch.yml has ip 
>>addresses of all nodes within the cluster.
>>
>> you could report to puppetdb and query it in your manifests (puppet pql) 
> . but this introduces a circular dependency as you need to run puppet 
> before having data in puppetdb - so this wouldn't configure your cluster in 
> the first run. And if you have many severs which need ip adresses of the 
> other servers then different puppet runs will produce different config 
> files and maybe restart the service often. I personally would not do it.
>
> Another way is to use the roles/profiles pattern with hiera integrated 
> into the environment or module and add the data to hiera. But it requires 
> that you know your ip addresses (or dns names) before the deployment and 
> that you're able to release code to a puppet environment as you need it.
>
> Or you could take a look at bolt/puppet tasks, or if you're on PE then 
> there is the orchestrator (which i have not used).
>
> It really depends on how the state of your puppet infrastructure is. :-)
>
>
> - Thomas
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/cdfaf0d1-8c64-4870-beee-7b1363bd716f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: How to Orchestrate State, such as use IPs of new systems for config other systems

2018-04-30 Thread Joaquin Menchaca
Both Choria and Jerakia look awesome.  I am so glad these awesome folks are 
still innovating.  I will explore these after my pilot project.  They look 
useful outside of Puppet, especially Jerakia, I can see using this across 
CAP (Chef-Ansible-Puppet).

Whatever happened to MCollective?  That sort of went to Puppet and died.  I 
remember the book I picked up at an PupetConf said the tool was support to 
be orchestrator for both Puppet and Chef.

For my main scope, I want to use minimum method for data injection, so 
maybe bolt or hiera.  It's interesting that this is not something easy on 
Puppet, and that Puppet really doesn't have variables (really connstants), 
so the original design was data was embedded into the module.  The 
parameters is fills the role of variables that can be overridden.  

Wait, Dayyym..  Jerakia can Consul... WOW.


On Monday, April 30, 2018 at 1:28:21 PM UTC-7, Andreas Zuber wrote:
>
> On 04/30/2018 06:29 PM, Joaquin Menchaca wrote: 
> > 
> > Bolt has me curious.  I have dabbled around with it, running commands or 
> > a script to a remote node.  Are there other ways I could use this?  
> > Could I use it to introduce custom facts, or inject values into 
> > puppetdb? hiera?  The docs are not all that intuitive (had to step 
> > through gem source code to discern how to use ssh transport for my 
> > environment). 
>
> Have a look at https://choria.io/docs/playbooks/basics/ . Like Bolt it 
> can run puppet tasks, but you can also write whole plans in the puppet 
> language to orchestrate a cluster. 
>
> It is super easy to setup with the modules provided and is based on 
> mcollective which already comes with the puppet AIO package. 
>
> Regards 
> Andreas 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f5610774-cdd4-4dc6-ab7d-31839f945943%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Announcement: Release of Bolt 0.19.1

2018-04-30 Thread Joaquin Menchaca
Any good how-tos, tutorials on Bolt beyond command and ssh? 

I'm interested in tasks and plans beyond the current docs.  I am curious 
how to make them...

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d825d1f2-208d-43ed-b09a-2721d023442c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: How to Orchestrate State, such as use IPs of new systems for config other systems

2018-05-01 Thread Joaquin Menchaca
That is tragic for MCollective (and other things at Puppet).  I hope it can 
be maintained outside of Puppet umbrella (where things go to die), and have 
integration/migration docs/tools later.

I noticed that Salt Stack had striking similarities.  Any thoughts on diffs 
MCollective vs. Salt Stack vs. Choria? I ask this not from marketing bs, 
but real get down to the nerd enthusiasts perspective.

On Monday, April 30, 2018 at 11:19:46 PM UTC-7, R.I. Pienaar wrote:
>
>
> On 1 May 2018, at 08:04, Joaquin Menchaca  > wrote:
>
> Both Choria and Jerakia look awesome.  I am so glad these awesome folks 
> are still innovating.  I will explore these after my pilot project.  They 
> look useful outside of Puppet, especially Jerakia, I can see using this 
> across CAP (Chef-Ansible-Puppet).
>
> Whatever happened to MCollective?  That sort of went to Puppet and died.  
> I remember the book I picked up at an PupetConf said the tool was support 
> to be orchestrator for both Puppet and Chef.
>
>
> Yeah that’s roughly what happened. Those testing out the Puppet 6 nightly 
> will notice mcollective is not in puppet agent anymore
>
>  
> Choria as the site suggests is both modernising mcollective to make it 
> usable to today’s open source user and also redeveloping huge parts of it 
> and adding new end user features. It will provide a trivially installable 
> way to keep using it post the packaging change in puppet agent. So it’s not 
> like it’s going away. 
>
> As for puppet/chef etc support. It does, and have always, support other CM 
> or indeed no CM. Given that I had to make it usable on my own again I out 
> of realities of available time had to focus on one CM tool to fix the 
> installation story first
>
> That’s not to say it does not support living in other ones it’s just not 
> as turnkey easy
>
> Someone in the community can totally write some cookbooks to install and 
> deploy it la plugins and it will work
>
> This will become easier soon as the new choria daemons are 1 binary but we 
> will see how that turns out. 
>
>
>
> For my main scope, I want to use minimum method for data injection, so 
> maybe bolt or hiera.  It's interesting that this is not something easy on 
> Puppet, and that Puppet really doesn't have variables (really connstants), 
> so the original design was data was embedded into the module.  The 
> parameters is fills the role of variables that can be overridden.  
>
> Wait, Dayyyuuuum..  Jerakia can Consul... WOW.
>
>
> On Monday, April 30, 2018 at 1:28:21 PM UTC-7, Andreas Zuber wrote:
>>
>> On 04/30/2018 06:29 PM, Joaquin Menchaca wrote: 
>> > 
>> > Bolt has me curious.  I have dabbled around with it, running commands 
>> or 
>> > a script to a remote node.  Are there other ways I could use this?  
>> > Could I use it to introduce custom facts, or inject values into 
>> > puppetdb? hiera?  The docs are not all that intuitive (had to step 
>> > through gem source code to discern how to use ssh transport for my 
>> > environment). 
>>
>> Have a look at https://choria.io/docs/playbooks/basics/ . Like Bolt it 
>> can run puppet tasks, but you can also write whole plans in the puppet 
>> language to orchestrate a cluster. 
>>
>> It is super easy to setup with the modules provided and is based on 
>> mcollective which already comes with the puppet AIO package. 
>>
>> Regards 
>> Andreas 
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/f5610774-cdd4-4dc6-ab7d-31839f945943%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/f5610774-cdd4-4dc6-ab7d-31839f945943%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/361ecaa7-8122-492a-8347-faf117d930ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Blogged about Bolt (command / script )

2018-05-01 Thread Joaquin Menchaca
I wanted to do something akin to Knife Bootstrap but with Puppet Bolt.  So 
I wrote this about it:

https://medium.com/@Joachim8675309/puppet-bolt-to-bootstrap-puppet-nodes-f27801693355

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7046f5eb-d8df-4279-a6aa-cbeba2cea1ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Basics Blog Post

2018-05-01 Thread Joaquin Menchaca
I wrote this blog to teach newbies* about Puppet:

https://medium.com/@Joachim8675309/learn-puppet-puppet-basics-b58787ad

* I was a newbie once

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/15ee346e-8b77-4d21-be92-090a427c5a49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppetfile with 'puppet apply'?

2018-05-01 Thread Joaquin Menchaca
Is it possible to use Puppetfile with 'puppet apply'?  I have been having 
difficulty finding this.  I wanted to use the Puppetfile to download and 
vendor modules in the modules directory.

>From my research so far, it looks like r10k with open source puppet server, 
and code manager with PE, but for 'puppet apply', I couldn't find anything.


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/78d2c294-ec1c-42a5-aa8c-d0b9c7ff1c94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppetfile with 'puppet apply'?

2018-05-01 Thread Joaquin Menchaca
I got the lucky google search and found this 
gist: https://gist.github.com/brasey/030b318a37b07acd21af

I was able to get off the ground this below, but I am wondering, how do 
dependencies of dependencies get resolved?  Is this a manual thing?  r10k 
doesn't do a Puppetfile.lock?

sudo su -

curl -sSL https://get.rvm.io | bash

source /etc/profile.d/rvm.sh

rvm install 2.4.4

gem install r10k

r10k puppetfile install

puppet apply manifests/site.pp --modulepath=./site:./modules

puppet module list --tree --modulepath=./site:./modules

/path/to/modules

└─┬ puppetlabs-apt (v4.5.1)

  └── UNMET DEPENDENCY puppetlabs-stdlib (>= 4.16.0 < 5.0.0)


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1fb50942-206c-41d3-ac8b-1ad1b2eb211a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppetfile with 'puppet apply'?

2018-05-01 Thread Joaquin Menchaca
(editor doens't have color syntax , so ss)



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/78a23849-e29f-43be-912f-021a52e44723%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to test apt w/ class that uses apt::source?

2018-05-03 Thread Joaquin Menchaca


I am using nginx package from nginx folks.  I used the apt::source like 
this:



The documentation is fairly decent for standard resources like package and 
stuff, e.g. 

  it { is_expected.to contain_package('nginx').with(ensure: 'present') }

 I am wondering how I could go about testing this, adding to my 
spec/classes/install_spec.rb. for the apt::source in particular.  I haven't 
found anything on this yet.

I scaffolded my classes and spec/ structure using PDK.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c41f1796-4f86-4c36-95f3-2949cb2ce847%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How to test apt w/ class that uses apt::source?

2018-05-03 Thread Joaquin Menchaca
Thank you so much.  Worked like a charm. 

<https://lh3.googleusercontent.com/--sfkKEiwc2A/WutnGn9_POI/AAABTLM/sHDOdF_spmYsD4hg6EyI-D_70KrZZKzeACLcBGAs/s1600/nginx_spec.png>


On Thursday, May 3, 2018 at 2:47:38 AM UTC-7, a...@example42.com wrote:
>
> You can use rpec puppet expectations for any resource type, so something 
> like this should work:
>
>   it { is_expected.to contain_apt__source('nginx').with( ... }
>
>
>
> On Thursday, May 3, 2018 at 10:12:33 AM UTC+2, Joaquin Menchaca wrote:
>>
>>
>>
>> I am using nginx package from nginx folks.  I used the apt::source like 
>> this:
>>
>>
>>
>> The documentation is fairly decent for standard resources like package 
>> and stuff, e.g. 
>>
>>   it { is_expected.to contain_package('nginx').with(ensure: 'present') }
>>
>>  I am wondering how I could go about testing this, adding to my 
>> spec/classes/install_spec.rb. for the apt::source in particular.  I haven't 
>> found anything on this yet.
>>
>> I scaffolded my classes and spec/ structure using PDK.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/25183775-c911-488b-be36-752ba07cb80f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet 5 requires stdlib for templates?

2018-05-04 Thread Joaquin Menchaca
Playing catch-up from Puppet 3 days to Puppet 5.

I noticed that I can no longer to templates w/o puppet-stdlib installed?  
 Was this a design decision (feature) or a bug?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/878cef4d-906d-4ffa-be34-bd99ed58bf48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetlabs-apt module apt::ppa broken?

2018-05-04 Thread Joaquin Menchaca
I tried  apt::ppa { 'ppa:webupd8team/java':  } , and I get 

*Warning*: Unknown variable: '::apt::ppa_options'. (file: 
/home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 4, 
column: 36)
*Warning*: Unknown variable: '::apt::ppa_package'. (file: 
/home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 6, 
column: 36)
*Warning*: Unknown variable: '::apt::_proxy'. (file: 
/home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 36, 
column: 15)
*Error*: Evaluation Error: Error while evaluating a Resource Statement, 
Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: 
/home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 37, 
column: 8) (file: /vagrant/scratch/oraclejava/manifests/init.pp, line: 2) 
on node controlrepo.test


Sort of in shock, this is basic functionality, it cannot be broken, and no 
one knows about it.  It's not like Debian and Ubuntu are not popular... 

So I thought that I must be doing something wrong?  Anyone see this?  Am I 
doing something wrong?

Simple Steps to Reproduce (on Ubuntu 14.04 trusty vagrant box 
puppetlabs/ubuntu-14.04-64-nocm):

 

mkdir scratch & cd scratch

 

puppet module generate foo/oraclejava --skip-interview
puppet module install puppetlabs-stdlib
puppet module install puppetlabs-apt

cat <<-EOF > oraclejava/manifests/init.pp
class oraclejava {
  apt::ppa { 'ppa:webupd8team/java': }
}
EOF

sudo puppet apply \
  --modulepath=.:${HOME}/.puppetlabs/etc/code/modules \
  -e 'include ::oraclejava'


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20f5c69c-5bc2-4201-a9a5-25c40d9d8d6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppetfile with 'puppet apply'?

2018-05-05 Thread Joaquin Menchaca
You guys are scary sick, like in an awesome way! :)  Thank you.

If I have a block of time, I thought of spidering through the dependency 
chain, parsing the dependencies in metadata.json, fetching the latest 
version (query the forge) in the range specified, then updating the final 
Puppetfile.  I think I was spoiled in Chef-land as their Berksfile, which 
leveraged off metadata.rb, and would resolved subsequent dependencies 
automatically.  When I was getting reacquainted with Puppet, I had problems 
getting compatible modules for Puppet 3.x, as they depended on modules, but 
installed the latest non-Puppet 3.x compatible ones.  It was frustrating to 
say the least.  The Forge wasn't a fun experience (especially trying to 
create ElasticSearch cluster using puppet during a job interview 
exercise).  Now that I have some time, it is fun getting back into things, 
learning how things have evolved.  Example42's  material, like the fabric 
tasks, are exciting.

On Wednesday, May 2, 2018 at 7:56:41 AM UTC-7, a...@example42.com wrote:
>
> You can definitively use a Puppetfile with puppet apply.
> As you already found is a matter of running r10k puppetfile install -v 
> from your control-repo directory (where Puppetfile is placed).
> You need to resolve all the dependencies by yourself in Puppetfile (r10k 
> does not do that for you), so list explicitly in Puppetfile all the modules 
> you need, with their dependencies.
>
> With the proper options, you can run puppet apply for a whole control 
> repo, basically reproducing on the local node what is done on a Puppet 
> server (when an ENC is not used), in this way you can use the modules from 
> the control repo's modules dir (populated via r10k puppetfile install) and 
> hieradata from the defined hieradata directory.
>
> Look here https://github.com/example42/psick/blob/production/bin/papply.sh 
> for the needed command line parameters.
>
> On Wednesday, May 2, 2018 at 5:55:12 AM UTC+2, Joaquin Menchaca wrote:
>>
>> Is it possible to use Puppetfile with 'puppet apply'?  I have been having 
>> difficulty finding this.  I wanted to use the Puppetfile to download and 
>> vendor modules in the modules directory.
>>
>> From my research so far, it looks like r10k with open source puppet 
>> server, and code manager with PE, but for 'puppet apply', I couldn't find 
>> anything.
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9129bba1-be17-4c47-861f-69931522bd77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppetlabs-apt module apt::ppa broken?

2018-05-05 Thread Joaquin Menchaca
I fixed this, for some reasons I thought this was optional 

include apt
apt::ppa { 'ppa:webupd8team/java':  }

I wish this was a proper type and provider, rather than puppet module w/ 
defines.

On Friday, May 4, 2018 at 12:56:20 PM UTC-7, Joaquin Menchaca wrote:
>
> I tried  apt::ppa { 'ppa:webupd8team/java':  } , and I get 
>
> *Warning*: Unknown variable: '::apt::ppa_options'. (file: 
> /home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 4, 
> column: 36)
> *Warning*: Unknown variable: '::apt::ppa_package'. (file: 
> /home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 6, 
> column: 36)
> *Warning*: Unknown variable: '::apt::_proxy'. (file: 
> /home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 36, 
> column: 15)
> *Error*: Evaluation Error: Error while evaluating a Resource Statement, 
> Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: 
> /home/vagrant/.puppetlabs/etc/code/modules/apt/manifests/ppa.pp, line: 37, 
> column: 8) (file: /vagrant/scratch/oraclejava/manifests/init.pp, line: 2) 
> on node controlrepo.test
>
>
> Sort of in shock, this is basic functionality, it cannot be broken, and no 
> one knows about it.  It's not like Debian and Ubuntu are not popular... 
>
> So I thought that I must be doing something wrong?  Anyone see this?  Am I 
> doing something wrong?
>
> Simple Steps to Reproduce (on Ubuntu 14.04 trusty vagrant box 
> puppetlabs/ubuntu-14.04-64-nocm):
>
>  
>
> mkdir scratch & cd scratch
>
>  
>
> puppet module generate foo/oraclejava --skip-interview
> puppet module install puppetlabs-stdlib
> puppet module install puppetlabs-apt
>
> cat <<-EOF > oraclejava/manifests/init.pp
> class oraclejava {
>   apt::ppa { 'ppa:webupd8team/java': }
> }
> EOF
>
> sudo puppet apply \
>   --modulepath=.:${HOME}/.puppetlabs/etc/code/modules \
>   -e 'include ::oraclejava'
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c98856e5-5cbc-4a98-a1e9-0de5b0b45a95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet-rspec - external modules? use vendored instead of download?

2018-05-06 Thread Joaquin Menchaca
I am getting started with puppet-rspec, and I setup my external modules 
required in the site/$module/.fixtures.yml, with something like

---
fixtures:
  forge_modules:
 apt: puppetlabs/apt
 stdlib: puppetlabs/stdlib
 debconf: stm/debconf

I noticed that these are downloaded each and every time I run my tests (and 
with slow internet, this is not fun).  Could I point these to my vendored 
modules instead in ../../modules? 

What is typical configuration? 

I'm thinking for local development environment, I really do want to use 
vendored modules, not download these puppies each time (or just download if 
I changed metadata.json).  For CI environment, I can see how that'd make 
sense to download each and every time.


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f4b910e8-365c-437b-993a-8e31d39fb90c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Class composition + parameterization

2018-05-06 Thread Joaquin Menchaca
I am sleuthing for this and haven't found anything obvious yet.

I have an init.pp that looks like this

class dk_oracle_java (
  $docroot = $::dk_oracle_java::params::docroot,
  Optional[String] $local_repo  = $::dk_oracle_java::params::local_repo,
  $version = $::dk_oracle_java::params::version,
  $javas   = $::dk_oracle_java::params::javas,
) inherits ::dk_oracle_java::params {
include ::dk_oracle_java::install
}

And I want to access the $version in my install.pp, but I am not sure how 
to do this.

class dk_oracle_java::install {
  package { 'oracle-java8-installer':
ensure => $version,
  }
}

How can I get this to work, or what is the best practice.  Can the 
install.pp access parameters from the base class, $::version?  Or does this 
need to be passed downward?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6b88b787-0363-4da6-bfaf-3076a1ba613a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Class composition + parameterization

2018-05-06 Thread Joaquin Menchaca
I spotted it, seems obvious now:

class dk_oracle_java::install inherits dk_oracle_java {
  package { 'oracle-java8-installer':
ensure => $version,
  }
}

On Sunday, May 6, 2018 at 2:55:40 PM UTC-7, Joaquin Menchaca wrote:
>
> I am sleuthing for this and haven't found anything obvious yet.
>
> I have an init.pp that looks like this
>
> class dk_oracle_java (
>   $docroot = $::dk_oracle_java::params::docroot,
>   Optional[String] $local_repo  = $::dk_oracle_java::params::local_repo,
>   $version = $::dk_oracle_java::params::version,
>   $javas   = $::dk_oracle_java::params::javas,
> ) inherits ::dk_oracle_java::params {
> include ::dk_oracle_java::install
> }
>
> And I want to access the $version in my install.pp, but I am not sure how 
> to do this.
>
> class dk_oracle_java::install {
>   package { 'oracle-java8-installer':
> ensure => $version,
>   }
> }
>
> How can I get this to work, or what is the best practice.  Can the 
> install.pp access parameters from the base class, $::version?  Or does this 
> need to be passed downward?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ef547bb3-6b89-4a97-9eae-28a4b04a43b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Basics Blog Post

2018-05-06 Thread Joaquin Menchaca
I will likely apply these.  I wish there was a minimalist PDK way to 
generate module.  What is generated is everything under the sun, where 
personally I'm not intimidated, but for new users...

Well, let's say I'm trying to invite into Puppet Nirvana, not kill them at 
the Gates. ;-)

On Wednesday, May 2, 2018 at 8:10:32 AM UTC-7, Martin Alfke wrote:
>
> Hi Joaquin, 
>
> many thanks for also thinking on newbies. 
>
> Some notes from my side: 
>
> - Don't use puppet module generate, use PDK to create new modules, classes 
> and defines. 
> - Stop using ERB templates, switch to EPP 
>
> Best, 
> Martin 
>
>
> > On 1. May 2018, at 23:47, Joaquin Menchaca  > wrote: 
> > 
> > I wrote this blog to teach newbies* about Puppet: 
> > 
> > 
> https://medium.com/@Joachim8675309/learn-puppet-puppet-basics-b58787ad 
> > 
> > * I was a newbie once 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/15ee346e-8b77-4d21-be92-090a427c5a49%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7ab71160-9b0d-43c9-be68-4ed191bf115e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.