Re: [Puppet Users] using GIT for environments

2013-08-19 Thread Jim Toth
Hmm...you might need to add "git remote update" in there.  git pull does
that by default.



On Mon, Aug 19, 2013 at 1:22 PM, me 1  wrote:

>
> On Sun, Aug 18, 2013 at 9:04 PM, me 1  wrote:
>>
>>> On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:
>>>>
>>>> There are a few ways to go; probably the best way is to set up a bare
>>>> repository that you push and pull from in both places, but I'd probably add
>>>> the development environment as a remote in the in-production directory.
>>>>
>>>> cd /path/to/production/repository
>>>> git remote add devel /path/to/development/directory
>>>> git merge --ff-only devel/master
>>>>
>>>> (--ff-only because I'm paranoid -- that will give you the same sort of
>>>> warnings that "git push" would give you if you the trees had diverged).
>>>>
>>>
>>>
>>> So you're saying adding to the development environment as a remote in
>>> the in-production directory is an alternative to using a bare repository
>>> then?
>>>
>>
>> Yes.
>>
>>
>>> I'm new to git and just trying to find an easy way, if using bare
>>> repositories is necessary, I don't think git is very good for this at all,
>>> its too much trouble for what its worth.  (except for extremely large
>>> environments, which is rare)
>>>
>>
>> I'd say what it's good for is multi-user environments. Or single-user
>> environments, if that user happens to be familiar with git.  :-)
>>
>>
>
> ok, then here is the problem:
>
> $ git merge --ff-only preprod/master
>
> fatal: 'preprod/master' does not point to a commit
>
> $ git remote -v
> preprod /etc/puppet/environments/preprod/puppet/ (fetch)
> preprod /etc/puppet/environments/**preprod/puppet/ (push)
>
> $ pwd
> /etc/puppet
>
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jim Toth
jjt...@vcu.edu
Applications Analyst, Technology Services
(804) 827-1227

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] using GIT for environments

2013-08-19 Thread Jim Toth
On Sun, Aug 18, 2013 at 9:04 PM, me 1  wrote:

> On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:
>>
>> There are a few ways to go; probably the best way is to set up a bare
>> repository that you push and pull from in both places, but I'd probably add
>> the development environment as a remote in the in-production directory.
>>
>> cd /path/to/production/repository
>> git remote add devel /path/to/development/directory
>> git merge --ff-only devel/master
>>
>> (--ff-only because I'm paranoid -- that will give you the same sort of
>> warnings that "git push" would give you if you the trees had diverged).
>>
>
>
> So you're saying adding to the development environment as a remote in the
> in-production directory is an alternative to using a bare repository then?
>

Yes.


> I'm new to git and just trying to find an easy way, if using bare
> repositories is necessary, I don't think git is very good for this at all,
> its too much trouble for what its worth.  (except for extremely large
> environments, which is rare)
>

I'd say what it's good for is multi-user environments. Or single-user
environments, if that user happens to be familiar with git.  :-)

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] using GIT for environments

2013-08-18 Thread Jim Toth
There are a few ways to go; probably the best way is to set up a bare
repository that you push and pull from in both places, but I'd probably add
the development environment as a remote in the in-production directory.

cd /path/to/production/repository
git remote add devel /path/to/development/directory
git merge --ff-only devel/master

(--ff-only because I'm paranoid -- that will give you the same sort of
warnings that "git push" would give you if you the trees had diverged).

-- Jim Toth


On Sun, Aug 18, 2013 at 2:36 PM, me 1  wrote:

> On Sunday, August 18, 2013 3:24:40 AM UTC-4, James Polley wrote:
>>
>> The changes are being commited in the branch called "master" in your
>> local checkout, but not being pushed nack up to the origin.
>>
>> http://git-scm.com/book/en/**Git-Basics-Working-with-**Remotes<http://git-scm.com/book/en/Git-Basics-Working-with-Remotes>explains
>>  how to push your changes.
>>
>
>
> Thanks, but I tried this already, but i'm still having errors:
>
>  $ git push
> Counting objects: 5, done.
> Compressing objects: 100% (3/3), done.
> Writing objects: 100% (3/3), 308 bytes, done.
> Total 3 (delta 2), reused 0 (delta 0)
> Unpacking objects: 100% (3/3), done.
> remote: error: refusing to update checked out branch: refs/heads/master
> remote: error: By default, updating the current branch in a non-bare
> repository
> remote: error: is denied, because it will make the index and work tree
> inconsistent
> remote: error: with what you pushed, and will require 'git reset --hard'
> to match
> remote: error: the work tree to HEAD.
> remote: error:
> remote: error: You can set 'receive.denyCurrentBranch' configuration
> variable to
> remote: error: 'ignore' or 'warn' in the remote repository to allow
> pushing into
> remote: error: its current branch; however, this is not recommended unless
> you
> remote: error: arranged to update its work tree to match what you pushed
> in some
> remote: error: other way.
> remote: error:
> remote: error: To squelch this message and still keep the default
> behaviour, set
> remote: error: 'receive.denyCurrentBranch' configuration variable to
> 'refuse'.
> To /etc/puppet/environments/preprod/../../../puppet
>  ! [remote rejected] master -> master (branch is currently checked out)
> error: failed to push some refs to
> '/etc/puppet/environments/preprod/../../../puppet'
>
>  --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jim Toth
jjt...@vcu.edu
Applications Analyst, Technology Services
(804) 827-1227

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Passenger with Puppet 3.0, problems running under

2013-07-25 Thread Jim Toth
As I recall, if the config.ru itself isn't owned by the puppet user, we'll 
get similar errors from Passenger (spewing out an HTML error page, which 
the agents then unhelpfully log).

It might be something else -- given that it's HTML, you might want to just 
go to https://:8140 in a browser and see what it's 
saying -- if all's well, then puppet will just say something like

The environment must be purely alphanumeric, not ''
>
>
And if that doesn't fix it, you could try uncommenting the debugging lines 
you quoted from puppet/util.rb.


I just took my own advice -- we're in the process of rebuilding a test 
puppet master, and in the process of writing this post I noticed that it 
was spewing HTML, and fairly clearly told me that I needed to do a "bundle 
install" since its Gemfile had changed (and the Gemfile.lock, which it was 
complaining about, is not owned by the puppet user by design).


On Wednesday, July 24, 2013 5:26:26 PM UTC-4, Forrie wrote:
>
> Since upgrading to 3.x I've had some problems running Puppet under 
> Passenger.   I've spent several /days/ debugging this.
>
> The first symptoms included a new agent could not get a CA cert from the 
> Puppet Master.   I checked my configs, permissions, etc.
>
> When I run puppet master in stand-alone mode, it works fine.  
>
> I wrote to the Phusion Passenger folks, but they are not familiar with 
> Puppet and so I'm still trying to figure out what is wrong. 
>
> We don't have selinux enabled.  "sestatus" confirms this.
>
> SELinux status: disabled
>
>
> Of the errors I see in the puppet logs relevant to this:
>
> puppet.log:Jul 24 14:51:19 central puppet-master[30657]: Could not prepare 
> for execution: Got 3 failure(s) while initializing: Could not set 'file' on 
> ensure:
>  Permission denied - /var/log/puppet/masterhttp.log; Could not set 'file' 
> on ensure: Permission denied - /var/log/puppet/masterhttp.log
> puppet.log:Jul 24 14:51:19 central puppet-master[30657]: Wrapped exception:
> puppet.log:Jul 24 14:51:19 central puppet-master[30657]: Permission denied 
> - /var/log/puppet/masterhttp.log; change from absent to file failed: Could 
> not set
> 'file' on ensure: Permission denied - /var/log/puppet/masterhttp.log
>
> I tried setting the "ownership" of the files in that directory to the same 
> as the apache User, no difference.   Again, under regular Puppet there's no 
> problem.
>
> This is all I have in my config.ru:
>
> $0 = "master"
> ARGV << "--rack"
> ARGV << "--confdir" << "/etc/puppet"
> ARGV << "--vardir"  << "/var/lib/puppet"
> require 'puppet/util/command_line'
> run Puppet::Util::CommandLine.new.execute
>
>
> More logs:
>
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011 id="site_header">
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011 class="corporate_identity">
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011#011 class="logo">https://www.phusionpassenger.com"; 
> >Phusion
> Passenger
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011 id="site_body">
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011 class="error_title">Web application could not be started
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011 id="content">
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
> #011#011#011#011exit (SystemExit)
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
> /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util.rb:518:in
> `exit'
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
> /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util.rb:518:in
> `exit_on_fail'
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
> /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/application.rb:362:in
> `run'
> Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
> /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util/command_line.rb:132:in
> `run'
>
>
>
> It spits out a lot of HTML, CSS... and things I don't think should ever 
> happen, on the client side.
>
>
> Looks like it it exiting, mentioning line 518 of 
> /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util.rb, the code 
> of which 
>
> is:
>
>
>   # Now we need to catch **any** other kind of exception, because we may 
> be calling third-party
>   #  code (e.g. webrick), and we have no idea what they might throw.
>   rescue Exception => err
> ## NOTE: when debugging spec failures, these two lines can be very 
> useful
> #puts err.inspect
> #puts Puppet::Util.pretty_backtrace(err.backtrace)
> Puppet.log_exception(err, "Could not #{message}: #{err}")
> Puppet::Util::Log.force_flushqueue()
> exit(code)
>   end
>
>
> Anyway, I'm pretty stumped.   I am running Puppet 3.x on its own now.  We 
> only have 40 nodes, so it works.   Bu