Merge "Added files for automatic deployment." into stable/brahmaputra
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 2 May 2016 14:19:45 +0000 (14:19 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Mon, 2 May 2016 14:19:45 +0000 (14:19 +0000)
INFO
doc/howto-dea.md [new file with mode: 0644]

diff --git a/INFO b/INFO
index b1221e6..79a2d7a 100644 (file)
--- a/INFO
+++ b/INFO
@@ -19,6 +19,10 @@ Aiguo Cui (ag.cui@huawei.com)
 Stanislaw Kardach (Stanislaw.Kardach@caviumnetworks.com)
 Josep Puigdemont (josep.puigdemont@enea.com)
 Ciprian Barbu (Ciprian.Barbu@enea.com)
+Florin Dumitrascu (florin.dumitrascu@enea.com)
+Alexandru Avadanii (Alexandru.Avadanii@enea.com)
+Mazdak Rajabi Nasab (Mazdak.Rajabi.Nasab@enea.com)
 
 Link to TSC approval: http://meetbot.opnfv.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-09-08-13.59.html 
 Link to approval of Stanislaw, Josep, and Ciprian: http://lists.opnfv.org/pipermail/opnfv-tsc/2016-March/002322.html
+Link to approval of Florin, Alexandru, Mazdak: http://lists.opnfv.org/pipermail/opnfv-tech-discuss/2015-December/007302.html
diff --git a/doc/howto-dea.md b/doc/howto-dea.md
new file mode 100644 (file)
index 0000000..47afc0e
--- /dev/null
@@ -0,0 +1,322 @@
+DEA: Deployment Environment Adapter\r
+-----------------------------------\r
+\r
+This file has several sections, some of the sections are self describing:\r
+\r
+```\r
+title: Deployment Environment Adapter (DEA)\r
+version:\r
+comment: Config for LF POD1 - HA deployment with Ceph and Opendaylight\r
+wanted_release: Kilo on Ubuntu 14.04\r
+```\r
+\r
+## The Environment section\r
+\r
+environment:\r
+  name: opnfv\r
+  mode: ha                     # noha, no-ha?\r
+  net_segment_type: tun        # ?\r
+\r
+\r
+## The "Fuel" section\r
+\r
+```\r
+fuel:\r
+  ADMIN_NETWORK:                 # Static Fuel admin network configuration\r
+    cidr: 10.20.0.0/24           # this is the "fuelweb_admin" in the nodes\r
+    dhcp_gateway: 10.20.0.2      # nodes us this as default gateway\r
+    dhcp_pool_end: 10.20.0.254   # nodes get addresses from here\r
+    dhcp_pool_start: 10.20.0.3   # This is the Fuel server IP address\r
+    ipaddress: 10.20.0.2\r
+    netmask: 255.255.0.0         # netmask for nodes (otherwise why is it\r
+                                 # needed if CIDR above?\r
+  DNS_DOMAIN: domain.tld         #\r
+  DNS_SEARCH: domain.tld         #\r
+  DNS_UPSTREAM: 8.8.8.8          # Fuel->Network Settings->Other->DNS Servers\r
+  FUEL_ACCESS:\r
+    password: admin\r
+    user: admin\r
+  HOSTNAME: opnfv\r
+  NTP1: 0.pool.ntp.org           # Fuel->Newtok Setting->Other->NTP server list\r
+  NTP2: 1.pool.ntp.org\r
+  NTP3: 2.pool.ntp.org\r
+```\r
+\r
+It would make more sense if NTP was a list:\r
+\r
+```\r
+  NTP:\r
+     - 0.pool.ntp.org\r
+     - 1.pool.ntp.org\r
+     - 2.pool.ntp.org\r
+```\r
+\r
+Now I don't know if NTP4 would be a valid key...\r
+\r
+## The "node" section\r
+\r
+Then there is the important "node" section:\r
+\r
+```\r
+node:\r
+   - id: 1\r
+     interfaces: <some section describing interfaces>\r
+     transformations: <section describing what to do with the interfaces>\r
+     role: [controller|compute|cinder|...]\r
+   - id: 2\r
+      interfaces: interfaces_1\r
+      transformations: transformations_1\r
+      role: ceph-osd,controller\r
+   ...\r
+   - id: n\r
+     ...\r
+```\r
+\r
+Now, the "interfaces" section could be something line:\r
+\r
+```\r
+node:\r
+   - id: 1\r
+     interfaces: interfaces_1\r
+     transformations: transformations_1\r
+```\r
+\r
+## Interfaces\r
+\r
+In this case we would have a "section" called intefaces_apm, that looks like:\r
+\r
+```\r
+interfaces_1:\r
+  eth0:\r
+  - none # I made this up, I don't know if "none" is valid\r
+  eth1:\r
+  - fuelweb_admin\r
+  eth2:\r
+  - public\r
+  - storage     # vlan 2010\r
+  - management  # vlan 2011\r
+  - private     # vlan 2012\r
+```\r
+\r
+This is self describing in a way. eth1 is used as the interface for the\r
+"fuel admin" network, while eth2 will be used for what Fuel calls "public",\r
+"storage", "management" and "private" networks. These match the networks in\r
+the "networks" tab in the Fuel dashboard.\r
+\r
+## Transformations\r
+\r
+For now we won't come into huge detail about the transformations, but they\r
+seem to contain a list of "commands" issued to ovs-vsctl (Open vSwitch).\r
+For example:\r
+\r
+```\r
+transformations_1:\r
+  transformations:\r
+  - ...\r
+  - action: add-port\r
+    bridge: br-mgmt\r
+    name: eth1.300\r
+  - ...\r
+```\r
+\r
+Basically the deploy script will issue the command:\r
+\r
+```\r
+  ovs-vsctl add-port br-mgmt eth1.300\r
+```\r
+(or ...eth1 tag=300)\r
+\r
+## The "network" section:\r
+\r
+The networks listed in each of the devices of the "interfaces_1" section\r
+are defined in the "network" section. Inside the "network" section, there is\r
+another section called "networks", with a list of networks defined:\r
+\r
+```\r
+network:\r
+   ...\r
+   networks:\r
+  - cidr: 192.168.0.0/24\r
+    gateway: null\r
+    ip_ranges:\r
+    - - 192.168.0.1\r
+      - 192.168.0.254\r
+    meta:\r
+      cidr: 192.168.0.0/24        # TBD: Can it be different from previos CIDR?\r
+                                  # Is this the default value in the UI?\r
+      configurable: true          # TBD, UI?\r
+      map_priority: 2             # TBD, UI?\r
+      name: management\r
+      notation: cidr              # TBD, UI?\r
+      render_addr_mask: internal  # TBD, UI?\r
+      render_type: cidr           # TBD, UI stuff?\r
+      use_gateway: false          # Only for public net, or for\r
+      vips:                       # TBD\r
+      - haproxy\r
+      - vrouter\r
+      vlan_start: 101\r
+    name: management\r
+    vlan_start: 300               # must match transformations\r
+  - cidr: ...\r
+    ...\r
+```\r
+\r
+Let's take the "management" network as an example. Here we define the\r
+netmask and several parameters that will look familiar when looking at the\r
+"Networks" Fuel dashboard tab. The available keys:\r
+- name: the name of the \r
+- cdir: the CDIR for this network\r
+- gateway: an IP address (only for public network?)\r
+- ip_ranges: a list with the IP ranges available to this network.\r
+- vlan_start: When using vlan tagging, the first vlan tag\r
+- meta: (explained below)\r
+\r
+The purpose of the "meta" key is less obvious here, and some of the data\r
+appears to be redundant. My guess is that it is part of Fuel's user\r
+interface. The CIDR here would be the default and "notation" is probably the\r
+way it is displayed in the form field:\r
+\r
+- cidr: again the same CDIR as above [is this redundant? error prone?]\r
+- configurable: boolean [?]\r
+- map_priority: int [?]\r
+- name: again the same name as above?\r
+- notation: cidr [any other available keys?]\r
+- use_gateway: boolean [apparently only "true "if an IP was given above]\r
+- vips: This seems to be a list of "namespaces" defined later in the\r
+-       "network section".\r
+- vlan_start same as above...\r
+\r
+Now if we look back, in the "interfaces_1" section we had this:\r
+\r
+```\r
+interfaces_1:\r
+   eth2:\r
+      - management\r
+```\r
+\r
+This is clearly the network defined above. The same goes for "public",\r
+"storage" and "private".\r
+\r
+## The "network" section continued\r
+\r
+Apart from the definition of each of the networks and required by Fuel,\r
+the "network" section also has a "preamble" with the following parameters\r
+and corresponding setting in Fuel:\r
+\r
+```\r
+network:\r
+  management_vip: 192.168.0.2         # TBD (see vips)\r
+  management_vrouter_vip: 192.168.0.1 # TBD\r
+  public_vip: 172.30.9.64             # TBD\r
+  public_vrouter_vip: 172.30.9.65     # TBD\r
+  networking_parameters:              # Fuel->Networ->Settings\r
+    base_mac: fa:16:3e:00:00:00       # Neutron L2\r
+    configuration_template: null\r
+    dns_nameservers:                  # Neutron L3, guess OS DNS Servers\r
+    - 8.8.4.4\r
+    - 8.8.8.8\r
+    floating_ranges:                  # Neutron L3, floating Network Param\r
+    - - 172.30.9.160                  #  floating IP range start\r
+      - 172.30.9.254                  #  floating IP range end\r
+    gre_id_range:                     # Neutron L2, what if VXLAN?\r
+    - 2                               # Neutron L2, tunnel ID range start\r
+    - 65535                           # Neutron L2, tunnel ID range end\r
+                                      # Neutron L3, Internal Network\r
+                                      # Parameters\r
+    internal_cidr: 192.168.111.0/24   #  internal network CDIR\r
+    internal_gateway: 192.168.111.1   #  internal network gateway\r
+    net_l23_provider: ovs             # TBD: must match transformations?\r
+    segmentation_type: tun            # TBD: what options are there? tun/vlan?\r
+    vlan_range:                       # TBD\r
+    - 1000\r
+    - 1030\r
+  vips:\r
+    ...\r
+```\r
+\r
+## The "vips" in the "network" section\r
+\r
+In addition to all the above, the network section contains a "vips" section.\r
+I don't know what they mean, but there are some relations between these\r
+vips, and the networks defined above:\r
+\r
+```\r
+network:\r
+   vips:\r
+      management:\r
+         ipaddr: 192.168.0.2     # TBD: same as management_vip?\r
+         namespace: haproxy      # TBD: network namespace?\r
+         network_role: mgmt/vip  # TBD\r
+         node_roles:\r
+         - controller            # Why do we define it here?\r
+         - primary-controller    # for an HA environment?\r
+      public:\r
+         ...\r
+      vrouter:\r
+         ...\r
+      vrouter_pub:\r
+         ...\r
+```\r
+\r
+Also, in contrast to the "networks" section, the "vips" section is not a list,\r
+but a series of records...\r
+\r
+Some Fuel plugins seem to look at this particular setup, one of the examples\r
+in [2], absolute-dashboard-link.pp, reads:\r
+\r
+```\r
+$os_public_vip = $network_metadata['vips']['public']['ipaddr']\r
+```\r
+\r
+If you remember from above, each network has a "metadata" section, this\r
+matches the name of the variable $network_metadata. In that section there is\r
+a "vips" section, that contains a list of "vips", and one of the vips is\r
+"public", and one of the fields is "ipaddr".\r
+\r
+* [1] https://docs.mirantis.com/openstack/fuel/fuel-8.0/file-ref.html#fuel-file-reference-pages\r
+* [2] https://wiki.openstack.org/wiki/Fuel/Plugins\r
+\r
+\r
+## The "Settings" section\r
+\r
+This looks like user interface stuff and default settings. For instance:\r
+settings:\r
+\r
+```\r
+  editable:\r
+    ...\r
+    additional_components:\r
+      ceilometer:\r
+        description: If selected, Ceilometer component will be installed\r
+        label: Install Ceilometer\r
+        type: checkbox\r
+        value: false\r
+        weight: 40\r
+```\r
+\r
+This is clearly the label "Install Ceilometer" in the Fuel web dashboard.\r
+\r
+This looks like an email label entry with the corresponding regex to\r
+validate it:\r
+\r
+```\r
+settings:\r
+  editable:\r
+    access:\r
+      email:\r
+        description: Email address for Administrator\r
+        label: Email\r
+        regex:\r
+          error: Invalid email\r
+          source: ^\S+@\S+$\r
+        type: text\r
+        value: admin@localhost\r
+        weight: 40\r
+  ...\r
+```\r
+\r
+## Other\r
+\r
+I think most of it, specially the "settings" part, has been machine created.\r
+It would be nice to recreate one of this files from a manual Fuel\r
+deployment.\r