8ac85849d231c252c0152a0d1d067bec4a2bca0b
[integration/packaging/puppet-opendaylight.git] / README.markdown
1 [![Build Status](https://travis-ci.org/dfarrell07/puppet-opendaylight.svg)](https://travis-ci.org/dfarrell07/puppet-opendaylight) [![Dependency Status](https://gemnasium.com/dfarrell07/puppet-opendaylight.svg)](https://gemnasium.com/dfarrell07/puppet-opendaylight) [![Join the chat at https://gitter.im/dfarrell07/puppet-opendaylight](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dfarrell07/puppet-opendaylight?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
3 # OpenDaylight
4
5 #### Table of Contents 
6 1. [Overview](#overview)
7 1. [Module Description](#module-description)
8 1. [Setup](#setup)
9   * [What `opendaylight` affects](#what-opendaylight-affects)
10   * [Beginning with `opendaylight`](#beginning-with-opendaylight)
11 1. [Usage](#usage)
12   * [Karaf Features](#karaf-features)
13   * [Install Method](#install-method)
14   * [Ports](#ports)
15 1. [Reference ](#reference)
16   * [Classes](#classes)
17     * [Private Classes](#private-classes)
18     * [Public Classes](#public-classes)
19 1. [Limitations](#limitations)
20 1. [Development](#development)
21
22 ## Overview
23
24 Puppet module for deploying the [OpenDaylight Software Defined Networking (SDN) controller](http://www.opendaylight.org/).
25
26 ## Module Description
27
28 Installs and configures the [OpenDaylight SDN controller](http://www.opendaylight.org/).
29
30 Both supported [install methods](#install-method) default to the latest stable OpenDaylight release, which is currently Helium 0.2.3 SR3.
31
32 ## Setup
33
34 ### What `opendaylight` affects
35
36 * Installs [OpenDaylight](http://www.opendaylight.org/).
37 * Installs a [systemd unitfile](https://github.com/dfarrell07/opendaylight-systemd/) for OpenDaylight.
38 * Starts the `opendaylight` systemd service.
39 * Creates `odl:odl` user:group if they don't already exist.
40 * Installs Java, which is required by ODL.
41
42 ### Beginning with `opendaylight`
43
44 Getting started with the OpenDaylight Puppet module is as simple as declaring the `::opendaylight` class.
45
46 The [vagrant-opendaylight](https://github.com/dfarrell07/vagrant-opendaylight/) project provides an easy way to experiment with [applying the ODL Puppet module](https://github.com/dfarrell07/vagrant-opendaylight/tree/master/manifests) to CentOS 7, Fedora 20 and Fedora 21 Vagrant boxes.
47
48 ```
49 [~/vagrant-opendaylight]$ vagrant status
50 Current machine states:
51
52 cent7_pup_rpm             not created (virtualbox)
53 cent7_pup_tb              not created (virtualbox)
54 cent7_rpm                 not created (virtualbox)
55 f20_pup_rpm               not created (virtualbox)
56 f20_pup_tb                not created (virtualbox)
57 f20_rpm                   not created (virtualbox)
58 f21_pup_rpm               not created (virtualbox)
59 f21_pup_tb                not created (virtualbox)
60 f21_rpm                   not created (virtualbox)
61 ```
62
63 ## Usage
64
65 The most basic usage, passing no parameters to the OpenDaylight class, will install and start OpenDaylight with a default configuration.
66
67 ```puppet
68 class { 'opendaylight':
69 }
70 ```
71
72 ### Karaf Features
73
74 To set extra Karaf features to be installed at OpenDaylight start time, pass them in a list to the `extra_features` param. The extra features you pass will typically be driven by the requirements of your ODL install. You'll almost certainly need to pass some.
75
76 ```puppet
77 class { 'opendaylight':
78   extra_features => ['odl-ovsdb-plugin', 'odl-ovsdb-openstack'],
79 }
80 ```
81
82 OpenDaylight normally installs a default set of Karaf features at boot. They are recommended, so the ODL Puppet mod defaults to installing them. This can be customized by overriding the `default_features` param. You shouldn't normally need to do so.
83
84 ```puppet
85 class { 'opendaylight':
86   default_features => ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management'],
87 }
88 ```
89
90 ### Install Method
91
92 The `install_method` param, and the associated `tarball_url` and `unitfile_url` params, are intended for use by developers who need to install a custom-built version of OpenDaylight, or for automated build processes that need to consume a tarball build artifact.
93
94 It's recommended that most people use the default RPM-based install.
95
96 If you do need to install from a tarball, simply pass `tarball` as the value for `install_method` and optionally pass the URL to your tarball via the `tarball_url` param. The default value for `tarball_url` points at OpenDaylight's latest release. The `unitfile_url` param points at the OpenDaylight systemd .service file used by the RPM and should (very likely) not need to be overridden.
97
98 ```puppet
99 class { 'opendaylight':
100   install_method => 'tarball',
101   tarball_url    => '<URL to your custom tarball>',
102   unitfile_url   => '<URL to your custom unitfile>',
103 }
104 ```
105
106 ### Ports
107
108 To change the port OpenDaylight's northbound listens on for REST API calls, use the `odl_rest_port` param. This was added because OpenStack's Swift project uses a conflicting port.
109
110
111 ```puppet
112 class { 'opendaylight':
113   odl_rest_port => '8080',
114 }
115 ```
116
117 ## Reference
118
119 ### Classes
120
121 #### Public classes
122
123 * `opendaylight`: Main entry point to the module. All ODL knobs should be managed through its params.
124
125 #### Private classes
126
127 * `opendaylight::params`: Contains default `opendaylight` class param values.
128 * `opendaylight::config`: Manages ODL config, including Karaf features and REST port.
129 * `opendaylight::install`: Installs ODL from an RPM or tarball.
130 * `opendaylight::service`: Starts the OpenDaylight service.
131
132 ## Limitations
133
134 * Only tested on Fedora 20, 21, CentOS 7 and Ubuntu 14.04.
135 * CentOS 7 is currently the most stable OS option.
136 * Our [Fedora 21 Beaker tests are failing](https://github.com/dfarrell07/puppet-opendaylight/issues/63), but it seems to be an issue with the Vagrant image, not the Puppet mod.
137
138 ## Development
139
140 See [CONTRIBUTING.md](https://github.com/dfarrell07/puppet-opendaylight/blob/master/CONTRIBUTING.md) for details about how to contribute to this OpenDaylight Puppet module.
141
142 ## Release Notes/Contributors
143
144 See the [CHANGELOG](https://github.com/dfarrell07/puppet-opendaylight/blob/master/CHANGELOG) or our git tags for information about releases. See the git commit history for contributor information.