Fix broken technical overview link
[integration/packaging.git] / docs / ansible-role.rst
1 Ansible Role
2 ============
3 Ansible role for the `OpenDaylight SDN controller`_.
4
5 Installing Ansible-OpenDaylight
6 -------------------------------
7 The Ansible Galaxy tool that ships with Ansible can be used to install
8 ansible-opendaylight.
9
10 To install the latest version of Ansible on Red Hat-based OSs:
11
12 ::
13
14     $ sudo yum install -y ansible
15
16
17 To install the latest version of Ansible on Debian-based OSs:
18
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 After you install **ansible-galaxy**, install ansible-opendaylight:
27
28 ::
29
30     $ ansible-galaxy install git+ssh://<LF ID>@git.opendaylight.org:29418/integration/packaging/ansible-opendaylight.git
31
32 The OpenDaylight Ansible role doesn't depend on any other Ansible roles.
33
34 Role Variables
35 --------------
36
37 Karaf Features
38 ^^^^^^^^^^^^^^
39 To set extra Karaf features to be installed at OpenDaylight start time, pass
40 them in a list to the **extra_features** variable. The extra features you pass
41 will typically be driven by the requirements of your use case.
42
43 OpenDaylight normally installs a default set of Karaf features at boot. They
44 are recommended, so the ODL Ansible role defaults to installing them. This can
45 be customized by overriding the **default_features** variable. You shouldn't
46 normally need to do so.
47
48 REST API Port
49 ^^^^^^^^^^^^^
50 To change OpenDaylight's northbound REST API port from the default of 8181, use
51 the **odl_rest_port** variable.
52
53 For example, in an Openstack deployment, the Swift project uses 8181 and
54 conflicts with OpenDaylight.
55
56 The Ansible role will handle opening this port in FirewallD if it's active.
57
58 Install Method
59 ^^^^^^^^^^^^^^
60 OpenDaylight supports RPM and deb-based installs, either from a repository
61 or directly from a URL to a package. Use the **instal_method** var to configure
62 which deployment scenario is used.
63
64 Valid options:
65   rpm_repo: Install ODL using its Yum repo config
66   rpm_path: Install ODL RPM from a local path or remote URL
67   dep_repo: Install ODL using a Debian repository
68   deb_path: Install ODL .deb from a local path or remote URL
69
70 Installing OpenDaylight
71 -----------------------
72 To install OpenDaylight via ansible-opendaylight, use **ansible-playbook**.
73
74 ::
75
76     sudo ansible-playbook -i "localhost," -c local examples/<playbook>
77
78 Example playbooks are provided for various deployments.
79
80 Example Playbooks
81 -----------------
82 The playbook below would install and configure OpenDaylight using all defaults.
83
84 ::
85
86     ---
87     - hosts: example_host
88         sudo: yes
89     roles:
90         - opendaylight
91
92 To override default settings, pass variables to the **opendaylight** role.
93
94 ::
95
96     ---
97     - hosts: all
98       sudo: yes
99       roles:
100         - role: opendaylight
101           extra_features: ['odl-netvirt-openstack']
102
103 Results in:
104
105 ::
106
107     opendaylight-user@root>feature:list | grep odl-netvirt-openstack
108     odl-netvirt-openstack | <odl-release> | x | odl-netvirt-<odl-release> | OpenDaylight :: NetVirt :: OpenStack
109
110 License
111 -------
112 OpenDaylight is Open Source. Contributions encouraged!
113
114 Author Information
115 ------------------
116 The `OpenDaylight Integration/Packaging project`_ maintains this role.
117
118 .. _OpenDaylight SDN controller: https://www.opendaylight.org/what-we-do/odl-platform-overview
119 .. _OpenDaylight Integration/Packaging project: https://wiki.opendaylight.org/view/Integration/Packaging