Merge "Tests to ensure ODL user creation/deletion via API"
[integration/packaging/ansible-opendaylight.git] / README.markdown
1 [![CI Status][7]][6]
2
3 # OpenDaylight Ansible Role
4
5 Ansible role for the [OpenDaylight SDN controller][1].
6
7 #### Ansible Dependencies: `ansible-galaxy`
8
9 Releases of this role can also be installed available via [Ansible Galaxy][5]
10 which ships with Ansible.
11
12 To install the latest version of ansible on RedHat based OSs:
13
14 ```
15 $ sudo yum install -y ansible
16 ```
17
18 To install the latest version of ansible on Debian based OSs:
19
20 ```
21 $ sudo apt-add-repository ppa:ansible/ansible
22 $ sudo apt-get update
23 $ sudo apt-get install -y ansible
24 ```
25
26 #### Ansible Dependencies: Roles
27
28 After you install the `ansible-galaxy` tool, point it at the project's
29 `requirements.yml` file to install ODL's role.
30
31 ```
32 [~/ansible-opendaylight]$ ansible-galaxy install -r requirements.yml
33 ```
34
35 The OpenDaylight Ansible role doesn't depend on any other Ansible roles.
36
37 ## Role Variables
38
39 ### Karaf Features
40
41 To set extra Karaf features to be installed at OpenDaylight start time,
42 pass them in a list to the `extra_features` variable. The extra features
43 you pass will typically be driven by the requirements of your ODL install.
44 You'll almost certainly need to pass some.
45
46 OpenDaylight normally installs a default set of Karaf features at boot.
47 They are recommended, so the ODL Ansible role defaults to installing them.
48 This can be customized by overriding the `default_features` variable. You
49 shouldn't normally need to do so.
50
51 ### REST API Port
52
53 To change the port on which OpenDaylight's northbound listens for REST API
54 calls, use the `nb_rest_port` variable. This was added because OpenStack's
55 Swift project uses a conflicting port.
56
57 The Ansible role will handle opening this port in FirewallD if it's active.
58
59 ### Install Method
60
61 OpenDaylight can be installed either via an RPM or a .deb depending on the operating system.
62 For RedHat based OSs, the valid options for `odl_install_method` are `rpm_repo` or `rpm_path`.
63 For Debian based OSs, `odl_install_method` can accept either `deb_repo` or `deb_path`.
64
65 ## Installing OpenDaylight
66
67 To install OpenDaylight on your system, you can make use of `ansible-playbook`.
68
69 On RedHat based OSs, you can install OpenDaylight from RPM repo (recommended) using
70 the playbook `examples/all_defaults_playbook.yml` or from a local/remote path to an ODL rpm via
71 `examples/rpm_path_install_playbook.yml`.
72
73 ```Shellsession
74 sudo ansible-playbook -i "localhost," -c local examples/<playbook>
75 ```
76
77 On a Debian based OS, you can install OpenDaylight either from a Debian repo using the
78 playbook `examples/deb_repo_install_playbook.yml` or from a local/remote Deb path using
79 `examples/deb_path_install_playbook.yml`.
80
81 ```Shellsession
82 sudo ansible-playbook -i "localhost," -c local examples/<playbook>
83 ```
84
85 You can also use ansible-opendaylight using [Vagrant base box examples of Ansible ODL deployments][8].
86
87 ## Example Playbook
88
89 The simple example playbook below would install and configure OpenDaylight
90 using this role.
91
92 ```yaml
93 ---
94 - hosts: example_host
95   sudo: yes
96   roles:
97     - opendaylight
98 ```
99
100 To override default settings, pass variables to the `opendaylight` role.
101
102 ```yaml
103 ---
104 - hosts: all
105   sudo: yes
106   roles:
107     - role: opendaylight
108       extra_features: ['odl-netvirt-openstack']
109 ```
110
111 Results in:
112
113 ```
114 opendaylight-user@root>feature:list | grep odl-netvirt-openstack
115 odl-netvirt-openstack | <odl-release> | x | odl-netvirt-<odl-release> | OpenDaylight :: NetVirt :: OpenStack
116 ```
117
118 ## License
119
120 The OpenDaylight Ansible role is Open Sourced under a BSD two-clause license.
121
122 [Contributions encouraged][4]!
123
124 ## Author Information
125
126 [Daniel Farrell][2] of the [OpenDaylight Integration/Packaging project][3] is
127 the main developer of this role.
128
129 See [CONTRIBUTING.md][4] for details about how to contribute to the
130 OpenDaylight Ansible role.
131
132 [1]: http://www.opendaylight.org/project/technical-overview "OpenDaylight main technical overview"
133
134 [2]: https://wiki.opendaylight.org/view/User:Dfarrell07 "Maintainer information"
135
136 [3]: https://wiki.opendaylight.org/view/Integration/Packaging "OpenDaylight Integration/Packaging project wiki"
137
138 [4]: https://github.com/dfarrell07/ansible-opendaylight/blob/master/CONTRIBUTING.md "OpenDaylight Ansible role contributing docs"
139
140 [5]: https://galaxy.ansible.com/list#/roles/3948 "OpenDaylight Ansible role on Ansible Galaxy"
141
142 [6]: https://travis-ci.org/dfarrell07/ansible-opendaylight "OpenDaylight Ansible role Travis CI"
143
144 [7]: https://travis-ci.org/dfarrell07/ansible-opendaylight.svg "Travis CI status image"
145
146 [8]: https://github.com/dfarrell07/vagrant-opendaylight#ansible-deployments "Ansible Vagrant deployment"