1. György Kohut
  2. honeeebox

Commits

György Kohut  committed f890739

Add support for user-specific config

  • Participants
  • Parent commits de810bd
  • Branches master

Comments (0)

Files changed (7)

Submodule hbbackend

-Subproject commit bf8079d7c8b8a0d7c19d3e9570a0716b205c8d29
+Subproject commit 8165f50990f53727b0737347b8d3325e77a610f4

File vagrant/backend/README

View file
-To use this lot:
+First, you have to supply user-specific configuration values (e.g. credentials to external services) in an additional file.
+
+Copy
+../puppet/modules/backend/files/opt/hbbackend/conf/default.template.conf
+to
+../puppet/modules/backend/files/opt/hbbackend/conf/local.conf
+
+and fill in the values where marked with '???'.
+
+
+To use the VM:
 
 $ vagrant up
 $ vagrant ssh
 VM is Ubuntu Precise, 64 bit, generated by AJC using the scripts at https://github.com/cal/vagrant-ubuntu-precise-64
 
 
-To compile the code, run
+If want to re-compile the code, run
 
 $ /opt/honeynet/bin/build_backend.sh
 
-in the VM
+in the VM.

File vagrant/puppet/modules/backend/files/opt/hbbackend/conf/.gitignore

View file
+local.conf

File vagrant/puppet/modules/backend/files/opt/hbbackend/conf/default.template.conf

View file
+# fill in values where marked with '???'
+
+# VirusTotal API key
+virustotal.apikey = ???
+
+
+# editing below is not necessary
+
+main.storagedir = /opt/hbbackend/main
+submithttp.uploaddir = /opt/hbbackend/upload
+maxmindgeoip.dbfile = /opt/hbbackend/geoip/GeoLiteCity.dat
+

File vagrant/puppet/modules/backend/files/opt/honeynet/bin/build-backend.sh

View file
 
 cd /repo/hbbackend
 ant -lib /usr/share/java retrieve
-ant -Dconfig.file=/opt/honeynet/conf/local.conf 
+ant -Dconfig.file=/opt/hbbackend/conf/local.conf 

File vagrant/puppet/modules/backend/files/opt/honeynet/conf/local.conf

-main.storagedir = /opt/hbbackend/main
-
-submithttp.uploaddir = /opt/hbbackend/upload
-virustotal.apikey = bc2f65f325d26891a7cad544323189ebd922e7bb0bbf5fca47851b879c369fc8
-maxmindgeoip.dbfile = /opt/hbbackend/geoip/GeoLiteCity.dat

File vagrant/puppet/modules/backend/manifests/init.pp

View file
 #
 class backend::files {
 
+    file { "/opt/hbbackend":
+        ensure  => "present",
+        owner   => "root", 
+        group   => "root",
+        recurse => "true",
+        source  => "puppet:///modules/backend/opt/hbbackend"
+    }
+
+    file { "/opt/hbbackend/conf/local.conf":
+       ensure => file,
+       owner   => "root",
+       group   => "root",
+       source => "puppet:///modules/backend/opt/hbbackend/conf/local.conf"
+    }   
+
     file { "/opt/honeynet":
        ensure => "present",
        source => "puppet:///modules/backend/opt/honeynet",
         group  => "root"
     }
 
-    file { "/opt/hbbackend":
-        ensure  => "present",
-        owner   => "root", 
-        group   => "root",
-        recurse => "true",
-        source  => "puppet:///modules/backend/opt/hbbackend"
-    }
-
     file { "/etc/init.d/glassfish":
         ensure => "present",
         owner  => "root",