Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Error at dokuen create #18

Open
ololduck opened this issue Jun 8, 2012 · 11 comments
Open

Error at dokuen create #18

ololduck opened this issue Jun 8, 2012 · 11 comments

Comments

@ololduck
Copy link

ololduck commented Jun 8, 2012

So, I tried installing it on an Ubuntu-server 12.04 LTS. Everything went fine, except on dokuen create --aplication=name

I followed standard installation procedure, as detailed in the README.

Please find the full command and error log below.

$ ssh git@ip_address dokuen create --application=test
git@192.168.0.12's password:
/var/lib/gems/1.8/gems/dokuen-0.0.11/lib/dokuen/application.rb:57:in `create': undefined method `dokuen_dir' for nil:NilClass (NoMethodError)
        from /var/lib/gems/1.8/gems/dokuen-0.0.11/lib/dokuen/cli.rb:44:in `create'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/task.rb:27:in `send'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/task.rb:27:in `run'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/invocation.rb:120:in `invoke_task'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor.rb:275:in `dispatch'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/base.rb:408:in `start'
        from /var/lib/gems/1.8/gems/dokuen-0.0.11/bin/dokuen:15
        from /usr/local/bin/dokuen:19:in `load'
        from /usr/local/bin/dokuen:19
$ 

I am at your disposal for any further test or information.

@peterkeen
Copy link
Owner

It looks like it's running /usr/local/bin/dokuen instead of the one from your install directory. Could you show me:

  • ls -la your_dokuen_install_directory/bin
  • cat your_dokuen_install_directory/bin/dokuen
  • cat your_git_user_home_dir/.gitolite.rc
  • cat your_gitolite_src_dir/src/commands/dokuen

Thanks!

@ololduck
Copy link
Author

ololduck commented Jun 9, 2012

Here it is:

  • ls -la your_dokuen_install_directory/bin
total 20
drwxr-xr-x 2 root root 4096 juin   8 20:57 .
drwxr-xr-x 5 root root 4096 juin   8 20:57 ..
-rwxr-xr-x 1 root root  267 juin   8 20:57 dokuen
-rwxr-xr-x 1 root root  270 juin   8 20:57 dokuen_install_launchdaemon
-rwxr-xr-x 1 root root   98 juin   8 20:57 dokuen_restart_nginx
  • cat your_dokuen_install_directory/bin/dokuen
#!/usr/bin/env ruby

$stdout.sync = true

require "rubygems"

begin
  require 'dokuen'
rescue LoadError => e
  path = File.expand_path '../../lib', __FILE__
  $:.unshift(path) if File.directory?(path) && !$:.include?(path)
  require 'dokuen'
end

Dokuen::CLI.start()
  • cat your_git_user_home_dir/.gitolite.rc
# configuration variables for gitolite

# This file is in perl syntax.  But you do NOT need to know perl to edit it --
# just mind the commas, use single quotes unless you know what you're doing,
# and make sure the brackets and braces stay matched up!

# (Tip: perl allows a comma after the last item in a list also!)

# HELP for commands (see COMMANDS list below) can be had by running the
# command with "-h" as the sole argument.

# HELP for all the other external programs (the syntactic sugar helpers and
# the various programs/functions in the 8 trigger lists), can be found in
# doc/non-core.mkd (http://sitaramc.github.com/gitolite/non-core.html) or in
# the corresponding source file itself.

%RC = (
    # if you're using mirroring, you need a hostname.  This is *one* simple
    # word, not a full domain name.  See documentation if in doubt
    # HOSTNAME                  =>  'darkstar',
    UMASK                       =>  0077,
    GIT_CONFIG_KEYS             =>  '',

    # comment out if you don't need all the extra detail in the logfile
    LOG_EXTRA                   =>  1,

    # settings used by external programs; uncomment and change as needed.  You
    # can add your own variables for use in your own external programs; take a
    # look at the info and desc commands for perl and shell samples.

    # used by the CpuTime trigger
    # DISPLAY_CPU_TIME          =>  1,
    # CPU_TIME_WARN_LIMIT       =>  0.1,
    # used by the desc command
    # WRITER_CAN_UPDATE_DESC    =>  1,
    # used by the info command
    # SITE_INFO                 =>  'Please see http://blahblah/gitolite for more help',

    # add more roles (like MANAGER, TESTER, ...) here.
    #   WARNING: if you make changes to this hash, you MUST run 'gitolite
    #   compile' afterward, and possibly also 'gitolite trigger POST_COMPILE'
    ROLES                       =>
        {
            READERS             =>  1,
            WRITERS             =>  1,
        },
    # uncomment (and change) this if you wish
    # DEFAULT_ROLE_PERMS          =>  'READERS @all',

    # comment out or uncomment as needed
    # these are available to remote users
    COMMANDS                    =>
        {
            'help'              =>  1,
            'desc'              =>  1,
            # 'fork'            =>  1,
            'info'              =>  1,
            # 'mirror'          =>  1,
            'perms'             =>  1,
            # 'sskm'            =>  1,
            'writable'          =>  1,
            # 'D'               =>  1,
        },

    # comment out or uncomment as needed
    # these will run in sequence during the conf file parse
    SYNTACTIC_SUGAR             =>
        [
            # 'continuation-lines',
            # 'keysubdirs-as-groups',
        ],

    # comment out or uncomment as needed
    # these will run in sequence to modify the input (arguments and environment)
    INPUT                       =>
        [
            # 'CpuTime::input',
            # 'Shell::input',
            # 'Alias::input',
            # 'Mirroring::input',
        ],

    # comment out or uncomment as needed
    # these will run in sequence just after the first access check is done
    ACCESS_1                    =>
        [
        ],

    # comment out or uncomment as needed
    # these will run in sequence just before the actual git command is invoked
    PRE_GIT                     =>
        [
            # 'renice 10',
            # 'Mirroring::pre_git',
            # 'partial-copy',
        ],

    # comment out or uncomment as needed
    # these will run in sequence just after the second access check is done
    ACCESS_2                    =>
        [
        ],

    # comment out or uncomment as needed
    # these will run in sequence after the git command returns
    POST_GIT                    =>
        [
            # 'Mirroring::post_git',
            # 'CpuTime::post_git',
        ],

    # comment out or uncomment as needed
    # these will run in sequence before a new wild repo is created
    PRE_CREATE                  =>
        [
        ],

    # comment out or uncomment as needed
    # these will run in sequence after a new wild repo is created
    POST_CREATE                 =>
        [
            'post-compile/update-git-configs',
            'post-compile/update-gitweb-access-list',
            'post-compile/update-git-daemon-access-list',
        ],

    # comment out or uncomment as needed
    # these will run in sequence after post-update
    POST_COMPILE                =>
        [
            'post-compile/ssh-authkeys',
            'post-compile/update-git-configs',
            'post-compile/update-gitweb-access-list',
            'post-compile/update-git-daemon-access-list',
        ],
);

# ------------------------------------------------------------------------------
# per perl rules, this should be the last line in such a file:
1;

# Local variables:
# mode: perl
# End:
# vim: set syn=perl:
'dokuen' => 1
  • cat your_gitolite_src_dir/src/commands/dokuen
#!/bin/bash

sudo -u dokuen /usr/local/var/dokuen/bin/dokuen $@

@peterkeen
Copy link
Owner

Ah! In your .gitolite.rc file, the 'dokuen' => 1 line needs to be in the COMMANDS section. Like this:

    COMMANDS                    =>
        {
            'help'              =>  1,
            'desc'              =>  1,
            # 'fork'            =>  1,
            'info'              =>  1,
            # 'mirror'          =>  1,
            'perms'             =>  1,
            # 'sskm'            =>  1,
            'writable'          =>  1,
            # 'D'               =>  1,
            'dokuen'          => 1,
        },

@ololduck
Copy link
Author

After correcting the 'dokuen' => 1,, the error persists.

$ ssh git@192.168.0.19 dokuen create
git@192.168.0.19's password:
/var/lib/gems/1.8/gems/dokuen-0.0.11/lib/dokuen/application.rb:57:in `create': undefined method `dokuen_dir' for nil:NilClass (NoMethodError)
        from /var/lib/gems/1.8/gems/dokuen-0.0.11/lib/dokuen/cli.rb:44:in `create'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/task.rb:27:in `send'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/task.rb:27:in `run'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/invocation.rb:120:in `invoke_task'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor.rb:275:in `dispatch'
        from /var/lib/gems/1.8/gems/thor-0.15.2/lib/thor/base.rb:408:in `start'
        from /var/lib/gems/1.8/gems/dokuen-0.0.11/bin/dokuen:15
        from /usr/local/bin/dokuen:19:in `load'
        from /usr/local/bin/dokuen:19

Have I missed something?

In doubt, i will make a new clean install.

@peterkeen
Copy link
Owner

@paulollivier If you just ssh git@192.168.0.19 do you get some stuff from gitolite or do you get a bash prompt? If everything is working correctly you should get some help from gitolite and then get disconnected.

@jphastings
Copy link

Hi @pauloliver, @peterkeen,

I was having the same problem, and I've got an idea as to where it comes from.

Depending on how you install RVM, it can put the RVM bin path in front of your /usr/local/ path, which means the dokuen exexcutable from your gems directory can get executed rather than the other (which includes the config file information).

A quick fix is to send the command ssh git@server dokuen create --application=<app name> --config=/usr/local/var/dokuen/dokuen.conf (this only works if you installed dokuen to the recommended directory).

@teamon
Copy link

teamon commented Oct 26, 2012

Wrong. @jphastings this might help https://gist.github.com/dd7ffd2dbde27bc32446, but prepare for long journey.

Btw, dokuen leaves running processes when scaling down

@peterkeen
Copy link
Owner

@teamon that looks like super useful information ... if I could read Polish. Do you think you could provide an English translation of your notes?

Also I was sure I fixed the running process issue at some point. I'll look into it. It's possible I fixed it on my own install and didn't push a new gem out.

@teamon
Copy link

teamon commented Oct 26, 2012

@peterkeen
Copy link
Owner

Great, thanks. So there's problems on multiple fronts :)

First off it looks like Dokuen is not working with more recent versions of
Foreman. Should be easy to fix.

Second, the nginx path is hardcoded. That one is trivial to add a config
option for.

Third, there's a problem with Mason. I'll have to look into that one and
maybe talk with @ddollar about it.

Fourth, Mason is not compatible with Ruby 1.8.7. I'm not sure if I'll be
able to do anything about that, except maybe remove the dependency on Mason
altogether.

On Fri, Oct 26, 2012 at 4:34 PM, Tymon Tobolski notifications@github.comwrote:

Uh, sure, https://gist.github.com/dd7ffd2dbde27bc32446


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-9830275.

@grigio
Copy link

grigio commented Jan 28, 2013

+1 I had no success, it seems gitolite doesn't see dokuen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants