add config.git_repositories_dir. refs #1445
[arvados.git] / config / environments / production.rb
index 122ec94aa2e2ad15edac58535fdde1f479b583a9..7ae0d812676aef503ddd480d801e4ba42545e73d 100644 (file)
@@ -58,5 +58,27 @@ Server::Application.configure do
   # Send deprecation notices to registered listeners
   config.active_support.deprecation = :notify
 
-  config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+  config.git_repositories_dir = '/var/cache/git'
+
+  config.whjobmanager_wrapper = :slurm_immediate
+
+  # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+
+  # config.compute_node_ami = 'ami-cbca41a2'
+  # config.compute_node_security_group = 'orvos-compute'
+  # config.compute_node_spot_bid = 0.11
+
+  # config.compute_node_domain = `hostname --domain`.strip
+
+  # config.compute_node_nameservers = ['1.2.3.4', '1.2.3.5']
+  require 'net/http'
+  config.compute_node_nameservers = ['local', 'public'].collect do |iface|
+    Net::HTTP.get(URI("http://169.254.169.254/latest/meta-data/#{iface}-ipv4")).match(/^[\d\.]+$/)[0]
+  end << '172.16.0.23'
+
+  config.uuid_prefix = Digest::MD5.hexdigest('cfi-aws-0').to_i(16).to_s(36)[0..4] # '9ujm1'
+
+  # Authentication stub: hard code pre-approved API tokens.
+  # config.accept_api_token = { rand(2**256).to_s(36) => true }
+  config.accept_api_token = {}
 end