Commits

Arthur Clune committed a77ecce

trivial changes to tidy up README and remove redundent code in init.pp

  • Participants
  • Parent commits d8f3b4c

Comments (0)

Files changed (3)

 
 for future updates, only the second command is needed
 
+Then edit 
+
+./vagrant/puppet/modules/backend/files/opt/hbbackend/conf/default.template.conf
+
+and rename it to local.conf
+
+You need to add your hpfeeds keys to this file.
+
+
 Then to run the whole setup, 
 
-cd vagrant/backend
+$ cd vagrant/backend
+$ vagrant up
+
+
+To log into the VM
+
+$ vagrant ssh
+
+the repo itself will be mounted within the VM at /repo
+
+VM is Ubuntu Precise, 64 bit, generated by AJC using the scripts at https://github.com/cal/vagrant-ubuntu-precise-64
+
+To start the back end for the first time, the modules must be deployed. Run the script
+
+/opt/honeynet/bin/deploy-backend.sh
+
+in the VM.
+
+
+It's advisable to watch the logs
+
+/opt/hbbackend/log/hbbackend.log
+/opt/hbbackend/log/hbbackend.hpfeeds.log
+/opt/glassfish3/glassfish/domains/hbbackend/logs/server.log
+
+to see that everything starts up correctly.
+
 
-and look at the README there. You'll need to add some external API keys to the config, but then should be good to go.
 

vagrant/backend/README

-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
-
-the repo itself will be mounted within the VM at /repo
-
-VM is Ubuntu Precise, 64 bit, generated by AJC using the scripts at https://github.com/cal/vagrant-ubuntu-precise-64
-
-
-To start the back end for the first time, the modules must be deployed. Run the script
-
-/opt/honeynet/bin/deploy-backend.sh
-
-in the VM.
-
-
-It's advisable to watch the logs
-
-/opt/hbbackend/log/hbbackend.log
-/opt/hbbackend/log/hbbackend.hpfeeds.log
-/opt/glassfish3/glassfish/domains/hbbackend/logs/server.log
-
-to see that everything starts up correctly.
-
-

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

-#$targetuser="vagrant"
-
-
 # Class: backend::tuning
 #
 #
 class backend::tuning {
+
     exec { "sysctl":
         command => "/sbin/sysctl -w kernel.shmmax=46088192 && touch ~/_first_boot",
         creates => "/root/_first_boot"
     }
+
     file { "/etc/sysctl.conf":
         ensure => file,
         owner  => "root", 
 #
 #
 class backend::packages {
-    # package { ["openjdk-7-jdk", "ant", "ivy", "maven"]: 
-    # 	    ensure => present,
-    # 	    # provider => "aptitude",
-    # }
 
     exec { "/usr/bin/aptitude -y install --without-recommends openjdk-7-jdk ant ivy maven": creates => "/root/_java_packages_installed" }
 
     require backend::files
     require backend::packages
 
-
-    #group { "glassfish":
-    #	  ensure => present,
-    #	  system => true
-    #}
-
     exec { "/opt/honeynet/bin/install-glassfish.sh":
         timeout => 20000,
 	user => "root",
     exec { "create-hbbackend-db.sh":
     	command => "/opt/honeynet/bin/create-hbbackend-db.sh", 
         require => Package["postgresql"],
-	user => "root",
-	group => "root"
+    	user => "root",
+    	group => "root"
     }
 
     exec { "create-hbbackend-domain.sh":
     	command => "/opt/honeynet/bin/create-hbbackend-domain.sh",
         user => "root",
-	group => "root"
+    	group => "root"
     }
 
-#     exec { "install-geoip.sh":
-#     	command => "/usr/bin/sudo -u ${targetuser} /opt/honeynet/bin/install-geoip.sh",
-#         timeout => 20000,
-# #	user => $targetuser,
-# #	group => $targetuser
-#     }
+    exec { "install-geoip.sh":
+    	command => "/usr/bin/sudo -u ${targetuser} /opt/honeynet/bin/install-geoip.sh",
+        timeout => 20000,
+    }
 
     exec { "download-hbbackend-deps.sh":
         command => "/usr/bin/sudo -u ${targetuser} /opt/honeynet/bin/download-hbbackend-deps.sh",
         timeout => 600,
         creates => ["/repo/hbbackend/lib2/*.jar", "/repo/hbbackend/lib"],
-#	user => $targetuser,
-#	group => $targetuser
     }
     
     exec { "setup-hbbackend-domain.sh":
         timeout => 600,
         require => [Exec["create-hbbackend-db.sh"], Exec["create-hbbackend-domain.sh"],
 		    Exec["download-hbbackend-deps.sh"], ],
-#	user => $targetuser,
-#	group => $targetuser
     }
 
     exec { "build-hbbackend.sh":
         command => "/usr/bin/sudo -u ${targetuser} /opt/honeynet/bin/build-hbbackend.sh",
         timeout => 600,
-	require => Exec["download-hbbackend-deps.sh"],
-#	user => $targetuser,
-#	group => $targetuser
+    	require => Exec["download-hbbackend-deps.sh"],
     }
 
     service { "hbbackend":