Skip to content

Instantly share code, notes, and snippets.

@kikofernandez
Last active December 20, 2015 16:09
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 kikofernandez/6159142 to your computer and use it in GitHub Desktop.
Save kikofernandez/6159142 to your computer and use it in GitHub Desktop.
chef-solo code for installing nginx and datomic
site :opscode
cookbook 'nginx'
cookbook 'chef-leiningen'
#
# Cookbook Name:: clojureapp
# Recipe:: default
#
# Copyright 2013, Trifork
#
# All rights reserved - Do Not Redistribute
#
include_recipe "nginx"
include_recipe "chef-leiningen"
datomic_latest = Chef::Config[:file_cache_path] + "/datomic-free-0.8.4122.zip"
# Download datomic from the repo
remote_file datomic_latest do
source "http://downloads.datomic.com/0.8.4122/datomic-free-0.8.4122.zip"
mode "0644"
end
# Create folder and permissions
directory node["clojureapp"]["path"] do
owner "root"
group "root"
mode "0755"
action :create
recursive true
end
# Unzip datomic and put it in place
execute "unzip-datomic" do
cwd node["clojureapp"]["path"]
command "unzip " + datomic_latest
creates node["clojureapp"]["path"] + "/datomic"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment