The repository pjsm-opennms-chef is included as 'git submodule' to avoid a fork of the Chef cookbook.
Important
|
If you want to make changes in the OpenNMS cookbook, please commit to pjsm-opennms-chef and run git submodule update --init --recursive --remote
in the 'pjsm-opennms-vagrant' repository to get the cookbook updated.
|
The cookbook is build based on the following requirements:
-
Internet access to download and run a provided CentOS 6.5 base image
Warning
|
The setup is build just for CentOS 6.5 and is not tested on other platforms. |
-
Download or clone the repository from GitHub, there is a ZIP and tar.gz file also available in 'releases'.
git clone https://github.com/opennms-forge/pjsm-opennms-vagrant.git
-
Change into the 'pjsm-opennms-vagrant' directory
cd pjsm-opennms-vagrant
-If you clone the repository, the cookbooks/opennms-light directory is empty. It is a git submodule and has to be initialized with
git submodule init git submodule sync git submodule update --init --recursive —remote
-
Customize the Vagrantfile with environment specific settings
chef.json = { :opennms => { :release => "branches/pjsm-2.0", :home => "/opt/opennms", :discovery => { :foreignsource => "UK-Store-1", :range => { :start => "10.23.42.1", :end => "10.23.42.254" }, :threads => "5" }, :activemq => { :eventforwarder => { :location => "Birmingham" } } }, :activemq => { :server => { :dispatcher => { :broker_name => "my-uk-store-dispatcher-01", :brokerUri => "tcp://127.0.0.1:61616" } } }, :java => { :install_flavor => "oracle", :jdk_version => "7", :oracle_rpm => { :type => "jdk" }, :oracle => { :accept_oracle_download_terms => "true" } } }
-
Startup the Vagrant box with
vagrant up
There are two different install environments available:
-
Option 1: Install everything on the Vagrant box
-
Option 2: Use a pre-packaged base box and just change configuration
-
Use a small and plain CentOS 6.5 base image
-
The Chef cookbook will install everything from scratch
-
Installes latest version of Java, OpenNMS from YUM repository
config.vm.box = "opscode_centos-6.5" config.vm.box_url = "http://mirror.opennms.eu/pub/vagrant/stable/opscode_centos-6.5_chef-provisionerless.box"
-
Fork the repository on Github
-
Create a named feature branch (i.e.
add-new-recipe
) -
Write your change
-
Write tests for your change (if applicable)
-
Run the tests, ensuring they all pass
-
Submit a Pull Request
- Author
-
Ronny Trommer <[email protected]> Copyright (c) 2014 The OpenNMS Group, Inc.
- License
-
GPLv3+