Browse Source

modify readme and fix conflict of public port in controllers

Change-Id: Ie7b831f95b1a558f99e83de61a10802c90abd89a
dongfeng 3 years ago
parent
commit
d9a072eaec

+ 28
- 65
README.md View File

@@ -20,68 +20,35 @@ This plugin will install [ Open Network Operating System (ONOS) controller](http
20 20
 ###ONOS plugin installation###
21 21
 
22 22
 
23
-1.  Log in Fuel Master and clone GIT repository of fuel-plugin-onos from openstack:
23
+1. Log in Fuel Master and clone GIT repository of fuel-plugin-onos from openstack:
24 24
 
25
-        git clone https://github.com/openstack/fuel-plugin-onos
25
+        git clone -b kilo git://git.openstack.org/openstack/fuel-plugin-onos
26 26
 
27
-2. Preparing an environment for plugin development
28
-in three easy steps:
29
-A. Install the standard Linux development tools.
30
-For Ubuntu 14.04 LTS, run:
27
+2. Preparing an environment for plugin development by three easy steps:
31 28
 
32
-                sudo apt-get install createrepo rpm dpkg-dev
33
-For Centos 6.5, run:
29
+    A. Install the standard Linux development tools.
34 30
 
35
-                yum install createrepo rpm rpm-build dpkg-devel
36
-[root@opnfv_virt fuel-plugin-onos]# cat README.md 
37
-#ONOS Plugin for Fuel#
31
+    For Ubuntu 14.04 LTS, run:
38 32
 
39
-##Brief##
33
+        sudo apt-get install createrepo rpm dpkg-dev
34
+    For Centos 6.5, run:
40 35
 
41
-This plugin will install [ Open Network Operating System (ONOS) controller](https://wiki.onosproject.org/display/ONOS/Wiki+Home), which is a typical SDN controller, and set it as a manager of ovs.
36
+        yum install createrepo rpm rpm-build dpkg-devel
42 37
 
38
+    B. Install the Fuel Plugin Builder. To do that, you should first get pip:
43 39
 
44
-##Notification##
40
+        easy_install pip
45 41
 
46
-
47
-* Fuel opentack version should be after 7.0.
48
-* Only supports the environment with network type: Neutron.
49
-* Live migration is supported.
50
-* L2 and L3 traffic are supported.
51
-
52
-
53
-##Installation Guide##
42
+     C. Then, install Fuel Plugin Builder (fpb) itself:
54 43
 
55 44
 
56
-###ONOS plugin installation###
57
-
58
-
59
-1.  Log in Fuel Master and clone GIT repository of fuel-plugin-onos from openstack:
60
-
61
-        git clone https://github.com/openstack/fuel-plugin-onos
62
-
63
-2. Preparing an environment for plugin development
64
-in three easy steps:  
65
-A. Install the standard Linux development tools.  
66
-For Ubuntu 14.04 LTS, run:  
67
-
68
-                sudo apt-get install createrepo rpm dpkg-dev  
69
-For Centos 6.5, run:  
70
-
71
-                yum install createrepo rpm rpm-build dpkg-devel  
72
-B. Install the Fuel Plugin Builder. To do that, you should first get pip:
73
-
74
-                easy_install pip  
75
-C. Then, install Fuel Plugin Builder (fpb) itself:
76
-
77 45
         pip install fuel-plugin-builder
78
-    
46
+
79 47
 3. Build ONOS plugin for fuel:
80 48
 
81 49
         fpb --build fuel-plugin-onos/
82 50
 
83
-4. The onos rpm will be built in the folder of fuel-plugin-onos.  
84
-Notice: Above steps aren't liminited with the environment of master, you can also make it everywhere, but after the rpm is made, you shoult copy it to the master.
51
+4. The onos rpm will be built in the folder of fuel-plugin-onos.
85 52
 
86 53
 5. Install the onos plugin:
87 54
 
@@ -96,8 +63,9 @@ Notice: Above steps aren't liminited with the environment of master, you can als
96 63
         1  | onos   | 0.7.0   | 3.0.0
97 64
 
98 65
      
99
-7. Check if the plugin is enabled on the settings table.      
100
-Notice: the info of a new plugin can only be ready  when a new environment is created.
66
+7. Check if the plugin is enabled on the settings table.
67
+
68
+Notice: Step 1-4 aren't limitted with the environment of master, you can also make it everywhere, but after the rpm is made, you should copy it to the master. In addition, the info of a new plugin at settings table can only be ready  when a new environment is created.
101 69
 
102 70
 
103 71
 ##User Guide##
@@ -106,31 +74,25 @@ Notice: the info of a new plugin can only be ready  when a new environment is cr
106 74
 ###ONOS plugin configuration###
107 75
 
108 76
 
109
-All action is with Fuel UI wizard.   
110
-1.Create a new environment.   
111
-2.Select 'onos plugin' on Settings tab.   
77
+All described actions below are described from a Fuel GUI provisioning perspective.
78
+
79
+1. Create a new environment.
112 80
 
113
-     onos plugin 
81
+2. Select 'onos plugin' on Settings tab.
114 82
 
115
-3.Select a node with role 'controller' and others with role 'compute'.  
116
-Notice: In avoid of deployging failure, pay attentions to node configurations espacelly those for interfaces. 
83
+     onos plugin
117 84
 
118
-        | interfaces   | useage                 |
119
-        |--------------|------------------------|
120
-        | eht0         | Admin(PXE)             |
121
-        | eht1         | Storage and Management | 
122
-        | eht2         | Private                | 
123
-        | eht3         | Public                 | 
85
+3. Select three nodes with role 'controller', three with role 'compute' and one with 'onos'.
124 86
 
125
-4.Click 'Deploy changes' to enable nodes with ONOS.  
87
+4. Click 'Deploy changes' to enable nodes with ONOSFW.
126 88
 
127 89
 
128 90
 
129 91
 ###Dependencies###
130 92
 
131
-In order to run ONOS, the following are required:  
93
+In order to run ONOS, the following are required:
132 94
 
133
-- Java 8 JDK (Oracle Java recommended; OpenJDK is not as thoroughly tested)    
95
+- Java 8 JDK (Oracle Java recommended; OpenJDK is not as thoroughly tested)
134 96
 - ONOS tarball( Newest version 1.3 recommended.)
135 97
 
136 98
 Notice: In case of version problems, the onos rpm uses jdk and onos packages that have been tested.
@@ -140,7 +102,7 @@ Notice: In case of version problems, the onos rpm uses jdk and onos packages tha
140 102
 1. Web UI is recommended for ONOS controller with tuitive information of topo, devices and etc.
141 103
 For that purpose, IP address of horizon should be ready, which can be found in fuel master after successful deployment. The web will run into the log page after inputing the path, username and password are both 'karaf'. Now enjot ONOS!
142 104
 
143
-        Web UI: http://horizon_ip:8181/onos/ui/index.html 
105
+        Web UI: http://horizon_ip:8181/onos/ui/index.html
144 106
 2. CLI is capable of more diverse functionality by running /opt/onos/bin/onos. More about CLI can be found in [The ONOS CLI](
145 107
 https://wiki.onosproject.org/display/ONOS/The+ONOS+CLI).
146 108
 
@@ -152,5 +114,6 @@ https://wiki.openstack.org/wiki/Fuel/Plugins).
152 114
 
153 115
 ##Contributors##
154 116
 
155
-1.       Wu Wenbin <wuwenbin2@huawei.com>  
117
+1.       Wu Wenbin <wuwenbin2@huawei.com>
156 118
 2.       Zhang Haoyu <zhanghaoyu7@huawei.com>
119
+

+ 2
- 0
deployment_scripts/puppet/manifests/netconfig.pp View File

@@ -1,3 +1,4 @@
1
+include onos
1 2
 
2 3
 Exec{
3 4
         path => "/usr/bin:/usr/sbin:/bin:/sbin",
@@ -8,6 +9,7 @@ Exec{
8 9
 $neutron_settings = hiera_hash('quantum_settings')
9 10
 $nets = $neutron_settings['predefined_networks']
10 11
 $gateway_ip = $nets['net04_ext']['L3']['gateway']
12
+$public_eth = $onos::public_eth
11 13
 
12 14
 file{ "/opt/netconfig.sh":
13 15
         ensure => file,

+ 15
- 2
deployment_scripts/puppet/manifests/ovs.pp View File

@@ -1,5 +1,6 @@
1 1
 include onos
2 2
 
3
+
3 4
 Exec{path => "/usr/bin:/usr/sbin:/bin:/sbin",}
4 5
 
5 6
 case $::operatingsystem{
@@ -56,9 +57,21 @@ exec{'Set ONOS as the manager':
56 57
 }
57 58
 
58 59
 
59
-
60
+$public_eth = $onos::public_eth
60 61
 if member($roles, 'compute') {
61 62
 exec{"net config":
62
-        command => "ifconfig eth3 up",
63
+        command => "ifconfig $public_eth up",
63 64
 }
64 65
 }
66
+else
67
+{
68
+exec{"sleep 20 for ovsconnect":
69
+        command => "sleep 20",
70
+        require => Exec['Set ONOS as the manager'],
71
+}->
72
+exec{"delete public port from ovs of controllers":
73
+        command => "ovs-vsctl del-port br-int $public_eth",
74
+}
75
+}
76
+
77
+

+ 2
- 1
deployment_scripts/puppet/modules/onos/manifests/init.pp View File

@@ -3,7 +3,8 @@ $nodes = hiera('nodes')
3 3
 $primary_controller = filter_nodes($nodes,'role','primary-controller')
4 4
 $roles = node_roles($nodes, hiera('uid'))
5 5
 
6
-#$onos_settings = hiera('onos')
6
+$onos_settings = hiera('onos')
7
+$public_eth = $onos_settings['public_eth']
7 8
 $onos_hash = filter_nodes($nodes,'role','onos')
8 9
 $manager_ip = filter_hash($onos_hash, 'internal_address')
9 10
 $onos_names = filter_hash($onos_hash, 'name')

+ 2
- 2
deployment_scripts/puppet/modules/onos/manifests/service.pp View File

@@ -1,7 +1,7 @@
1 1
 
2 2
 class onos::service{
3 3
 
4
-
4
+$public_eth = $onos::public_eth
5 5
 Exec{
6 6
         path => "/usr/bin:/usr/sbin:/bin:/sbin",
7 7
         timeout => 320,
@@ -43,6 +43,6 @@ exec{ 'add onos auto start':
43 43
         command => 'echo "onos">>/opt/service',
44 44
 }->
45 45
 exec{ 'set public port':
46
-        command => "/opt/onos/bin/onos \"externalportname-set -n eth3\""
46
+        command => "/opt/onos/bin/onos \"externalportname-set -n $public_eth\""
47 47
 }
48 48
 }

+ 2
- 3
deployment_scripts/puppet/modules/onos/templates/netconfig.sh.erb View File

@@ -1,10 +1,9 @@
1 1
 #!/bin/bash
2 2
 
3 3
 set -eux
4
-ifconfig eth3 <%= @gateway_ip -%>00/24 up
4
+ifconfig <%= @public_eth -%> <%= @gateway_ip -%>00/24 up
5 5
 route add default gw <%= @gateway_ip %>
6 6
 ping -c 5 <%= @gateway_ip %>
7 7
 gatewayMac=`arp -a <%= @gateway_ip -%> | awk '{print $4}'`
8 8
 /opt/onos/bin/onos "externalgateway-update -m $gatewayMac"
9
-ifconfig eth3 down
10
-route del default gw <%= @gateway_ip %>
9
+ifconfig <%= @public_eth -%> 0 down

+ 6
- 0
environment_config.yaml View File

@@ -2,3 +2,9 @@ attributes:
2 2
   metadata:
3 3
     restrictions:
4 4
       - "cluster:net_provider != 'neutron'": "Neutron only"
5
+  public_eth:
6
+    description: "Please note that onos needs an independent eth for public network when interfaces of nodes are configured, or L3 traffic to internet will fail! Defualt is eth3."
7
+    type: text
8
+    label: Public Ethernet Port
9
+    weight: 20
10
+    value: eth3

BIN
repositories/ubuntu/Packages.gz View File


Loading…
Cancel
Save