Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appears to install nginx even in cases when it's not requested (no proxy) #23

Closed
leehambley opened this issue Aug 1, 2012 · 12 comments

Comments

Projects
None yet
2 participants
@leehambley
Copy link

commented Aug 1, 2012

Can't confirm, but I was seeing weird errors about missing nginx-.tar.gz without specifying an nginx version in the attribute list.

Not a huge problem, as I plan on using the nginx proxy support (excellent idea, by the way) - but weird when I was starting out. if I get chance, I might send a patch, but I'm quite new to Chef.

@karmi

This comment has been minimized.

Copy link
Member

commented Aug 1, 2012

That does sound like a possible bug. You need to, however, explicitely add the elasticsearch::proxy_nginx recipe to your run_list for the proxy to be installed. What kind of installation procedure you have followed?

@leehambley

This comment has been minimized.

Copy link
Author

commented Aug 1, 2012

Thanks for the fast dialog @karmi, the exact role definition looks like:

{

  "name": "elasticsearch_server",

  "chef_type": "role",
  "json_class": "Chef::Role",

  "default_attributes": {
    "elasticsearch" : {
      "min_mem" : "128m",
      "max_mem" : "128m"
    }
  },

  "run_list": [
    "role[base]",
    "recipe[java]",
    "recipe[elasticsearch]",
  ]

}

The nginx version is being set in my nodes/ip.json:

{

  "nginx" : {
    "version" : "1.3.3"
  },

  "postgresql" : {

    "password" : {

      "postgres"        : "***********",
      "model_directory" : "***********"

    }

  },

  "run_list": [
    "role[base]",
    "role[database_server]",
    "role[elasticsearch_server]",
    "role[application_server]",
    "role[redis_server]",
    "role[web_server]",
    "recipe[imagemagick]",
    "recipe[site_virtual_host]"
  ]

}

The machine, FWIW is a small VPS slice at Linode, thus the obscenely low memory cap (OOM killer is such a bitch).

My next step is to work out how badly the nginx proxy will conflict with my existing web_server Role, which features nginx serving classical virtual hosts (virtual hosts as designed in my site_virtual_host cookbook.

@leehambley

This comment has been minimized.

Copy link
Author

commented Aug 1, 2012

Last word is that I'm using chef-solo via the excellent (newbie tool) knife-solo, effectively it _rsync_s everything up to the server, selects the appropriate node config based on the hostname you SSH to, and then runs chef out of the temporary directory, it's not the fastest way to drive Chef work, but it works essentially well enough for me.

@karmi

This comment has been minimized.

Copy link
Member

commented Aug 1, 2012

chef-solo is indeed great, have you catched http://www.elasticsearch.org/tutorials/2012/03/21/deploying-elasticsearch-with-chef-solo.html?

Notice the cookbook has support for chef-solo provisioning of Vagrant boxes for easy local testing.

@leehambley

This comment has been minimized.

Copy link
Author

commented Aug 1, 2012

Great article @karmi - I'll fly through that, and when I get into the office tomorrow (we're putting an ES backend into a new project this week for MLT searches) - I'll see if I can snatch 20 mins to dive into this cookbook and make it work without the proxy thing.

@karmi

This comment has been minimized.

Copy link
Member

commented Aug 1, 2012

Do not “fly” through that, try it :)

The cookbook should definitely work without Nginx, if not, I'll fix it.

In any case, it should not conflict with your existing Nginx setup, it just adds a .conf file.

@leehambley

This comment has been minimized.

Copy link
Author

commented Aug 1, 2012

hehe, point taken :-) I'm up and running now, that's the most important thing - I'll work through it with my pair, he's never used ES before, trying to get ahead and have a clue about driving tomorrow's session.

I can confirm if I remove that variable (nginx version) and skip the proxy cookbook, it fails with an nginx missing download. ( no big surprise there! )

karmi added a commit that referenced this issue Aug 1, 2012

[#23] Added simplified configuration without Nginx
This is a simple test for karmi/cookbook-elasticsearch#23, which demonstrates it's possible
to install just elasticsearch with the cookbook, skipping the nginx part.

To test, run:

    vagrant up lucid64
    vagrant ssh lucid64 -c 'curl localhost:9200'
@karmi

This comment has been minimized.

Copy link
Member

commented Aug 1, 2012

@leehambley Check out https://github.com/karmi/cookbook-elasticsearch/compare/no_nginx — it appears it's perfectly possible to install elasticsearch only with the cookbook, skipping the nginx part?

@leehambley leehambley closed this Aug 20, 2012

@leehambley

This comment has been minimized.

Copy link
Author

commented Aug 20, 2012

Completely doing it wrong at my side... not sure why, closing issue.

@karmi

This comment has been minimized.

Copy link
Member

commented Aug 20, 2012

@leehambley Ping me on IRC when you'll see me -- let's get it sorted out.

@karmi

This comment has been minimized.

Copy link
Member

commented Aug 21, 2012

Also, watch out for Chef versions -- in my experience, versions above Chef 0.10.8 are badly messed up, particularly 0.10.9, 0.10.10.

@leehambley

This comment has been minimized.

Copy link
Author

commented Aug 21, 2012

Good to know @karmi, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.