Skip to content

Instantly share code, notes, and snippets.

@vil1

vil1/install.rb Secret

Created February 26, 2015 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vil1/c5a5ec048e99e24d331f to your computer and use it in GitHub Desktop.
Save vil1/c5a5ec048e99e24d331f to your computer and use it in GitHub Desktop.
script "install" do
interpreter "bash"
user "root"
code <<-EOH
curl #{node['eventstore']['download_url']} | tar xz -C /opt
EOH
end
package "daemonize" do
action :install
end
directory "/var/data" do
owner 'root'
group 'root'
action :create
end
directory "/var/data/db" do
owner 'root'
group 'root'
action :create
end
directory "/var/data/logs" do
owner 'root'
group 'root'
action :create
end
@litch
Copy link

litch commented Mar 10, 2015

I'm curious if you have to do all of this as root. Do you know if it would be possible (advisable) to run ES as a less-privileged user?

@litch
Copy link

litch commented Mar 10, 2015

I'm sure you saw this other chef cookbook for ES but I've tried porting many things from "real" chef to OpsWorks - https://github.com/seif/eventstore-cookbook/blob/master/recipes/install.rb

This looks like it is actually mis-implemented as the created user name is hard-coded to "eventstore", but the other things are paramaterized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment