diff options
135 files changed, 3742 insertions, 873 deletions
@@ -13,10 +13,10 @@ Committers: Weidong shao (weidong.shao@huawei.com) Prakash Ramchandran (Prakash.Ramchandran@huawei.com) Justin chi (chigang@huawei.com) -Iben Rodrigues (iben.rodriguez@spirent.com) -Tim Rozet (trozet@redhat.com) Chenshuai (chenshuai@huawei.com) -Ashlee Young (ashlee@onosfw.com) +Ashlee Young (ashlee@yunify.com) +Yifei Xue (xueyifei@huawei.com) +Xinhui Hu (xinhui_hu@foxmail.com) Link to TSC approval: http://ircbot.wl.linuxfoundation.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-07-21-14.02.html @@ -65,13 +65,13 @@ function prepare_env() if ! apt --installed list 2>/dev/null |grep "\<$i\>" then sudo apt-get install -y --force-yes $i - sudo pip install pyyaml fi + sudo pip install pyyaml fi if [[ $REDHAT_REL == true ]]; then sudo yum install $i -y - sudo pip install pyyaml fi + sudo pip install pyyaml done set -e } diff --git a/build/build.yaml b/build/build.yaml index c0491696..178e91b3 100644 --- a/build/build.yaml +++ b/build/build.yaml @@ -13,43 +13,43 @@ packages: - name: compass-deck description: "RESTful API and DB Handlers for Compass" get_method: docker - url: compass4nfv/compass-deck + url: compass4nfv/compass-deck:latest - name: compass-tasks-osa description: "compass task container for openstack deployment via openstack-ansible" get_method: docker - url: compass4nfv/compass-tasks-osa + url: compass4nfv/compass-tasks-osa:euphrates - name: compass-tasks-k8s description: "compass task container for kubernets deployment via kargo" get_method: docker - url: compass4nfv/compass-tasks-k8s + url: compass4nfv/compass-tasks-k8s:latest - name: compass-cobbler description: "cobbler container for compass" get_method: docker - url: compass4nfv/compass-cobbler + url: compass4nfv/compass-cobbler:latest - name: compass-db description: "datebase container for compass" get_method: docker - url: compass4nfv/compass-db + url: compass4nfv/compass-db:latest - name: compass-mq description: "message queue container for compass" get_method: docker - url: compass4nfv/compass-mq + url: compass4nfv/compass-mq:latest - name: yardstick description: "yardstick container for compass" get_method: docker - url: opnfv/yardstick + url: opnfv/yardstick:latest - name: compass-repo-osa-ubuntu description: "compass repo container for deployment" get_method: docker - url: compass4nfv/compass-repo-osa-ubuntu + url: compass4nfv/compass-repo-osa-ubuntu:euphrates - name: compass-docker-compose description: "containerized compass compose ansible" diff --git a/ci/deploy_ci.sh b/ci/deploy_ci.sh index 55a0129d..5fa19cef 100755 --- a/ci/deploy_ci.sh +++ b/ci/deploy_ci.sh @@ -18,6 +18,10 @@ case $DEPLOY_SCENARIO in echo "os-onos-sfc-ha scenario supports mitaka only" exit 1 ;; + k8-nosdn-nofeature-ha) + export COMPASS_OS_VERSION=centos7 + export KUBERNETES_VERSION="v1.7.3" + ;; esac if [[ $ROOT_BUILD_CAUSE == MANUALTRIGGER ]]; then diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py b/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py index 62f29d84..2ffb4cae 100644..100755 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py @@ -1,26 +1,32 @@ import yaml
import sys
+import os
from jinja2 import Environment
+try:
+ import json
+except ImportError:
+ import simplejson as json
INVENTORY_TEMPLATE = """
[all]
-{% for host, ip in hosts.iteritems() %}
-{{ host }} ansible_ssh_host={{ ip }} ansible_ssh_pass=root ansible_user=root
+{% for host, vales in hostvars.iteritems() %}
+{{ host }} ansible_ssh_host={{ vales['ansible_ssh_host'] }} \
+ansible_ssh_pass=root ansible_user=root
{% endfor %}
[kube-master]
-host1
-host2
+{% for host in kube_master %}
+{{ host }}
+{% endfor %}
[etcd]
-host1
-host2
-host3
+{% for host in etcd %}
+{{ host }}
+{% endfor %}
[kube-node]
-host2
-host3
-host4
-host5
+{% for host in kube_node %}
+{{ host }}
+{% endfor %}
[k8s-cluster:children]
kube-node
@@ -31,27 +37,50 @@ kube-master """
-def create_inventory_file(inventories_path, hosts):
- content = Environment().from_string(INVENTORY_TEMPLATE).render(hosts=hosts)
+def _byteify(data, ignore_dicts=False):
+
+ if isinstance(data, unicode):
+ return data.encode('utf-8')
+ if isinstance(data, list):
+ return [_byteify(item, ignore_dicts=True) for item in data]
+ if isinstance(data, dict) and not ignore_dicts:
+ return {
+ _byteify(key, ignore_dicts=True):
+ _byteify(value, ignore_dicts=True)
+ for key, value in data.iteritems()
+ }
+ return data
+
+
+def load_inventory(inventory):
+ if not os.path.exists(inventory):
+ raise RuntimeError('file: %s not exist' % inventory)
+ with open(inventory, 'r') as fd:
+ return json.load(fd, object_hook=_byteify)
+
+
+def create_inventory_file(inventories_path,
+ hostvars, kube_master, etcd, kube_node):
+ content = Environment().from_string(INVENTORY_TEMPLATE).render(
+ hostvars=hostvars, kube_master=kube_master,
+ etcd=etcd, kube_node=kube_node)
with open(inventories_path, 'w+') as f:
f.write(content)
-def fetch_all_sorted_external_ip(ip_cfg):
- hosts = {}
- for host, settings in ip_cfg.iteritems():
- external = settings["external"]["ip"]
- hosts[host] = external
- return hosts
-
+def main(inventories_path, local_inventory):
+ inventory_data = load_inventory(local_inventory)
+ hostvars = inventory_data['_meta']['hostvars']
+ kube_node = inventory_data['kube_node']['hosts']
+ kube_master = inventory_data['kube_master']['hosts']
+ etcd = inventory_data['etcd']['hosts']
-def main(inventories_path, ip_cfg):
- hosts = fetch_all_sorted_external_ip(ip_cfg)
- create_inventory_file(inventories_path, hosts)
+ create_inventory_file(inventories_path,
+ hostvars, kube_master, etcd, kube_node)
if __name__ == "__main__":
path = yaml.load(sys.argv[1])
- ipv_cfg = yaml.load(sys.argv[2])
+ local_inventory = yaml.load(sys.argv[2])
- main(path, ipv_cfg)
+ main(path, local_inventory)
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml index 4e902606..16d0b2c0 100644 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml @@ -58,11 +58,18 @@ tags: - ansible +- name: copy inventoriy.json file + copy: + src: /var/ansible/run/kubernetes-opnfv2/inventories/inventory.json + dest: /tmp/inventory.json + tags: + - ansible + - name: generate kargo inventories shell: > python /tmp/generate_inventories.py \ "/opt/kargo_k8s/inventory/inventory.cfg" \ - "{{ ip_settings | to_json }}" + "/tmp/inventory.json" tags: - ansible @@ -76,6 +83,12 @@ tags: - ansible +- name: enable helm + lineinfile: + dest: /opt/kargo_k8s/inventory/group_vars/k8s-cluster.yml + regexp: '^helm_enabled:' + line: 'helm_enabled: {{ helm_flag }}' + - name: run kargo playbook shell: | cd /opt/kargo_k8s diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/vars/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/vars/main.yml new file mode 100644 index 00000000..2d396d06 --- /dev/null +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/vars/main.yml @@ -0,0 +1,2 @@ +--- +helm_flag: true diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml index e1efebfa..ef7128c5 100644 --- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml +++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml @@ -23,6 +23,8 @@ - config-compute - storage - rt_kvm + - ins_dpdk + - ins_ovs - hosts: all remote_user: root @@ -44,17 +46,30 @@ roles: - post-osa +- hosts: + - neutron_openvswitch_agent + - compute + remote_user: root + roles: + - config-dpdk + - hosts: neutron_openvswitch_agent remote_user: root roles: - setup-openvswitch -- hosts: localhost +- hosts: + - localhost + - neutron_all + - galera_container + - network_hosts + - repo_container + - utility remote_user: root roles: - - setup-sfc + - setup-odl tags: - - sfc + - odl - hosts: - localhost @@ -63,11 +78,12 @@ - network_hosts - repo_container - utility + - tacker_all remote_user: root roles: - - setup-odl + - setup-odl-sfc tags: - - odl + - odl_sfc - hosts: - utility_all[0] diff --git a/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh b/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh index c598027f..fb197555 100644 --- a/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh +++ b/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh @@ -202,6 +202,17 @@ unset ROLE_VENV_WITH_INDEX #unset ROLE_VENV_WITH_INDEX ROLE_VENV_WITH_INDEX=false +ROLE_VENV_PATH="/tmp/openstack-venv-builder/venvs/tacker" +ROLE_VENV_FILE="tacker-15.1.4-x86_64" +if [ ! -f "${ROLE_VENV_FILE}.tgz" ];then + venv_create "${ROLE_VENV_PATH}" "${ROLE_VENV_FILE}" "${ROLE_VENV_WITH_INDEX}" "python-tackerclient mysql-python networking-sfc==4.0.0 pymysql python-heatclient python-tackerclient tacker" & + pid[3]=$! +fi +unset ROLE_VENV_PATH +unset ROLE_VENV_FILE +unset ROLE_VENV_WITH_INDEX + +ROLE_VENV_WITH_INDEX=false ROLE_VENV_PATH="/tmp/openstack-venv-builder/venvs/horizon" ROLE_VENV_FILE="horizon-15.1.4-x86_64" if [ ! -f "${ROLE_VENV_FILE}.tgz" ];then diff --git a/deploy/adapters/ansible/roles/config-osa/files/policy.json b/deploy/adapters/ansible/roles/config-osa/files/policy.json new file mode 100644 index 00000000..0aa0a3d1 --- /dev/null +++ b/deploy/adapters/ansible/roles/config-osa/files/policy.json @@ -0,0 +1,15 @@ +{ + "context_is_admin": "role:admin", + "segregation": "rule:context_is_admin", + + "telemetry:get_samples": "", + "telemetry:get_sample": "", + "telemetry:query_sample": "", + "telemetry:create_samples": "", + + "telemetry:compute_statistics": "", + "telemetry:get_meters": "", + + "telemetry:get_resource": "", + "telemetry:get_resources": "", +} diff --git a/deploy/adapters/ansible/roles/config-osa/files/requirements_absolute_requirements.txt b/deploy/adapters/ansible/roles/config-osa/files/requirements_absolute_requirements.txt index 56067a6c..c850b564 100644 --- a/deploy/adapters/ansible/roles/config-osa/files/requirements_absolute_requirements.txt +++ b/deploy/adapters/ansible/roles/config-osa/files/requirements_absolute_requirements.txt @@ -61,6 +61,7 @@ gnocchiclient==3.0.0 google_api_python_client==1.6.1 greenlet==0.4.11 heat==8.0.2.dev4 +heat_translator==0.7.0 horizon==11.0.2.dev21 httplib2==0.9.2 idna==2.2 @@ -102,6 +103,7 @@ ndg_httpsclient==0.4.2 netaddr==0.7.19 netifaces==0.10.5 networking_calico==1.3.2.dev3 +networking_sfc==4.0.0 networkx==1.11 neutron==10.0.2.dev45 neutron_dynamic_routing==10.0.1.dev8 @@ -137,6 +139,7 @@ oslo.reports==1.17.0 oslo.rootwrap==5.4.0 oslo.serialization==2.16.0 oslo.service==1.19.0 +oslosphinx==4.10.0 oslo.utils==3.22.0 oslo.versionedobjects==1.21.0 oslo.vmware==2.17.0 @@ -210,6 +213,7 @@ python_saharaclient==1.1.0 python_senlinclient==1.2.0 python_subunit==1.2.0 python_swiftclient==3.3.0 +python_tackerclient==0.9.0 python_troveclient==2.8.0 python_watcherclient==1.0.0 python_zaqarclient==1.4.0 @@ -251,6 +255,7 @@ sqlparse==0.2.2 statsd==3.2.1 stevedore==1.20.0 suds_jurko==0.6 +tacker==0.7.1.dev7 taskflow==2.9.0 tempest==14.0.1.dev142 tempita==0.5.2 @@ -259,6 +264,7 @@ testrepository==0.0.20 testtools==2.2.0 tinyrpc==0.5 tooz==1.48.0 +tosca_parser==0.7.0 traceback2==1.4.0 trollius==2.1 trove_dashboard==8.0.1.dev1 diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml index 139b426f..d96a83da 100755 --- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml +++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml @@ -138,6 +138,12 @@ {% endraw %} when: offline_deployment is defined and offline_deployment == "Enable" +# This is a bug in ocata, will be removed in the future +- name: limit the version of networking-sfc in os_tacker + shell: | + sed -i 's/networking-sfc$/networking-sfc=={{ networking_sfc_version }}/g' \ + /etc/ansible/roles/os_tacker/defaults/main.yml + - name: add rally and tempest to requirement.txt blockinfile: dest: /etc/ansible/roles/repo_build/tasks/repo_pre_build.yml @@ -229,26 +235,45 @@ src: user_ceph.yml dest: /etc/openstack_deploy/user_ceph.yml when: - - "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] | length > 0 }}" - - "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_mon'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_osd'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" - name: render ceph.yml.j2 template: src: ceph.yml.j2 dest: /etc/openstack_deploy/conf.d/ceph.yml when: - - "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] | length > 0 }}" - - "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_mon'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_osd'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" - name: render user_variables_ceph.yml.j2 template: src: user_variables_ceph.yml.j2 dest: /etc/openstack_deploy/user_variables_ceph.yml when: - - "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] | length > 0 }}" - - "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_mon'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_osd'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" - name: adapt no ha scenario include: noha.yml when: - "{{ hostvars[inventory_hostname]['groups']['controller'] | length < 2 }}" + +- name: copy the repo_fix_andas.yml + template: + src: repo_fix_pandas.yml + dest: /etc/ansible/roles/repo_build/tasks/repo_fix_pandas.yml + +- name: change repore build + lineinfile: + dest: /etc/ansible/roles/repo_build/tasks/main.yml + insertafter: "^- include: repo_post_build.yml" + line: "- include: repo_fix_pandas.yml" + +- include: meters.yml diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml new file mode 100644 index 00000000..163fc69d --- /dev/null +++ b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml @@ -0,0 +1,71 @@ +############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# ############################################################################# +--- +- name: modify the aodh haproxy config + replace: + dest: /opt/openstack-ansible/playbooks/vars/configs/haproxy_config.yml + regexp: '- "expect status 401"' + replace: '- "expect status 200"' + +- name: add OS_AUTH_TYPE in openrc + lineinfile: + dest: /etc/ansible/roles/openstack_openrc/templates/openrc.j2 + line: "export OS_AUTH_TYPE=password" + +- name: copy the ceilometer policy yaml + copy: + dest: /etc/ansible/roles/os_ceilometer/templates/policy.json.j2 + src: policy.json + mode: 0664 + +- name: replace the ceilometer policy + lineinfile: + dest: /etc/ansible/roles/os_ceilometer/tasks/ceilometer_post_install.yml + regexp: "ceilometer_policy_user_content" + line: ' src: "policy.json.j2"' + backrefs: "yes" + +- name: modify the os-ceilometer-install.yml + blockinfile: + dest: /opt/openstack-ansible/playbooks/os-ceilometer-install.yml + insertbefore: "common-tasks/package-cache-proxy.yml" + block: | + # create ceilometer db + - include: common-tasks/mysql-db-user.yml + static: no + vars: {% raw %} + user_name: "{{ ceilometer_galera_user }}" + password: "{{ ceilometer_container_db_password }}" + login_host: "{{ ceilometer_galera_address }}" + db_name: "{{ ceilometer_galera_database }}" + when: inventory_hostname == groups['ceilometer_all'][0]{% endraw %} + +- name: modify the os-ceilometer-install.yml + lineinfile: + dest: /opt/openstack-ansible/playbooks/os-ceilometer-install.yml + insertafter: "is_metal" + line: "{{ item }}" + with_items: + - " ceilometer_galera_user: ceilometer" + - " ceilometer_galera_database: ceilometer" + +- name: modify the os-ceilometer-install.yml + lineinfile: + dest: /opt/openstack-ansible/playbooks/os-ceilometer-install.yml + insertafter: "is_metal" + line: ' {% raw %} ceilometer_galera_address: "{{ galera_address }}"{% endraw %}' + +# yamllint disable rule:line-length +- name: change the ceilometer.conf.j2 + blockinfile: + dest: /etc/ansible/roles/os_ceilometer/templates/ceilometer.conf.j2 + block: | + [database]{% raw %} + connection = mysql+pymysql://{{ ceilometer_galera_user }}:{{ ceilometer_container_db_password }}@{{ceilometer_galera_address }}/{{ ceilometer_galera_database }}?charset=utf86{% endraw %} +# yamllint enable rule:line-length diff --git a/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2 index cadf5308..be119fbe 100644 --- a/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2 +++ b/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2 @@ -213,6 +213,13 @@ metrics_hosts: ip: {{ hostvars[host]['ansible_ssh_host'] }} {% endfor %} +# tacker (mano service) +mano_hosts: +{% for host in groups.controller%} + {{host}}: + ip: {{ hostvars[host]['ansible_ssh_host'] }} +{% endfor %} + # nova hypervisors compute_hosts: {% for host in groups.compute%} diff --git a/deploy/adapters/ansible/roles/config-osa/templates/repo_fix_pandas.yml b/deploy/adapters/ansible/roles/config-osa/templates/repo_fix_pandas.yml new file mode 100644 index 00000000..4605089f --- /dev/null +++ b/deploy/adapters/ansible/roles/config-osa/templates/repo_fix_pandas.yml @@ -0,0 +1,15 @@ +############################################################################## +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- name: change pandas version + shell: | + mkdir -p /tmp/pandas; + pip install pandas==0.20.3 -d /tmp/pandas; + rm -rf {{ repo_dest_path }}/pandas* + cp /tmp/pandas/pandas-0.20.3-cp27-cp27mu-manylinux1_x86_64.whl {{ repo_dest_path }} diff --git a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 index e43aa22c..ebd8ff09 100644 --- a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 +++ b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 @@ -19,7 +19,7 @@ # ## # # Debug and Verbose options. -debug: false +debug: true haproxy_keepalived_external_vip_cidr: "{{ public_vip.ip }}/32" haproxy_keepalived_internal_vip_cidr: "{{ internal_vip.ip }}/32" @@ -28,8 +28,10 @@ haproxy_keepalived_internal_interface: br-mgmt keepalived_ping_address: "{{ ntp_server }}" cinder_cinder_conf_overrides: - DEFAULT: - public_endpoint: "https://{{ public_vip.ip }}" + oslo_middleware: + enable_proxy_headers_parsing: True + +nfs_file_gw: False {% if "openvswitch" == NEUTRON_MECHANISM_DRIVERS[0] or "opendaylight" == NEUTRON_MECHANISM_DRIVERS[0] diff --git a/deploy/adapters/ansible/roles/config-osa/vars/main.yml b/deploy/adapters/ansible/roles/config-osa/vars/main.yml index 3c95bc64..0b3b0c1e 100644 --- a/deploy/adapters/ansible/roles/config-osa/vars/main.yml +++ b/deploy/adapters/ansible/roles/config-osa/vars/main.yml @@ -9,3 +9,5 @@ --- LOCAL_REPOSITORY_IP: "192.168.137.222" ceph_host: "{{ hostvars[inventory_hostname]['groups']['ceph_osd'][0] }}" +repo_dest_path: "/var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/" +networking_sfc_version: 4.0.0 diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/Ubuntu.yml b/deploy/adapters/ansible/roles/post-osa/tasks/Ubuntu.yml new file mode 100755 index 00000000..5d53d234 --- /dev/null +++ b/deploy/adapters/ansible/roles/post-osa/tasks/Ubuntu.yml @@ -0,0 +1,23 @@ +--- +- name: remove bridge ubuntu + template: + src: compute.j2 + dest: /etc/network/interfaces + notify: + - restart network service + +- name: fix mapping in compute + shell: | + {% set compute_mappings = [] %} + {% for key, value in compu_prv_mappings.iteritems() %} + {% set mapping = key + ":" + value["bridge"] %} + {% set _ = compute_mappings.append(mapping) %} + {% endfor %} + {% if compute_mappings | length != 0 %} + sed -i "s/^\(bridge_mappings\).*/\1 = {{ ','.join(compute_mappings) }}/g" \ + /etc/neutron/plugins/ml2/openvswitch_agent.ini + {% else %} + sed -i "/bridge_mappings/d" /etc/neutron/plugins/ml2/openvswitch_agent.ini + {% endif %} + +- meta: flush_handlers diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml index cf157d74..c48a5d1a 100644 --- a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml +++ b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml @@ -1,12 +1,10 @@ +############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## --- -- name: remove bridge ubuntu - template: - src: compute.j2 - dest: /etc/network/interfaces - notify: - - restart network service - when: ansible_distribution == 'Ubuntu' - -# TODO -# - name: remove bridge centos -# when: ansible_distribution == 'CentOS' +- include: "{{ ansible_distribution }}.yml" diff --git a/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml b/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml index 62edd34b..b7a8fbcb 100644 --- a/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml +++ b/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml @@ -22,22 +22,6 @@ notify: - restart neutron-openvswitch-agent -- name: fix mapping in compute - shell: | - {% set compute_mappings = [] %} - {% for key, value in compu_prv_mappings.iteritems() %} - {% set mapping = key + ":" + value["bridge"] %} - {% set _ = compute_mappings.append(mapping) %} - {% endfor %} - {% if compute_mappings | length != 0 %} - sed -i "s/^\(bridge_mappings\).*/\1 = {{ ','.join(compute_mappings) }}/g" \ - /etc/neutron/plugins/ml2/openvswitch_agent.ini - {% else %} - sed -i "/bridge_mappings/d" /etc/neutron/plugins/ml2/openvswitch_agent.ini - {% endif %} - notify: - - restart neutron-openvswitch-agent - - name: create compute bridges openvswitch_bridge: bridge: "{{ item['name'] }}" diff --git a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml index e024c671..50476c7b 100644 --- a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml +++ b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml @@ -43,3 +43,10 @@ line: "losetup -f /var/{{ item }}.img" insertbefore: "{{ rc_local_insert_before }}" with_items: "{{ ceph_osd_images }}" + +- name: Create ceph partitions at boot time + lineinfile: + dest: "{{ rc_local }}" + line: "partprobe -s {{ item }}" + insertbefore: "{{ rc_local_insert_before }}" + with_items: "{{ ceph_loopback.results | map(attribute='stdout') | list }}" diff --git a/deploy/adapters/ansible/roles/storage/tasks/main.yml b/deploy/adapters/ansible/roles/storage/tasks/main.yml index 3d9635cc..e04019ae 100755 --- a/deploy/adapters/ansible/roles/storage/tasks/main.yml +++ b/deploy/adapters/ansible/roles/storage/tasks/main.yml @@ -7,69 +7,21 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- -- name: check if physical device exists - stat: path={{ physical_device }} - register: status - tags: - - storage - -- name: load loop.yml - include: loop.yml - when: status.stat.exists == False or status.stat.isblk == False - tags: - - storage - -- name: load real.yml - include: real.yml - when: status.stat.exists == True and status.stat.isblk == True - tags: - - storage - -- name: make setup_storage directory - file: path=/opt/setup_storage state=directory mode=0755 - tags: - - storage - -- name: copy setup storage scripts - copy: src={{ item }} dest=/opt/setup_storage mode=0755 - with_items: - - losetup.sh - tags: - - storage - -- name: set autostart file - copy: src=storage dest=/etc/init.d/storage mode=0755 - tags: - - storage - -- name: set autostart file for centos - copy: - src: storage.service - dest: /usr/lib/systemd/system/storage.service - mode: 0755 - when: ansible_os_family == "RedHat" - tags: - - storage - -- name: add to boot scripts - shell: update-rc.d storage defaults - when: ansible_os_family == "Debian" - tags: - - storage - -- name: add to boot scripts - shell: | - chkconfig --add storage; - chkconfig --level 2345 storage on; - when: ansible_os_family == 'RedHat' +- name: load storage.yml + include: storage.yml + when: + - hostvars[inventory_hostname]['groups']['ceph_mon'] is not defined + - hostvars[inventory_hostname]['groups']['ceph_osd'] is not defined tags: - storage - name: load ceph.yml include: ceph.yml when: - - "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] |length > 0 }}" - - "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_mon'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_mon'] | length > 0 }}" + - hostvars[inventory_hostname]['groups']['ceph_osd'] is defined and + "{{ hostvars[inventory_hostname]['groups']['ceph_osd'] | length > 0 }}" tags: - storage diff --git a/deploy/adapters/ansible/roles/storage/tasks/storage.yml b/deploy/adapters/ansible/roles/storage/tasks/storage.yml new file mode 100755 index 00000000..b054be9e --- /dev/null +++ b/deploy/adapters/ansible/roles/storage/tasks/storage.yml @@ -0,0 +1,68 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- name: check if physical device exists + stat: path={{ physical_device }} + register: status + tags: + - storage + +- name: load loop.yml + include: loop.yml + when: status.stat.exists == False or status.stat.isblk == False + tags: + - storage + +- name: load real.yml + include: real.yml + when: status.stat.exists == True and status.stat.isblk == True + tags: + - storage + +- name: make setup_storage directory + file: path=/opt/setup_storage state=directory mode=0755 + tags: + - storage + +- name: copy setup storage scripts + copy: src={{ item }} dest=/opt/setup_storage mode=0755 + with_items: + - losetup.sh + tags: + - storage + +- name: set autostart file + copy: src=storage dest=/etc/init.d/storage mode=0755 + tags: + - storage + +- name: set autostart file for centos + copy: + src: storage.service + dest: /usr/lib/systemd/system/storage.service + mode: 0755 + when: ansible_os_family == "RedHat" + tags: + - storage + +- name: add to boot scripts + shell: update-rc.d storage defaults + when: ansible_os_family == "Debian" + tags: + - storage + +- name: add to boot scripts + shell: | + chkconfig --add storage; + chkconfig --level 2345 storage on; + when: ansible_os_family == 'RedHat' + tags: + - storage + +- meta: flush_handlers diff --git a/deploy/compass_conf/flavor/kubernetes.conf b/deploy/compass_conf/flavor/kubernetes.conf index 96b5f95f..35c43155 100644..100755 --- a/deploy/compass_conf/flavor/kubernetes.conf +++ b/deploy/compass_conf/flavor/kubernetes.conf @@ -4,7 +4,7 @@ FLAVORS = [{ 'display_name': 'ansible-kubernetes', 'template': 'ansible-kubernetes.tmpl', 'roles': [ - 'controller', 'compute', 'ha', 'odl', 'onos', 'opencontrail', 'ceph', 'ceph-adm', 'ceph-mon', 'ceph-osd', 'sec-patch', 'ceph-osd-node' + 'kube_master', 'etcd', 'kube_node' ], }] diff --git a/deploy/compass_conf/flavor_mapping/kubernetes.conf b/deploy/compass_conf/flavor_mapping/kubernetes.conf index e569ea46..e569ea46 100644..100755 --- a/deploy/compass_conf/flavor_mapping/kubernetes.conf +++ b/deploy/compass_conf/flavor_mapping/kubernetes.conf diff --git a/deploy/compass_conf/flavor_metadata/ansible-kubernetes.conf b/deploy/compass_conf/flavor_metadata/ansible-kubernetes.conf index f878d58c..f878d58c 100644..100755 --- a/deploy/compass_conf/flavor_metadata/ansible-kubernetes.conf +++ b/deploy/compass_conf/flavor_metadata/ansible-kubernetes.conf diff --git a/deploy/compass_conf/package_installer/ansible-kubernetes.conf b/deploy/compass_conf/package_installer/ansible-kubernetes.conf index c706ccb2..32590c82 100644..100755 --- a/deploy/compass_conf/package_installer/ansible-kubernetes.conf +++ b/deploy/compass_conf/package_installer/ansible-kubernetes.conf @@ -7,7 +7,7 @@ SETTINGS = { 'playbook_file': 'site.yml', 'inventory_file': 'inventory.py', 'inventory_json_file': 'inventory.json', - 'inventory_group': ['controller', 'compute', 'ha', 'odl', 'onos', 'opencontrail', 'ceph_adm', 'ceph_mon', 'ceph_osd', 'moon'], + 'inventory_group': ['kube_master', 'etcd', 'kube_node'], 'group_variable': 'all', 'etc_hosts_path': 'roles/pre-k8s/templates/hosts', 'runner_dirs': ['roles','kubernetes/roles'] diff --git a/deploy/compass_conf/role/kubernetes_ansible.conf b/deploy/compass_conf/role/kubernetes_ansible.conf index 89c03d94..ae096f47 100644..100755 --- a/deploy/compass_conf/role/kubernetes_ansible.conf +++ b/deploy/compass_conf/role/kubernetes_ansible.conf @@ -1,115 +1,15 @@ ADAPTER_NAME = 'kubernetes' ROLES = [{ - 'role': 'allinone-compute', - 'display_name': 'all in one', - 'description': 'All in One' -}, { - 'role': 'controller', - 'display_name': 'controller node', - 'description': 'Controller Node' -}, { - 'role': 'compute', - 'display_name': 'compute node', - 'description': 'Compute Node' -}, { - 'role': 'storage', - 'display_name': 'storage node', - 'description': 'Storage Node' -}, { - 'role': 'network', - 'display_name': 'network node', - 'description': 'Network Node' -}, { - 'role': 'compute-worker', - 'display_name': 'Compute worker node', - 'description': 'Compute worker node' -}, { - 'role': 'compute-controller', - 'display_name': 'Compute controller node', - 'description': 'Compute controller node' -}, { - 'role': 'network-server', - 'display_name': 'Network server node', - 'description': 'Network server node' -}, { - 'role': 'database', - 'display_name': 'Database node', - 'description': 'Database node' -}, { - 'role': 'messaging', - 'display_name': 'Messaging queue node', - 'description': 'Messaging queue node' -}, { - 'role': 'image', - 'display': 'Image node', - 'description': 'Image node' -}, { - 'role': 'dashboard', - 'display': 'Dashboard node', - 'description': 'Dashboard node' -}, { - 'role': 'identity', - 'display': 'Identity node', - 'description': 'Identity node' -}, { - 'role': 'storage-controller', - 'display': 'Storage controller node', - 'description': 'Storage controller node' -}, { - 'role': 'storage-volume', - 'display': 'Storage volume node', - 'description': 'Storage volume node' -}, { - 'role': 'network-worker', - 'display': 'Network worker node', - 'description': 'Network worker node' -}, { - 'role': 'odl', - 'display': 'open day light', - 'description': 'odl node', - 'optional': True -}, { - 'role': 'onos', - 'display': 'open network operating system', - 'description': 'onos node', - 'optional': True -}, { - 'role': 'opencontrail', - 'display': 'open contrail', - 'description': 'opencontrail node', - 'optional': True -}, { - 'role': 'ha', - 'display': 'Cluster with HA', - 'description': 'Cluster with HA node' -}, { - 'role': 'ceph-adm', - 'display': 'Ceph Admin Node', - 'description': 'Ceph Admin Node', - 'optional': True -}, { - 'role': 'ceph-mon', - 'display': 'Ceph Monitor Node', - 'description': 'Ceph Monitor Node', - 'optional': True -}, { - 'role': 'ceph-osd', - 'display': 'Ceph Storage Node', - 'description': 'Ceph Storage Node', - 'optional': True -}, { - 'role': 'ceph-osd-node', - 'display': 'Ceph osd install from node', - 'description': '', - 'optional': True -}, { - 'role': 'ceph', - 'display': 'ceph node', - 'description': 'ceph node', - 'optional': True -}, { - 'role': 'sec-patch', - 'display': 'sec-patch node', - 'description': 'Security Patch Node', - 'optional': True -}] + 'role': 'kube_master', + 'display_name': 'kubnernets master node', + 'description': ' include kube-api,kube-scheduler' +}, { + 'role': 'etcd', + 'display_name': 'etcd node', + 'description': 'etcd Node' +}, { + 'role': 'kube_node', + 'display_name': 'kube node', + 'description': 'kube Node' +} +] diff --git a/deploy/compass_conf/templates/ansible_installer/kubernetes/hosts/ansible-kubernetes.tmpl b/deploy/compass_conf/templates/ansible_installer/kubernetes/hosts/ansible-kubernetes.tmpl index 9d628b5e..0a9e3025 100644 --- a/deploy/compass_conf/templates/ansible_installer/kubernetes/hosts/ansible-kubernetes.tmpl +++ b/deploy/compass_conf/templates/ansible_installer/kubernetes/hosts/ansible-kubernetes.tmpl @@ -9,22 +9,22 @@ # localhost 127.0.0.1 localhost -#set controllers = $getVar('controller', []) -#set computes = $getVar('compute', []) -#if not $isinstance($controllers, list) - #set controllers = [$controllers] +#set kube_masters = $getVar('kube_master', []) +#set kube_nodes = $getVar('kube_node', []) +#if not $isinstance($kube_masters, list) + #set kube_masters = [$kube_masters] #end if -#if not $isinstance($compute, list) - #set computes = [$computes] +#if not $isinstance($kube_nodes, list) + #set kube_nodes = [$kube_nodes] #end if -# controller -#for worker in $controllers +# kube_master +#for worker in $kube_masters #set worker_hostname = $worker.hostname #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname #end for -# compute -#for worker in $computes +# kube_node +#for worker in $kube_nodes #set worker_hostname = $worker.hostname #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname diff --git a/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl b/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl index 27211e06..440bf7d7 100644 --- a/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl +++ b/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl @@ -20,8 +20,8 @@ #set has = $getVar('ha', []) #set ha_vip = $getVar('ha_vip', []) -#set controllers = $getVar('controller', []) -#set computers = $getVar('compute', []) +#set kube_masters = $getVar('kube_master', []) +#set kube_nodes = $getVar('kube_node', []) enable_secgroup: $getVar('enable_secgroup', True) enable_fwaas: $getVar('enable_fwaas', True) @@ -35,7 +35,7 @@ network_cfg: $network_cfg sys_intf_mappings: $sys_intf_mappings deploy_type: $getVar('deploy_type', 'virtual') -public_cidr: $computers[0]['install']['subnet'] +public_cidr: $kube_nodes[0]['install']['subnet'] storage_cidr: "{{ ip_settings[inventory_hostname]['storage']['cidr'] }}" mgmt_cidr: "{{ ip_settings[inventory_hostname]['mgmt']['cidr'] }}" diff --git a/deploy/conf/cluster.conf b/deploy/conf/cluster.conf index ddcbb6c3..c9e565ad 100644 --- a/deploy/conf/cluster.conf +++ b/deploy/conf/cluster.conf @@ -8,8 +8,8 @@ else export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*16.*'} fi -# newton -export OPENSTACK_VERSION=${OPENSTACK_VERSION:-"newton"} +# ocata +export OPENSTACK_VERSION=${OPENSTACK_VERSION:-"ocata"} # don't touch this export ADAPTER_TARGET_SYSTEM_PATTERN="^openstack$" diff --git a/deploy/conf/compass.conf b/deploy/conf/compass.conf index ba9d8a7d..98ba3027 100644 --- a/deploy/conf/compass.conf +++ b/deploy/conf/compass.conf @@ -14,11 +14,12 @@ export COMPASS_EXTERNAL_GW=${COMPASS_EXTERNAL_GW:-} export LANGUAGE="EN" export TIMEZONE="America/Los_Angeles" export NTP_SERVER="$COMPASS_SERVER" -export NAMESERVERS="$COMPASS_SERVER" +export NAMESERVERS=${USER_NAMESERVER:-"$COMPASS_SERVER"} export COMPASS_REPO_PORT="5151" +export OFFLINE_DEPLOY=${OFFLINE_DEPLOY:-'Disable'} export COMPASS_DECK="compass4nfv/compass-deck" -export COMPASS_TASKS="compass4nfv/compass-tasks-osa" +export COMPASS_TASKS="compass4nfv/compass-tasks-osa:euphrates" if [[ "x"$KUBERNETES_VERSION != "x" ]]; then export COMPASS_TASKS="compass4nfv/compass-tasks-k8s" @@ -27,4 +28,4 @@ fi export COMPASS_COBBLER="compass4nfv/compass-cobbler" export COMPASS_DB="compass4nfv/compass-db" export COMPASS_MQ="compass4nfv/compass-mq" -export COMPASS_REPO="compass4nfv/compass-repo-osa-ubuntu" +export COMPASS_REPO="compass4nfv/compass-repo-osa-ubuntu:euphrates" diff --git a/deploy/conf/hardware_environment/huawei-pod1/k8-nosdn-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/k8-nosdn-nofeature-ha.yml new file mode 100644 index 00000000..995d0107 --- /dev/null +++ b/deploy/conf/hardware_environment/huawei-pod1/k8-nosdn-nofeature-ha.yml @@ -0,0 +1,65 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +TYPE: baremetal +FLAVOR: cluster +POWER_TOOL: ipmitool + +ipmiUser: root +ipmiVer: '2.0' + +hosts: + - name: host1 + mac: 'F8:4A:BF:55:A2:8D' + interfaces: + - eth1: 'F8:4A:BF:55:A2:8E' + ipmiIp: 172.16.130.26 + ipmiPass: Opnfv@pod1 + roles: + - kube_master + - etcd + + - name: host2 + mac: 'D8:49:0B:DA:5A:B7' + interfaces: + - eth1: 'D8:49:0B:DA:5A:B8' + ipmiIp: 172.16.130.27 + ipmiPass: Opnfv@pod1 + roles: + - kube_master + - etcd + + - name: host3 + mac: '78:D7:52:A0:B1:99' + interfaces: + - eth1: '78:D7:52:A0:B1:9A' + ipmiIp: 172.16.130.29 + ipmiPass: Opnfv@pod1 + roles: + - kube_master + - etcd + + - name: host4 + mac: 'D8:49:0B:DA:5B:5D' + interfaces: + - eth1: 'D8:49:0B:DA:5B:5E' + ipmiIp: 172.16.130.30 + ipmiPass: Opnfv@pod1 + roles: + - kube_node + + - name: host5 + mac: 'D8:49:0B:DA:56:85' + interfaces: + - eth1: 'D8:49:0B:DA:56:86' + ipmiIp: 172.16.130.31 + ipmiPass: Opnfv@pod1 + roles: + - kube_node diff --git a/deploy/conf/hardware_environment/huawei-pod1/network_dpdk.yml b/deploy/conf/hardware_environment/huawei-pod1/network_dpdk.yml new file mode 100644 index 00000000..03483629 --- /dev/null +++ b/deploy/conf/hardware_environment/huawei-pod1/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.168.10.10" + - "192.168.10.50" + cidr: "192.168.10.0/24" + gw: "192.168.10.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.168.10.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.168.10.1" + floating_ip_cidr: "192.168.10.0/24" + floating_ip_start: "192.168.10.100" + floating_ip_end: "192.168.10.200" diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-ovs_dpdk-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-ovs_dpdk-ha.yml new file mode 100644 index 00000000..5b9d1c09 --- /dev/null +++ b/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-ovs_dpdk-ha.yml @@ -0,0 +1,75 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +TYPE: baremetal +FLAVOR: cluster +POWER_TOOL: ipmitool + +ipmiUser: root +ipmiVer: '2.0' + +plugins: + - dpdk: "Enable" + +hosts: + - name: host1 + mac: 'F8:4A:BF:55:A2:8D' + interfaces: + - eth1: 'F8:4A:BF:55:A2:8E' + - eth1: 'F8:4A:BF:55:A2:8E' + ipmiIp: 172.16.130.26 + ipmiPass: Opnfv@pod1 + roles: + - controller + - ha + - ceph-adm + - ceph-mon + + - name: host2 + mac: 'D8:49:0B:DA:5A:B7' + interfaces: + - eth1: 'D8:49:0B:DA:5A:B8' + ipmiIp: 172.16.130.27 + ipmiPass: Opnfv@pod1 + roles: + - controller + - ha + - ceph-mon + + - name: host3 + mac: '78:D7:52:A0:B1:99' + interfaces: + - eth1: '78:D7:52:A0:B1:9A' + ipmiIp: 172.16.130.29 + ipmiPass: Opnfv@pod1 + roles: + - controller + - ha + - ceph-mon + + - name: host4 + mac: 'D8:49:0B:DA:5B:5D' + interfaces: + - eth1: 'D8:49:0B:DA:5B:5E' + ipmiIp: 172.16.130.30 + ipmiPass: Opnfv@pod1 + roles: + - compute + - ceph-osd + + - name: host5 + mac: 'D8:49:0B:DA:56:85' + interfaces: + - eth1: 'D8:49:0B:DA:56:86' + ipmiIp: 172.16.130.31 + ipmiPass: Opnfv@pod1 + roles: + - compute + - ceph-osd diff --git a/deploy/conf/hardware_environment/huawei-pod2/network.yml b/deploy/conf/hardware_environment/huawei-pod2/network.yml index 7ea69819..ccf66a47 100644 --- a/deploy/conf/hardware_environment/huawei-pod2/network.yml +++ b/deploy/conf/hardware_environment/huawei-pod2/network.yml @@ -12,34 +12,42 @@ nic_mappings: [] bond_mappings: [] provider_net_mappings: - - name: br-prv + - name: br-provider network: physnet - interface: eth1 + interface: eth10 type: ovs role: - controller - - compute sys_intf_mappings: - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant interface: eth1 + type: normal vlan_tag: 101 - type: vlan role: - controller - compute - name: storage interface: eth1 + type: normal vlan_tag: 102 - type: vlan role: - controller - compute - name: external - interface: br-prv - type: ovs + interface: eth1 + type: normal + vlan_tag: None role: - controller - compute @@ -47,8 +55,21 @@ sys_intf_mappings: ip_settings: - name: mgmt ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: - - "172.16.1.1" - - "172.16.1.254" + - "172.16.1.50" cidr: "172.16.1.0/24" role: - controller @@ -57,7 +78,7 @@ ip_settings: - name: storage ip_ranges: - - "172.16.2.1" - - "172.16.2.254" + - "172.16.2.50" cidr: "172.16.2.0/24" role: - controller @@ -66,7 +87,7 @@ ip_settings: - name: external ip_ranges: - - "192.168.11.10" - - "192.168.11.15" + - "192.168.11.50" cidr: "192.168.11.0/24" gw: "192.168.11.1" role: @@ -74,21 +95,26 @@ ip_settings: - compute internal_vip: - ip: 172.16.1.222 + ip: 10.1.0.222 netmask: "24" interface: mgmt public_vip: - ip: 192.168.11.18 + ip: 192.168.11.222 netmask: "24" interface: external onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + public_net_info: enable: "True" network: ext-net type: flat - segment_id: 1000 + segment_id: 10 subnet: ext-subnet provider_network: physnet router: router-ext @@ -96,5 +122,5 @@ public_net_info: no_gateway: "False" external_gw: "192.168.11.1" floating_ip_cidr: "192.168.11.0/24" - floating_ip_start: "192.168.11.30" - floating_ip_end: "192.168.11.100" + floating_ip_start: "192.168.11.100" + floating_ip_end: "192.168.11.200" diff --git a/deploy/conf/hardware_environment/huawei-pod2/network_dpdk.yml b/deploy/conf/hardware_environment/huawei-pod2/network_dpdk.yml new file mode 100644 index 00000000..b357a6e1 --- /dev/null +++ b/deploy/conf/hardware_environment/huawei-pod2/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.168.11.10" + - "192.168.11.50" + cidr: "192.168.11.0/24" + gw: "192.168.11.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.168.11.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.168.11.1" + floating_ip_cidr: "192.168.11.0/24" + floating_ip_start: "192.168.11.100" + floating_ip_end: "192.168.11.200" diff --git a/deploy/conf/hardware_environment/huawei-pod2/network_ocl.yml b/deploy/conf/hardware_environment/huawei-pod2/network_ocl.yml index 60ee393e..dc01aa1a 100644 --- a/deploy/conf/hardware_environment/huawei-pod2/network_ocl.yml +++ b/deploy/conf/hardware_environment/huawei-pod2/network_ocl.yml @@ -66,7 +66,7 @@ ip_settings: - name: external ip_ranges: - - "192.168.11.10" - - "192.168.11.15" + - "192.168.11.50" cidr: "192.168.11.0/24" gw: "192.168.11.1" role: @@ -79,7 +79,7 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.11.18 + ip: 192.168.11.51 netmask: "24" interface: external @@ -88,7 +88,7 @@ public_net_info: enable: "True" network: ext-net type: flat - segment_id: 1000 + segment_id: 10 subnet: ext-subnet provider_network: physnet router: router-ext diff --git a/deploy/conf/hardware_environment/huawei-pod2/network_onos.yml b/deploy/conf/hardware_environment/huawei-pod2/network_onos.yml index ada82be9..2322e075 100644 --- a/deploy/conf/hardware_environment/huawei-pod2/network_onos.yml +++ b/deploy/conf/hardware_environment/huawei-pod2/network_onos.yml @@ -66,7 +66,7 @@ ip_settings: - name: external ip_ranges: - - "192.168.11.10" - - "192.168.11.15" + - "192.168.11.50" cidr: "192.168.11.0/24" gw: "192.168.11.1" role: @@ -79,7 +79,7 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.11.18 + ip: 192.168.11.51 netmask: "24" interface: external @@ -88,7 +88,7 @@ public_net_info: enable: "True" network: ext-net type: vxlan - segment_id: 1000 + segment_id: 10 subnet: ext-subnet provider_network: physnet router: router-ext @@ -96,5 +96,5 @@ public_net_info: no_gateway: "False" external_gw: "192.168.11.1" floating_ip_cidr: "192.168.11.0/24" - floating_ip_start: "192.168.11.30" - floating_ip_end: "192.168.11.100" + floating_ip_start: "192.168.11.100" + floating_ip_end: "192.168.11.200" diff --git a/deploy/conf/hardware_environment/huawei-pod2/network_openo.yml b/deploy/conf/hardware_environment/huawei-pod2/network_openo.yml index 1bba2daa..0672a75f 100644 --- a/deploy/conf/hardware_environment/huawei-pod2/network_openo.yml +++ b/deploy/conf/hardware_environment/huawei-pod2/network_openo.yml @@ -66,7 +66,7 @@ ip_settings: - name: external ip_ranges: - - "192.168.11.10" - - "192.168.11.15" + - "192.168.11.50" cidr: "192.168.11.0/24" gw: "192.168.11.1" role: @@ -79,7 +79,7 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.11.18 + ip: 192.168.11.51 netmask: "24" interface: external @@ -93,7 +93,7 @@ public_net_info: enable: "True" network: ext-net type: flat - segment_id: 1000 + segment_id: 10 subnet: ext-subnet provider_network: physnet router: router-ext @@ -101,5 +101,5 @@ public_net_info: no_gateway: "False" external_gw: "192.168.11.1" floating_ip_cidr: "192.168.11.0/24" - floating_ip_start: "192.168.11.30" - floating_ip_end: "192.168.11.100" + floating_ip_start: "192.168.11.100" + floating_ip_end: "192.168.11.200" diff --git a/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-kvm-ha.yml b/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-kvm-ha.yml new file mode 100644 index 00000000..4895b581 --- /dev/null +++ b/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-kvm-ha.yml @@ -0,0 +1,80 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- + +TYPE: baremetal +FLAVOR: cluster +POWER_TOOL: ipmitool + +ipmiVer: '2.0' + + +plugins: + - rt_kvm: "Enable" + +hosts: + - name: host1 + mac: 'EC:38:8F:79:0C:2C' + ipmiUser: root + ipmiPass: Opnfv@pod2 + ipmiIp: 172.16.130.20 + interfaces: + - eth1: 'EC:38:8F:79:0C:2D' + roles: + - controller + - ha + - ceph-adm + - ceph-mon + + - name: host2 + mac: 'EC:38:8F:79:0C:48' + ipmiIp: 172.16.130.19 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:0C:49' + roles: + - controller + - ha + - ceph-mon + + - name: host3 + mac: 'EC:38:8F:79:10:CC' + ipmiIp: 172.16.130.18 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:10:CD' + roles: + - controller + - ha + - ceph-mon + + - name: host4 + mac: 'EC:38:8F:79:0C:6C' + ipmiIp: 172.16.130.17 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:0C:6D' + roles: + - compute + - ceph-osd + + - name: host5 + mac: 'EC:38:8F:7A:E6:ED' + ipmiIp: 172.16.130.16 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:7A:E6:EE' + roles: + - compute + - ceph-osd diff --git a/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-ovs_dpdk-ha.yml b/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-ovs_dpdk-ha.yml new file mode 100644 index 00000000..3fdfe6b7 --- /dev/null +++ b/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-ovs_dpdk-ha.yml @@ -0,0 +1,84 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- + +TYPE: baremetal +FLAVOR: cluster +POWER_TOOL: ipmitool + +ipmiVer: '2.0' + +plugins: + - dpdk: "Enable" + +hosts: + - name: host1 + mac: 'EC:38:8F:79:0C:2C' + ipmiUser: root + ipmiPass: Opnfv@pod2 + ipmiIp: 172.16.130.20 + interfaces: + - eth1: 'EC:38:8F:79:0C:2D' + - eth2: 'EC:38:8F:79:0C:2E' + roles: + - controller + - ha + - ceph-adm + - ceph-mon + + - name: host2 + mac: 'EC:38:8F:79:0C:48' + ipmiIp: 172.16.130.19 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:0C:49' + - eth2: 'EC:38:8F:79:0C:4A' + roles: + - controller + - ha + - ceph-mon + + - name: host3 + mac: 'EC:38:8F:79:10:CC' + ipmiIp: 172.16.130.18 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:10:CD' + - eth2: 'EC:38:8F:79:10:CE' + roles: + - controller + - ha + - ceph-mon + + - name: host4 + mac: 'EC:38:8F:79:0C:6C' + ipmiIp: 172.16.130.17 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:0C:6D' + - eth2: 'EC:38:8F:79:0C:6E' + roles: + - compute + - ceph-osd + + - name: host5 + mac: 'EC:38:8F:7A:E6:ED' + ipmiIp: 172.16.130.16 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:7A:E6:EE' + - eth2: 'EC:38:8F:7A:E6:EF' + roles: + - compute + - ceph-osd diff --git a/deploy/conf/hardware_environment/huawei-pod2/os-odl-sfc-ha.yml b/deploy/conf/hardware_environment/huawei-pod2/os-odl-sfc-ha.yml new file mode 100644 index 00000000..1a8a12a0 --- /dev/null +++ b/deploy/conf/hardware_environment/huawei-pod2/os-odl-sfc-ha.yml @@ -0,0 +1,86 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- + +TYPE: baremetal +FLAVOR: cluster +POWER_TOOL: ipmitool + +ipmiVer: '2.0' + +odl_l3_agent: "Enable" +plugins: + - opendaylight: "Enable" + - odl_sfc: "Enable" + +hosts: + - name: host1 + mac: 'EC:38:8F:79:0C:2C' + ipmiUser: root + ipmiPass: Opnfv@pod2 + ipmiIp: 172.16.130.20 + interfaces: + - eth1: 'EC:38:8F:79:0C:2D' + roles: + - controller + - ha + - odl + - ceph-adm + - ceph-mon + + - name: host2 + mac: 'EC:38:8F:79:0C:48' + ipmiIp: 172.16.130.19 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:0C:49' + roles: + - controller + - ha + - odl + - ceph-mon + + + - name: host3 + mac: 'EC:38:8F:79:10:CC' + ipmiIp: 172.16.130.18 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:10:CD' + roles: + - controller + - ha + - odl + - ceph-mon + + + - name: host4 + mac: 'EC:38:8F:79:0C:6C' + ipmiIp: 172.16.130.17 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:79:0C:6D' + roles: + - compute + - ceph-osd + + - name: host5 + mac: 'EC:38:8F:7A:E6:ED' + ipmiIp: 172.16.130.16 + ipmiUser: root + ipmiPass: Opnfv@pod2 + interfaces: + - eth1: 'EC:38:8F:7A:E6:EE' + roles: + - compute + - ceph-osd diff --git a/deploy/conf/hardware_environment/huawei-pod2/os-odl_l2-moon-ha.yml b/deploy/conf/hardware_environment/huawei-pod2/os-odl_l2-moon-ha.yml index 86da1dfb..7cc5cc66 100644 --- a/deploy/conf/hardware_environment/huawei-pod2/os-odl_l2-moon-ha.yml +++ b/deploy/conf/hardware_environment/huawei-pod2/os-odl_l2-moon-ha.yml @@ -15,9 +15,9 @@ POWER_TOOL: ipmitool ipmiVer: '2.0' -moon: "Enable" plugins: - opendaylight: "Enable" + - moon: "Enable" hosts: - name: host1 @@ -81,5 +81,4 @@ hosts: interfaces: - eth1: 'EC:38:8F:7A:E6:EE' roles: - - compute - - ceph-osd + - moon diff --git a/deploy/conf/network_cfg_dpdk.yaml b/deploy/conf/network_cfg_dpdk.yaml new file mode 100644 index 00000000..e196d6f4 --- /dev/null +++ b/deploy/conf/network_cfg_dpdk.yaml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.16.1.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual1/network_dpdk.yml b/deploy/conf/vm_environment/huawei-virtual1/network_dpdk.yml new file mode 100644 index 00000000..e196d6f4 --- /dev/null +++ b/deploy/conf/vm_environment/huawei-virtual1/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.16.1.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual2/network_dpdk.yml b/deploy/conf/vm_environment/huawei-virtual2/network_dpdk.yml new file mode 100644 index 00000000..e196d6f4 --- /dev/null +++ b/deploy/conf/vm_environment/huawei-virtual2/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.16.1.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual3/network.yml b/deploy/conf/vm_environment/huawei-virtual3/network.yml index 40238276..4359202e 100644 --- a/deploy/conf/vm_environment/huawei-virtual3/network.yml +++ b/deploy/conf/vm_environment/huawei-virtual3/network.yml @@ -12,34 +12,42 @@ nic_mappings: [] bond_mappings: [] provider_net_mappings: - - name: br-prv + - name: br-provider network: physnet - interface: eth1 + interface: eth10 type: ovs role: - controller - - compute sys_intf_mappings: - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant interface: eth1 + type: normal vlan_tag: 101 - type: vlan role: - controller - compute - name: storage interface: eth1 + type: normal vlan_tag: 102 - type: vlan role: - controller - compute - name: external - interface: br-prv - type: ovs + interface: eth1 + type: normal + vlan_tag: None role: - controller - compute @@ -47,8 +55,21 @@ sys_intf_mappings: ip_settings: - name: mgmt ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: - - "172.16.1.1" - - "172.16.1.254" + - "172.16.1.50" cidr: "172.16.1.0/24" role: - controller @@ -57,7 +78,7 @@ ip_settings: - name: storage ip_ranges: - - "172.16.2.1" - - "172.16.2.254" + - "172.16.2.50" cidr: "172.16.2.0/24" role: - controller @@ -65,25 +86,30 @@ ip_settings: - name: external ip_ranges: - - - "192.168.101.210" - - "192.168.101.220" - cidr: "192.168.101.0/24" - gw: "192.168.101.1" + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" role: - controller - compute internal_vip: - ip: 172.16.1.222 + ip: 10.1.0.222 netmask: "24" interface: mgmt public_vip: - ip: 192.168.101.222 + ip: 192.16.1.222 netmask: "24" interface: external onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + public_net_info: enable: "True" network: ext-net @@ -94,7 +120,7 @@ public_net_info: router: router-ext enable_dhcp: "False" no_gateway: "False" - external_gw: "192.168.101.1" - floating_ip_cidr: "192.168.101.0/24" - floating_ip_start: "192.168.101.101" - floating_ip_end: "192.168.101.199" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual3/network_dpdk.yml b/deploy/conf/vm_environment/huawei-virtual3/network_dpdk.yml new file mode 100644 index 00000000..e196d6f4 --- /dev/null +++ b/deploy/conf/vm_environment/huawei-virtual3/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.16.1.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual3/network_ocl.yml b/deploy/conf/vm_environment/huawei-virtual3/network_ocl.yml index dfda8d02..b5a57103 100644 --- a/deploy/conf/vm_environment/huawei-virtual3/network_ocl.yml +++ b/deploy/conf/vm_environment/huawei-virtual3/network_ocl.yml @@ -65,10 +65,10 @@ ip_settings: - name: external ip_ranges: - - - "192.168.101.210" - - "192.168.101.220" - cidr: "192.168.101.0/24" - gw: "192.168.101.1" + - - "192.168.107.210" + - "192.168.107.220" + cidr: "192.168.107.0/24" + gw: "192.168.107.1" role: - controller - compute @@ -79,7 +79,7 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.101.222 + ip: 192.168.107.222 netmask: "24" interface: external diff --git a/deploy/conf/vm_environment/huawei-virtual3/network_onos.yml b/deploy/conf/vm_environment/huawei-virtual3/network_onos.yml index 550093e5..ce5353eb 100644 --- a/deploy/conf/vm_environment/huawei-virtual3/network_onos.yml +++ b/deploy/conf/vm_environment/huawei-virtual3/network_onos.yml @@ -65,10 +65,10 @@ ip_settings: - name: external ip_ranges: - - - "192.168.101.210" - - "192.168.101.220" - cidr: "192.168.101.0/24" - gw: "192.168.101.1" + - - "192.168.107.210" + - "192.168.107.220" + cidr: "192.168.107.0/24" + gw: "192.168.107.1" role: - controller - compute @@ -79,7 +79,7 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.101.222 + ip: 192.168.107.222 netmask: "24" interface: external @@ -94,7 +94,7 @@ public_net_info: router: router-ext enable_dhcp: "False" no_gateway: "False" - external_gw: "192.168.101.1" - floating_ip_cidr: "192.168.101.0/24" - floating_ip_start: "192.168.101.101" - floating_ip_end: "192.168.101.199" + external_gw: "192.168.107.1" + floating_ip_cidr: "192.168.107.0/24" + floating_ip_start: "192.168.107.101" + floating_ip_end: "192.168.107.199" diff --git a/deploy/conf/vm_environment/huawei-virtual3/network_openo.yml b/deploy/conf/vm_environment/huawei-virtual3/network_openo.yml index fd2e2c0f..e0663439 100644 --- a/deploy/conf/vm_environment/huawei-virtual3/network_openo.yml +++ b/deploy/conf/vm_environment/huawei-virtual3/network_openo.yml @@ -65,10 +65,10 @@ ip_settings: - name: external ip_ranges: - - - "192.168.101.210" - - "192.168.101.220" - cidr: "192.168.101.0/24" - gw: "192.168.101.1" + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" role: - controller - compute @@ -79,12 +79,12 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.101.222 + ip: 192.16.1.222 netmask: "24" interface: external openo_net: - openo_ip: 192.168.101.50 + openo_ip: 192.16.1.50 openo_docker_gw: 172.11.1.1 openo_docker_cidr: 172.11.1.0/24 @@ -99,7 +99,7 @@ public_net_info: router: router-ext enable_dhcp: "False" no_gateway: "False" - external_gw: "192.168.101.1" - floating_ip_cidr: "192.168.101.0/24" - floating_ip_start: "192.168.101.101" - floating_ip_end: "192.168.101.199" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual4/network.yml b/deploy/conf/vm_environment/huawei-virtual4/network.yml index d01a79ec..4359202e 100644 --- a/deploy/conf/vm_environment/huawei-virtual4/network.yml +++ b/deploy/conf/vm_environment/huawei-virtual4/network.yml @@ -12,34 +12,42 @@ nic_mappings: [] bond_mappings: [] provider_net_mappings: - - name: br-prv + - name: br-provider network: physnet - interface: eth1 + interface: eth10 type: ovs role: - controller - - compute sys_intf_mappings: - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant interface: eth1 + type: normal vlan_tag: 101 - type: vlan role: - controller - compute - name: storage interface: eth1 + type: normal vlan_tag: 102 - type: vlan role: - controller - compute - name: external - interface: br-prv - type: ovs + interface: eth1 + type: normal + vlan_tag: None role: - controller - compute @@ -47,8 +55,21 @@ sys_intf_mappings: ip_settings: - name: mgmt ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: - - "172.16.1.1" - - "172.16.1.254" + - "172.16.1.50" cidr: "172.16.1.0/24" role: - controller @@ -57,7 +78,7 @@ ip_settings: - name: storage ip_ranges: - - "172.16.2.1" - - "172.16.2.254" + - "172.16.2.50" cidr: "172.16.2.0/24" role: - controller @@ -65,25 +86,30 @@ ip_settings: - name: external ip_ranges: - - - "192.168.103.210" - - "192.168.103.220" - cidr: "192.168.103.0/24" - gw: "192.168.103.1" + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" role: - controller - compute internal_vip: - ip: 172.16.1.222 + ip: 10.1.0.222 netmask: "24" interface: mgmt public_vip: - ip: 192.168.103.222 + ip: 192.16.1.222 netmask: "24" interface: external onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + public_net_info: enable: "True" network: ext-net @@ -94,7 +120,7 @@ public_net_info: router: router-ext enable_dhcp: "False" no_gateway: "False" - external_gw: "192.168.103.1" - floating_ip_cidr: "192.168.103.0/24" - floating_ip_start: "192.168.103.101" - floating_ip_end: "192.168.103.199" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual4/network_dpdk.yml b/deploy/conf/vm_environment/huawei-virtual4/network_dpdk.yml new file mode 100644 index 00000000..e196d6f4 --- /dev/null +++ b/deploy/conf/vm_environment/huawei-virtual4/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.16.1.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual4/network_ocl.yml b/deploy/conf/vm_environment/huawei-virtual4/network_ocl.yml index 07fdcdf2..b5a57103 100644 --- a/deploy/conf/vm_environment/huawei-virtual4/network_ocl.yml +++ b/deploy/conf/vm_environment/huawei-virtual4/network_ocl.yml @@ -65,10 +65,10 @@ ip_settings: - name: external ip_ranges: - - - "192.168.103.210" - - "192.168.103.220" - cidr: "192.168.103.0/24" - gw: "192.168.103.1" + - - "192.168.107.210" + - "192.168.107.220" + cidr: "192.168.107.0/24" + gw: "192.168.107.1" role: - controller - compute @@ -79,7 +79,7 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.103.222 + ip: 192.168.107.222 netmask: "24" interface: external diff --git a/deploy/conf/vm_environment/huawei-virtual4/network_onos.yml b/deploy/conf/vm_environment/huawei-virtual4/network_onos.yml index c51138cd..ce5353eb 100644 --- a/deploy/conf/vm_environment/huawei-virtual4/network_onos.yml +++ b/deploy/conf/vm_environment/huawei-virtual4/network_onos.yml @@ -65,10 +65,10 @@ ip_settings: - name: external ip_ranges: - - - "192.168.103.210" - - "192.168.103.220" - cidr: "192.168.103.0/24" - gw: "192.168.103.1" + - - "192.168.107.210" + - "192.168.107.220" + cidr: "192.168.107.0/24" + gw: "192.168.107.1" role: - controller - compute @@ -79,7 +79,7 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.103.222 + ip: 192.168.107.222 netmask: "24" interface: external @@ -94,7 +94,7 @@ public_net_info: router: router-ext enable_dhcp: "False" no_gateway: "False" - external_gw: "192.168.103.1" - floating_ip_cidr: "192.168.103.0/24" - floating_ip_start: "192.168.103.101" - floating_ip_end: "192.168.103.199" + external_gw: "192.168.107.1" + floating_ip_cidr: "192.168.107.0/24" + floating_ip_start: "192.168.107.101" + floating_ip_end: "192.168.107.199" diff --git a/deploy/conf/vm_environment/huawei-virtual4/network_openo.yml b/deploy/conf/vm_environment/huawei-virtual4/network_openo.yml index dfa1f177..e0663439 100644 --- a/deploy/conf/vm_environment/huawei-virtual4/network_openo.yml +++ b/deploy/conf/vm_environment/huawei-virtual4/network_openo.yml @@ -65,10 +65,10 @@ ip_settings: - name: external ip_ranges: - - - "192.168.103.210" - - "192.168.103.220" - cidr: "192.168.103.0/24" - gw: "192.168.103.1" + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" role: - controller - compute @@ -79,12 +79,12 @@ internal_vip: interface: mgmt public_vip: - ip: 192.168.103.222 + ip: 192.16.1.222 netmask: "24" interface: external openo_net: - openo_ip: 192.168.103.50 + openo_ip: 192.16.1.50 openo_docker_gw: 172.11.1.1 openo_docker_cidr: 172.11.1.0/24 @@ -99,7 +99,7 @@ public_net_info: router: router-ext enable_dhcp: "False" no_gateway: "False" - external_gw: "192.168.103.1" - floating_ip_cidr: "192.168.103.0/24" - floating_ip_start: "192.168.103.101" - floating_ip_end: "192.168.103.199" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual8/network_dpdk.yml b/deploy/conf/vm_environment/huawei-virtual8/network_dpdk.yml new file mode 100644 index 00000000..e196d6f4 --- /dev/null +++ b/deploy/conf/vm_environment/huawei-virtual8/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.16.1.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/huawei-virtual9/network_dpdk.yml b/deploy/conf/vm_environment/huawei-virtual9/network_dpdk.yml new file mode 100644 index 00000000..e196d6f4 --- /dev/null +++ b/deploy/conf/vm_environment/huawei-virtual9/network_dpdk.yml @@ -0,0 +1,132 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +nic_mappings: [] +bond_mappings: [] + +provider_net_mappings: + - name: br-provider + network: physnet + interface: eth10 + type: ovs + role: + - controller + +sys_intf_mappings: + - name: mgmt + interface: eth0 + type: normal + vlan_tag: None + role: + - controller + - compute + + - name: tenant + interface: eth2 + type: normal + vlan_tag: None + role: + - controller + + - name: tenant + interface: eth2 + type: dpdk + vlan_tag: None + role: + - compute + + - name: storage + interface: eth1 + type: normal + vlan_tag: 102 + role: + - controller + - compute + + - name: external + interface: eth1 + type: normal + vlan_tag: None + role: + - controller + - compute + +ip_settings: + - name: mgmt + ip_ranges: + - - "10.1.0.50" + - "10.1.0.100" + dhcp_ranges: + - - "10.1.0.2" + - "10.1.0.49" + cidr: "10.1.0.0/24" + gw: "10.1.0.1" + role: + - controller + - compute + + - name: tenant + ip_ranges: + - - "172.16.1.1" + - "172.16.1.50" + cidr: "172.16.1.0/24" + role: + - controller + - compute + + - name: storage + ip_ranges: + - - "172.16.2.1" + - "172.16.2.50" + cidr: "172.16.2.0/24" + role: + - controller + - compute + + - name: external + ip_ranges: + - - "192.16.1.210" + - "192.16.1.220" + cidr: "192.16.1.0/24" + gw: "192.16.1.1" + role: + - controller + - compute + +internal_vip: + ip: 10.1.0.222 + netmask: "24" + interface: mgmt + +public_vip: + ip: 192.16.1.222 + netmask: "24" + interface: external + +onos_nic: eth2 +tenant_net_info: + type: vxlan + range: "1:1000" + provider_network: None + +public_net_info: + enable: "True" + network: ext-net + type: flat + segment_id: 1000 + subnet: ext-subnet + provider_network: physnet + router: router-ext + enable_dhcp: "False" + no_gateway: "False" + external_gw: "192.16.1.1" + floating_ip_cidr: "192.16.1.0/24" + floating_ip_start: "192.16.1.101" + floating_ip_end: "192.16.1.199" diff --git a/deploy/conf/vm_environment/k8-nosdn-nofeature-ha.yml b/deploy/conf/vm_environment/k8-nosdn-nofeature-ha.yml new file mode 100644 index 00000000..003f41be --- /dev/null +++ b/deploy/conf/vm_environment/k8-nosdn-nofeature-ha.yml @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +TYPE: virtual +FLAVOR: cluster + +hosts: + - name: host1 + roles: + - kube_master + - etcd + + - name: host2 + roles: + - kube_master + - etcd + + - name: host3 + roles: + - kube_master + - etcd + + - name: host4 + roles: + - kube_node + + - name: host5 + roles: + - kube_node diff --git a/deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml b/deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml new file mode 100644 index 00000000..9912d59b --- /dev/null +++ b/deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml @@ -0,0 +1,22 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +TYPE: virtual +FLAVOR: cluster + +hosts: + - name: host1 + roles: + - kube_master + - etcd + + - name: host2 + roles: + - kube_node diff --git a/deploy/conf/vm_environment/os-nosdn-dpdk-ha.yml b/deploy/conf/vm_environment/os-nosdn-ovs_dpdk-ha.yml index d098afba..3cd05faf 100644 --- a/deploy/conf/vm_environment/os-nosdn-dpdk-ha.yml +++ b/deploy/conf/vm_environment/os-nosdn-ovs_dpdk-ha.yml @@ -11,6 +11,9 @@ TYPE: virtual FLAVOR: cluster +plugins: + - dpdk: "Enable" + hosts: - name: host1 roles: diff --git a/deploy/conf/vm_environment/os-nosdn-dpdk-noha.yml b/deploy/conf/vm_environment/os-nosdn-ovs_dpdk-noha.yml index be1d9510..9fc2ca3f 100644 --- a/deploy/conf/vm_environment/os-nosdn-dpdk-noha.yml +++ b/deploy/conf/vm_environment/os-nosdn-ovs_dpdk-noha.yml @@ -11,6 +11,9 @@ TYPE: virtual FLAVOR: cluster +plugins: + - dpdk: "Enable" + hosts: - name: host1 roles: diff --git a/docs/development/overview/containerized_compass.rst b/docs/development/overview/containerized_compass.rst index de3ec902..1df570d7 100644 --- a/docs/development/overview/containerized_compass.rst +++ b/docs/development/overview/containerized_compass.rst @@ -4,3 +4,28 @@ Introduction of Containerized Compass ===================================== + +Containerized Compass uses five compass containers instead of a single VM. + +Each container stands for a micro service and compass-core function separates into these five micro services: + + - Compass-deck : RESTful API and DB Handlers for Compass + - Compass-tasks : Registered tasks and MQ modules for Compass + - Compass-cobbler : Cobbler container for Compass + - Compass-db : Database for Compass + - Compass-mq : Message Queue for Compass + +Compass4nfv has several containers to satisfy OPNFV requirements: + + - Compass-tasks-osa : compass-task's adapter for deployment OpenStack via OpenStack-ansible + - Compass-tasks-k8s : compass-task's adapter for deployment Kubernetes + - Compass-repo-osa-ubuntu : optional container to support OPNFV offfline installation via OpenStack-ansible + - Compass-repo-osa-centos : optional container to support OPNFV offfline installation via OpenStack-ansible + +Picture below shows the new architecture of compass4nfv: + +.. figure:: images/compass_arch.png + :alt: New Archietecture of Compass4nfv + :figclass: align-center + + Fig 1. New Archietecture of Compass4nfv diff --git a/docs/development/overview/images/compass_arch.png b/docs/development/overview/images/compass_arch.png Binary files differnew file mode 100644 index 00000000..5881064f --- /dev/null +++ b/docs/development/overview/images/compass_arch.png diff --git a/docs/release/configguide/index.rst b/docs/release/configguide/index.rst deleted file mode 100644 index fae27101..00000000 --- a/docs/release/configguide/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 - -.. _compass4nfv-overview: - -********************************* -Compass4NFV Release Overview -********************************* - -.. toctree:: - :maxdepth: 2 - - containerized_compass.rst diff --git a/docs/release/installation/bmdeploy.rst b/docs/release/installation/bmdeploy.rst index 7bf40714..d584e938 100644 --- a/docs/release/installation/bmdeploy.rst +++ b/docs/release/installation/bmdeploy.rst @@ -199,7 +199,7 @@ IP Settings - ip_ranges -- ip addresses range provided for this network. - - cidr -- the IPv4 address and its associated routing prefix and subnet maskã + - cidr -- the IPv4 address and its associated routing prefix and subnet mask? - gw -- need to add this line only if network is external. @@ -226,11 +226,6 @@ Public VIP - interface -- mostly external. -ONOS NIC -~~~~~~~~ - - - the NIC for ONOS, if there is no ONOS configured, leave it unchanged. - Public Network ~~~~~~~~~~~~~~ @@ -316,127 +311,21 @@ Public Network **The following figure shows the interfaces and nics of JumpHost and deployment nodes in huawei-pod1 network configuration(default one nic for openstack networks).** -.. code-block:: console +.. figure:: images/single_nic.png + :alt: Single nic scenario + :figclass: align-center + Fig 1. Single nic scenario - +--------------JumpHost-------------+ - | | - | +-+Compass+-+ | - | | + +--------+ | External-network - | | eth2+---+br-ext +-+eth0+----------------------+ - | | + +--------+ | | - | | | | | - | | | | | - | | + +--------+ | Install-network | - | | eth1+---+install +-+eth1+-----------------+ | - | | + +--------+ | | | - | | | | | | - | | | | | | - | | + | IPMI-network | | - | | eth0 eth2+-----------+ | | - | | + | | | | - | +---+VM+----+ | | | | - +-----------------------------------+ | | | - | | | - | | | - | | | - | | | - +---------------Host1---------------+ | | | - | | | | | - | eth0+----------------+ | - | | | | | - | mgmt +--------+ | | | | - | | | | | | - | +-----------+ | | | | | - | external+----+ br-prv +----+eth1+---------------------+ - | +-----------+ | | | | | - | | | | | | - | storage +-----+ | | | | - | | | | | - +-----------------------------------+ | | | - | IPMI+-----------+ | | - +-----------------------------------+ | | | - | | | - | | | - | | | - +---------------Host2---------------+ | | | - | | | | | - | eth0+----------------+ | - | | | | - | mgmt +--------+ | | | - | | | | | - | +-----------+ | | | | - | external+----+ br-prv +----+eth1+---------------------+ - | +-----------+ | | | - | | | | - | storage +-----+ | | - | | | - +-----------------------------------+ | - | IPMI+-----------+ - +-----------------------------------+ **The following figure shows the interfaces and nics of JumpHost and deployment nodes in intel-pod8 network configuration(openstack networks are seperated by multiple NICs).** -.. code-block:: console - +.. figure:: images/multi_nics.png + :alt: Multiple nics scenario + :figclass: align-center - +-------------+JumpHost+------------+ - | | - | +-+Compass+-+ | - | | + +--------+ | External-network - | | eth2+---+br-ext +-+eth0+----------------------+ - | | + +--------+ | | - | | | | | - | | | | | - | | + +--------+ | Install-network | - | | eth1+---+install +-+eth1+-----------------+ | - | | + +--------+ | | | - | | | | | | - | | | | | | - | | + | IPMI-network | | - | | eth0 eth2+-----------+ | | - | | + | | | | - | +---+VM+----+ | | | | - +-----------------------------------+ | | | - | | | - | | | - | | | - | | | - +--------------+Host1+--------------+ | | | - | | | | | - | eth0+----------------+ | - | | | | | - | +--------+ | | | | - | external+----+br-prv +-+eth1+---------------------+ - | +--------+ | | | | - | storage +---------------+eth2+-------------------------+ - | | | | | | - | Mgmt +---------------+eth3+----------------------------+ - | | | | | | | - | | | | | | | - +-----------------------------------+ | | | | | - | IPMI+-----------+ | | | | - +-----------------------------------+ | | | | | - | | | | | - | | | | | - | | | | | - | | | | | - +--------------+Host2+--------------+ | | | | | - | | | | | | | - | eth0+----------------+ | | | - | | | | | | - | +--------+ | | | | | - | external+----+br-prv +-+eth1+---------------------+ | | - | +--------+ | | | | - | storage +---------------+eth2+-------------------------+ | - | | | storage-network | - | Mgmt +---------------+eth3+----------------------------+ - | | | mgmt-network - | | | - +-----------------------------------+ | - | IPMI+-----------+ - +-----------------------------------+ + Fig 2. Multiple nics scenario Start Deployment (Bare Metal Deployment) @@ -457,14 +346,14 @@ E.g. or export OS_VERSION=centos7 -1.2. Set ISO image corresponding to your code +1.2. Set tarball corresponding to your code E.g. .. code-block:: bash # Set ISO image corresponding to your code - export ISO_URL=file:///home/compass/compass4nfv.iso + export ISO_URL=file:///home/compass/compass4nfv.tar.gz 1.3. Set hardware deploy jumpserver PXE NIC. (set eth1 E.g.) You do not need to set it when virtual deploy. @@ -491,16 +380,6 @@ nosdn-nofeature scenario deploy sample # NETWORK is your network.yml's path export NETWORK=./deploy/conf/hardware_environment/huawei-pod1/network.yml -ocl-nofeature scenario deploy sample - -.. code-block:: bash - - # DHA is your dha.yml's path - export DHA=./deploy/conf/hardware_environment/huawei-pod1/os-ocl-nofeature-ha.yml - - # NETWORK is your network.yml's path - export NETWORK=./deploy/conf/hardware_environment/huawei-pod1/network_ocl.yml - odl_l2-moon scenario deploy sample .. code-block:: bash @@ -531,25 +410,15 @@ odl_l3-nofeature scenario deploy sample # NETWORK is your network.yml's path export NETWORK=./deploy/conf/hardware_environment/huawei-pod1/network.yml -onos-nofeature scenario deploy sample - -.. code-block:: bash - - # DHA is your dha.yml's path - export DHA=./deploy/conf/hardware_environment/huawei-pod1/os-onos-nofeature-ha.yml - - # NETWORK is your network.yml's path - export NETWORK=./deploy/conf/hardware_environment/huawei-pod1/network_onos.yml - -onos-sfc deploy scenario sample +odl-sfc deploy scenario sample .. code-block:: bash # DHA is your dha.yml's path - export DHA=./deploy/conf/hardware_environment/huawei-pod1/os-onos-sfc-ha.yml + export DHA=./deploy/conf/hardware_environment/huawei-pod1/os-odl-sfc-ha.yml # NETWORK is your network.yml's path - export NETWORK=./deploy/conf/hardware_environment/huawei-pod1/network_onos.yml + export NETWORK=./deploy/conf/hardware_environment/huawei-pod1/network.yml 2. Run ``deploy.sh`` diff --git a/docs/release/installation/featureTable.rst b/docs/release/installation/featureTable.rst index e5ad9776..2cd74a2b 100644 --- a/docs/release/installation/featureTable.rst +++ b/docs/release/installation/featureTable.rst @@ -4,48 +4,51 @@ Features Supported Openstack Version and OS ---------------------------------- -+---------------+----------+-----------+-----------+-----------+ -| | OS | OpenStack | OpenStack | OpenStack | -| | only | Liberty | Mitaka | Newton | -+---------------+----------+-----------+-----------+-----------+ -| CentOS 7 | yes | yes | yes | yes | -+---------------+----------+-----------+-----------+-----------+ -| Ubuntu trusty | yes | yes | yes | no | -+---------------+----------+-----------+-----------+-----------+ -| Ubuntu xenial | yes | no | yes | yes | -+---------------+----------+-----------+-----------+-----------+ ++---------------+----------+-----------+-----------+-----------+-----------+ +| | OS | OpenStack | OpenStack | OpenStack | OpenStack | +| | only | Liberty | Mitaka | Newton | Ocata | ++---------------+----------+-----------+-----------+-----------+-----------+ +| CentOS 7 | yes | yes | yes | yes | no | ++---------------+----------+-----------+-----------+-----------+-----------+ +| Ubuntu trusty | yes | yes | yes | no | no | ++---------------+----------+-----------+-----------+-----------+-----------+ +| Ubuntu xenial | yes | no | yes | yes | yes | ++---------------+----------+-----------+-----------+-----------+-----------+ Supported Openstack Flavor and Features --------------------------------------- -+---------------+--------------+--------------+---------------+ -| | OpenStack | OpenStack | OpenStack | -| | Liberty | Mitaka | Newton | -+---------------+--------------+--------------+---------------+ -| Virtual | Yes | Yes | Yes | -| Deployment | | | | -+---------------+--------------+--------------+---------------+ -| Baremetal | Yes | Yes | Yes | -| Deployment | | | | -+---------------+--------------+--------------+---------------+ -| HA | Yes | Yes | Yes | -| | | | | -+---------------+--------------+--------------+---------------+ -| Ceph | Yes | Yes | Yes | -| | | | | -+---------------+--------------+--------------+---------------+ -| SDN | Yes | Yes | Yes* | -| ODL/ONOS | | | | -+---------------+--------------+--------------+---------------+ -| Compute Node | Yes | Yes | Yes | -| Expansion | | | | -+---------------+--------------+--------------+---------------+ -| Multi-Nic | Yes | Yes | Yes | -| Support | | | | -+---------------+--------------+--------------+---------------+ -| Boot | Yes | Yes | Yes | -| Recovery | | | | -+---------------+--------------+--------------+---------------+ ++---------------+--------------+--------------+---------------+---------------+ +| | OpenStack | OpenStack | OpenStack | OpenStack | +| | Liberty | Mitaka | Newton | Ocata | ++---------------+--------------+--------------+---------------+---------------+ +| Virtual | Yes | Yes | Yes | Yes | +| Deployment | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| Baremetal | Yes | Yes | Yes | Yes | +| Deployment | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| HA | Yes | Yes | Yes | Yes | +| | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| Ceph | Yes | Yes | Yes | Yes | +| | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| SDN | Yes | Yes | Yes | Yes* | +| ODL/ONOS | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| Compute Node | Yes | Yes | Yes | No | +| Expansion | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| Multi-Nic | Yes | Yes | Yes | Yes | +| Support | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| Boot | Yes | Yes | Yes | Yes | +| Recovery | | | | | ++---------------+--------------+--------------+---------------+---------------+ +| SFC | No | No | Yes | Yes | +| | | | | | ++---------------+--------------+--------------+---------------+---------------+ -* ONOS support will Release in Danube 2.0 or 3.0 +* ONOS will not be supported in this release. diff --git a/docs/release/installation/images/architecture.png b/docs/release/installation/images/architecture.png Binary files differnew file mode 100644 index 00000000..0ee8bceb --- /dev/null +++ b/docs/release/installation/images/architecture.png diff --git a/docs/release/installation/images/k8s.png b/docs/release/installation/images/k8s.png Binary files differnew file mode 100644 index 00000000..6af82dcc --- /dev/null +++ b/docs/release/installation/images/k8s.png diff --git a/docs/release/installation/images/multi_nics.png b/docs/release/installation/images/multi_nics.png Binary files differnew file mode 100644 index 00000000..5f48b6c5 --- /dev/null +++ b/docs/release/installation/images/multi_nics.png diff --git a/docs/release/installation/images/single_nic.png b/docs/release/installation/images/single_nic.png Binary files differnew file mode 100644 index 00000000..c3898560 --- /dev/null +++ b/docs/release/installation/images/single_nic.png diff --git a/docs/release/installation/index.rst b/docs/release/installation/index.rst index d678b9df..80d07e86 100644 --- a/docs/release/installation/index.rst +++ b/docs/release/installation/index.rst @@ -17,6 +17,8 @@ Compass4nfv Installation Instructions configure-network.rst bmdeploy.rst vmdeploy.rst + k8s-intro.rst + k8s-deploy.rst offline-deploy.rst expansion.rst references.rst diff --git a/docs/release/installation/installation.rst b/docs/release/installation/installation.rst index 18bac119..05c5e2ef 100644 --- a/docs/release/installation/installation.rst +++ b/docs/release/installation/installation.rst @@ -6,7 +6,7 @@ Compass4nfv configuration ========================= This document describes providing guidelines on how to install and -configure the Danube release of OPNFV when using Compass as a +configure the Euphrates release of OPNFV when using Compass4nfv as a deployment tool including required software and hardware configurations. @@ -21,29 +21,28 @@ networking and Unix/Linux administration. Preconditions ------------- -Before starting the installation of the Danube release of OPNFV, +Before starting the installation of the Euphrates release of OPNFV, some planning must be done. -Retrieving the installation ISO image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Retrieving the installation Tarball +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -First of all, The installation ISO is needed for deploying your OPNFV -environment, it included packages of Compass, OpenStack, OpenDaylight, ONOS -and so on. +First of all, The installation tarball is needed for deploying your OPNFV +environment, it included packages of compass docker images and OSA repo. -The stable release ISO can be retrieved via `OPNFV software download page <https://www.opnfv.org/software>`_ +The stable tarball can be retrieved via `OPNFV software download page <https://www.opnfv.org/software>`_ -The daily build ISO can be retrieved via OPNFV artifacts repository: +The daily build tarball can be retrieved via OPNFV artifacts repository: http://artifacts.opnfv.org/compass4nfv.html -NOTE: Search the keyword "compass4nfv/Danube" to locate the ISO image. +NOTE: Search the keyword "compass4nfv/Euphrates" to locate the ISO image. E.g. -compass4nfv/Danube/opnfv-2016-09-18_08-15-13.iso +compass4nfv/Euphrates/opnfv-2017-09-18_08-15-13.tar.gz -The name of iso image includes the time of iso building, you can get the daily +The name of tarball includes the time of iso building, you can get the daily ISO according the building time. The git url and sha1 of Compass4nfv are recorded in properties files, According these, the corresponding deployment scripts can be retrieved. @@ -58,9 +57,9 @@ To retrieve the repository of Compass4nfv on Jumphost use the following command: NOTE: PLEASE DO NOT GIT CLONE COMPASS4NFV IN ROOT DIRECTORY(INCLUDE SUBFOLDERS). -To get stable /Danube release, you can use the following command: +To get stable /Euphrates release, you can use the following command: -- git checkout Danube.1.0 +- git checkout Euphrates.1.0 Setup Requirements ------------------ @@ -126,17 +125,17 @@ Network requirements include: - IPMI Network - - Openstack mgmt Network* + - br-mgmt Network* - - Openstack external Network* + - br-vlan Network* - - Openstack tenant Network* + - br-tenant Network* - - Openstack storage Network* + - br-storage Network* 3. Lights out OOB network access from Jumphost with IPMI node enabled (Bare Metal deployment only). -4. External network has Internet access, meaning a gateway and DNS availability. +4. br-vlan network has Internet access, meaning a gateway and DNS availability. **The networks with(*) can be share one NIC(Default configuration) or use an exclusive** **NIC(Reconfigurated in network.yml).** diff --git a/docs/release/installation/introduction.rst b/docs/release/installation/introduction.rst index 7470363a..6ffc3d17 100644 --- a/docs/release/installation/introduction.rst +++ b/docs/release/installation/introduction.rst @@ -5,34 +5,8 @@ Abstract ======== -This document describes how to install the Danube release of OPNFV when +This document describes how to install the Euphrates release of OPNFV when using Compass4nfv as a deployment tool covering it's limitations, dependencies and required system resources. -Version history -=============== - -+--------------------+--------------------+--------------------+---------------------------+ -| **Date** | **Ver.** | **Author** | **Comment** | -| | | | | -+--------------------+--------------------+--------------------+---------------------------+ -| 2017-02-21 | 3.0.0 | Justin chi | Changes for D release | -| | | (HUAWEI) | | -+--------------------+--------------------+--------------------+---------------------------+ -| 2016-09-13 | 2.1.0 | Yuenan Li | Adjusted the docs | -| | | (HUAWEI) | structure | -+--------------------+--------------------+--------------------+---------------------------+ -| 2016-09-12 | 2.0.0 | Yuenan Li | Rewritten for | -| | | (HUAWEI) | Compass4nfv C release | -+--------------------+--------------------+--------------------+---------------------------+ -| 2016-01-17 | 1.0.0 | Justin chi | Rewritten for | -| | | (HUAWEI) | Compass4nfv B release | -+--------------------+--------------------+--------------------+---------------------------+ -| 2015-12-16 | 0.0.2 | Matthew Li | Minor changes & | -| | | (HUAWEI) | formatting | -+--------------------+--------------------+--------------------+---------------------------+ -| 2015-09-12 | 0.0.1 | Chen Shuai | First draft | -| | | (HUAWEI) | | -+--------------------+--------------------+--------------------+---------------------------+ - diff --git a/docs/release/installation/k8s-deploy.rst b/docs/release/installation/k8s-deploy.rst new file mode 100644 index 00000000..65f638cb --- /dev/null +++ b/docs/release/installation/k8s-deploy.rst @@ -0,0 +1,267 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International Licence. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) by Yifei Xue (HUAWEI) and Justin Chi (HUAWEI) + +Installation of K8s on virtual machines +======================================= + +Quick Start +----------- + +Only 1 command to try virtual deployment, if you have Internet access. Just Paste it and Run. + +.. code-block:: bash + + curl https://raw.githubusercontent.com/opnfv/compass4nfv/master/quickstart_k8s.sh | bash + +If you want to deploy noha with1 controller and 1 compute, run the following command + +.. code-block:: bash + + export SCENARIO=k8-nosdn-nofeature-noha.yml + export VIRT_NUMBER=2 + curl https://raw.githubusercontent.com/opnfv/compass4nfv/euphrates/quickstart_k8s.sh | bash + +Installation of K8s on Bare Metal +================================= + +Nodes Configuration (Bare Metal Deployment) +------------------------------------------- + +The below file is the inventory template of deployment nodes: + +"compass4nfv/deploy/conf/hardware_environment/huawei-pod1/k8-nosdn-nofeature-ha.yml" + +You can write your own IPMI IP/User/Password/Mac address/roles reference to it. + + - name -- Host name for deployment node after installation. + + - ipmiVer -- IPMI interface version for deployment node support. IPMI 1.0 + or IPMI 2.0 is available. + + - ipmiIP -- IPMI IP address for deployment node. Make sure it can access + from Jumphost. + + - ipmiUser -- IPMI Username for deployment node. + + - ipmiPass -- IPMI Password for deployment node. + + - mac -- MAC Address of deployment node PXE NIC. + + - interfaces -- Host NIC renamed according to NIC MAC addresses when OS provisioning. + + - roles -- Components deployed. + +**Set TYPE/FLAVOR and POWER TOOL** + +E.g. +.. code-block:: yaml + + TYPE: baremetal + FLAVOR: cluster + POWER_TOOL: ipmitool + +**Set ipmiUser/ipmiPass and ipmiVer** + +E.g. + +.. code-block:: yaml + + ipmiUser: USER + ipmiPass: PASSWORD + ipmiVer: '2.0' + +**Assignment of different roles to servers** + +E.g. K8s only deployment roles setting + +.. code-block:: yaml + + hosts: + - name: host1 + mac: 'F8:4A:BF:55:A2:8D' + interfaces: + - eth1: 'F8:4A:BF:55:A2:8E' + ipmiIp: 172.16.130.26 + roles: + - kube_master + - etcd + + - name: host2 + mac: 'D8:49:0B:DA:5A:B7' + interfaces: + - eth1: 'D8:49:0B:DA:5A:B8' + ipmiIp: 172.16.130.27 + roles: + - kube_node + +Network Configuration (Bare Metal Deployment) +--------------------------------------------- + +Before deployment, there are some network configuration to be checked based +on your network topology.Compass4nfv network default configuration file is +"compass4nfv/deploy/conf/hardware_environment/huawei-pod1/network.yml". +This file is an example, you can customize by yourself according to specific network +environment. + +In this network.yml, there are several config sections listed following(corresponed to the +ordre of the config file): + +Provider Mapping +~~~~~~~~~~~~~~~~ + + - name -- provider network name. + + - network -- default as physnet, do not change it. + + - interfaces -- the NIC or Bridge attached by the Network. + + - type -- the type of the NIC or Bridge(vlan for NIC and ovs for Bridge, either). + + - roles -- all the possible roles of the host machines which connected by this + network(mostly put both controller and compute). + +System Interface +~~~~~~~~~~~~~~~~ + + - name -- Network name. + + - interfaces -- the NIC or Bridge attached by the Network. + + - vlan_tag -- if type is vlan, add this tag before 'type' tag. + + - type -- the type of the NIC or Bridge(vlan for NIC and ovs for Bridge, either). + + - roles -- all the possible roles of the host machines which connected by this + network(mostly put both controller and compute). + +IP Settings +~~~~~~~~~~~ + + - name -- network name corresponding the the network name in System Interface section one by one. + + - ip_ranges -- ip addresses range provided for this network. + + - cidr -- the IPv4 address and its associated routing prefix and subnet mask? + + - gw -- need to add this line only if network is external. + + - roles -- all the possible roles of the host machines which connected by this + network(mostly put both controller and compute). + +Internal VIP(virtual or proxy IP) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + - ip -- virtual or proxy ip address, must be in the same subnet with mgmt network + but must not be in the range of mgmt network. + + - netmask -- the length of netmask + + - interface -- mostly mgmt. + +Public VIP +~~~~~~~~~~ + + - ip -- virtual or proxy ip address, must be in the same subnet with external + network but must not be in the range of external network. + + - netmask -- the length of netmask + + - interface -- mostly external. + + +Public Network +~~~~~~~~~~~~~~ + + - enable -- must be True(if False, you need to set up provider network manually). + + - network -- leave it ext-net. + + - type -- the type of the ext-net above, such as flat or vlan. + + - segment_id -- when the type is vlan, this should be id of vlan. + + - subnet -- leave it ext-subnet. + + - provider_network -- leave it physnet. + + - router -- leave it router-ext. + + - enable_dhcp -- must be False. + + - no_gateway -- must be False. + + - external_gw -- same as gw in ip_settings. + + - floating_ip_cidr -- cidr for floating ip, see explanation in ip_settings. + + - floating_ip_start -- define range of floating ip with floating_ip_end(this + defined range must not be included in ip range of external configured in + ip_settings section). + + - floating_ip_end -- define range of floating ip with floating_ip_start. + + +**The following figure shows the default network configuration.** + +.. figure:: images/k8s.png + :alt: Kubernetes network configuration + :figclass: align-center + + Fig 5. Kubernetes network configuration + +Start Deployment (Bare Metal Deployment) +---------------------------------------- + +1. Edit deploy.sh + +1.1. Set OS version for deployment nodes. + Compass4nfv supports ubuntu and centos based openstack newton. + +E.g. + +.. code-block:: bash + + # Set OS version for target hosts + # Only CentOS7 supported now + export OS_VERSION=centos7 + +1.2. Set tarball corresponding to your code + +E.g. + +.. code-block:: bash + + # Set ISO image corresponding to your code + export ISO_URL=file:///home/compass/compass4nfv.tar.gz + +1.3. Set hardware deploy jumpserver PXE NIC. (set eth1 E.g.) + You do not need to set it when virtual deploy. + +E.g. + +.. code-block:: bash + + # Set hardware deploy jumpserver PXE NIC + # you need to comment out it when virtual deploy + export INSTALL_NIC=eth1 + +1.4. K8s scenario that you want to deploy + +E.g. + +nosdn-nofeature scenario deploy sample + +.. code-block:: bash + + # DHA is your dha.yml's path + export DHA=./deploy/conf/hardware_environment/huawei-pod1/k8-nosdn-nofeature-ha.yml + + # NETWORK is your network.yml's path + export NETWORK=./deploy/conf/hardware_environment/huawei-pod1/network.yml + +2. Run ``deploy.sh`` + +.. code-block:: bash + + ./deploy.sh diff --git a/docs/release/installation/k8s-intro.rst b/docs/release/installation/k8s-intro.rst new file mode 100644 index 00000000..a3ea4547 --- /dev/null +++ b/docs/release/installation/k8s-intro.rst @@ -0,0 +1,96 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International Licence. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) by Yifei Xue (HUAWEI) and Justin Chi (HUAWEI) + +K8s introduction +================ + +Kubernetes Architecture +----------------------- + +Currently Compass can deploy kubernetes as NFVI in 3+2 mode by default. + +**The following figure shows a typical architecture of Kubernetes.** + +.. figure:: images/architecture.png + :alt: K8s architecture + :figclass: align-center + + Fig 3. K8s architecture + +Kube-apiserver +~~~~~~~~~~~~~~ + +Kube-apiserver exposes the Kubernetes API. It is the front-end for the Kubernetes control plane. +It is designed to scale horizontally, that is, it scales by deploying more instances. + +Etcd +~~~~ + +Etcd is used as Kubernetes' backing store. All cluster data is stored here. Always have a backup +plan for etcd's data for your Kubernetes cluster. + +Kube-controller-manager +~~~~~~~~~~~~~~~~~~~~~~~ + +Kube-controller-manager runs controllers, which are the background threads that handle routine +tasks in the cluster. Logically, each controller is a separate process, but to reduce complexity, +they are all compiled into a single binary and run in a single process. + +These controllers include: + + - Node Controller: Responsible for noticing and responding when nodes go down. + - Replication Controller: Responsible for maintaining the correct number of pods for every + replication controller object in the system. + - Endpoints Controller: Populates the Endpoints object (that is, joins Services & Pods). + - Service Account & Token Controllers: Create default accounts and API access tokens for + new namespaces. + +kube-scheduler +~~~~~~~~~~~~~~ + +Kube-scheduler watches newly created pods that have no node assigned, and selects a node for them +to run on. + +Kubelet +~~~~~~~ + +Kubelet is the primary node agent. It watches for pods that have been assigned to its node (either +by apiserver or via local configuration file) and: + + - Mounts the pod's required volumes. + - Downloads the pod's secrets. + - Runs the pod's containers via docker (or, experimentally, rkt). + - Periodically executes any requested container liveness probes. + - Reports the status of the pod back to the rest of the system, by creating a mirror pod if + necessary. + - Reports the status of the node back to the rest of the system. + +Kube-proxy +~~~~~~~~~~ + +Kube-proxy enables the Kubernetes service abstraction by maintaining network rules on the host and +performing connection forwarding. + +Docker +~~~~~~ + +Docker is used for running containers. + +POD +~~~ + +A pod is a collection of containers and its storage inside a node of a Kubernetes cluster. It is +possible to create a pod with multiple containers inside it. For example, keeping a database container +and data container in the same pod. + +Understand Kubernetes Networking in Compass configuration +--------------------------------------------------------- + +**The following figure shows the Kubernetes Networking in Compass configuration.** + +.. figure:: images/k8s.png + :alt: Kubernetes Networking in Compass + :figclass: align-center + + Fig 4. Kubernetes Networking in Compass diff --git a/docs/release/installation/offline-deploy.rst b/docs/release/installation/offline-deploy.rst index 0acfa180..d35d7e1b 100644 --- a/docs/release/installation/offline-deploy.rst +++ b/docs/release/installation/offline-deploy.rst @@ -3,15 +3,15 @@ Offline Deploy ============== -Compass4nfv uses offline approach to deploy cluster and support complete offline -deployment on a jumphost without access internet. Here is the offline deployment -instruction: +Compass4nfv uses a repo docker container as distro and pip package source +to deploy cluster and support complete offline deployment on a jumphost without +access internet. Here is the offline deployment instruction: Preparation for offline deploy ------------------------------ -1. Download compass.iso from OPNFV artifacts repository (Search compass4nfv in - http://artifacts.opnfv.org/ and download an appropriate ISO. ISO can also be +1. Download compass.tar.gz from OPNFV artifacts repository (Search compass4nfv in + http://artifacts.opnfv.org/ and download an appropriate tarball. Tarball can also be generated by script build.sh in compass4nfv root directory.) 2. Download the Jumphost preparation package from our httpserver. (Download the @@ -25,10 +25,10 @@ Preparation for offline deploy Steps of offline deploy ----------------------- -1. Copy the compass.iso, jh_env_package.tar.gz and the compass4nfv code +1. Copy the compass.tar.gz, jh_env_package.tar.gz and the compass4nfv code repository to your jumphost. -2. Export the local path of the compass.iso and jh_env_package.tar.gz on +2. Export the local path of the compass.tar.gz and jh_env_package.tar.gz on jumphost. Then you can perform deployment on a offline jumphost. E.g. @@ -41,7 +41,13 @@ Export the compass4nfv.iso and jh_env_package.tar.gz path export ISO_URL=file:///home/compass/compass4nfv.iso export JHPKG_URL=file:///home/compass/jh_env_package.tar.gz -Run deploy.sh +3. Open the OSA offline deployment switch on jumphost. + +.. code-block:: bash + + export OFFLINE_DEPLOY=Enable + +4. Run deploy.sh .. code-block:: bash diff --git a/docs/release/installation/preconditions.rst b/docs/release/installation/preconditions.rst index 67c0728a..3ba42ab6 100644 --- a/docs/release/installation/preconditions.rst +++ b/docs/release/installation/preconditions.rst @@ -21,30 +21,30 @@ networking and Unix/Linux administration. Preconditions ------------- -Before starting the installation of the Danube release of OPNFV, +Before starting the installation of the Euphrates release of OPNFV, some planning must be done. -Retrieving the installation ISO image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Retrieving the installation tarball +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -First of all, The installation ISO is needed for deploying your OPNFV +First of all, The installation tarball is needed for deploying your OPNFV environment, it included packages of Compass, OpenStack, OpenDaylight, ONOS and so on. -The stable release ISO can be retrieved via `OPNFV software download page <https://www.opnfv.org/software>`_ +The stable release tarball can be retrieved via `OPNFV software download page <https://www.opnfv.org/software>`_ -The daily build ISO can be retrieved via OPNFV artifacts repository: +The daily build tarball can be retrieved via OPNFV artifacts repository: http://artifacts.opnfv.org/compass4nfv.html -NOTE: Search the keyword "compass4nfv/Danube" to locate the ISO image. +NOTE: Search the keyword "compass4nfv/Euphrates" to locate the tarball. E.g. -compass4nfv/danube/opnfv-2017-03-29_08-55-09.iso +compass4nfv/euphrates/opnfv-2017-03-29_08-55-09.tar.gz -The name of iso image includes the time of iso building, you can get the daily -ISO according the building time. +The name of tarball includes the time of tarball building, you can get the daily +tarball according the building time. The git url and sha1 of Compass4nfv are recorded in properties files, According these, the corresponding deployment scripts can be retrieved. @@ -58,9 +58,9 @@ To retrieve the repository of Compass4nfv on Jumphost use the following command: NOTE: PLEASE DO NOT GIT CLONE COMPASS4NFV IN ROOT DIRECTORY(INCLUDE SUBFOLDERS). -To get stable /Danube release, you can use the following command: +To get stable/euphrates release, you can use the following command: -- git checkout Danube.1.0 +- git checkout Euphrates.1.0 Setup Requirements ------------------ diff --git a/docs/release/installation/vmdeploy.rst b/docs/release/installation/vmdeploy.rst index 610ff51a..16fb28d3 100644 --- a/docs/release/installation/vmdeploy.rst +++ b/docs/release/installation/vmdeploy.rst @@ -5,6 +5,22 @@ Installation on virtual machines ================================ +Quick Start +----------- + +Only 1 command to try virtual deployment, if you have Internet access. Just Paste it and Run. + +.. code-block:: bash + + curl https://raw.githubusercontent.com/opnfv/compass4nfv/euphrates/quickstart.sh | bash + +If you want to deploy noha with1 controller and 1 compute, run the following command + +.. code-block:: bash + export SCENARIO=os-nosdn-nofeature-noha.yml + export VIRT_NUMBER=2 + curl https://raw.githubusercontent.com/opnfv/compass4nfv/euphrates/quickstart.sh | bash + Nodes Configuration (Virtual Deployment) ---------------------------------------- @@ -129,7 +145,7 @@ Start Deployment (Virtual Deployment) 1. Edit deploy.sh 1.1. Set OS version for deployment nodes. - Compass4nfv supports ubuntu and centos based openstack newton. + Compass4nfv supports ubuntu and centos based openstack ocata. E.g. @@ -148,7 +164,7 @@ E.g. .. code-block:: bash # Set ISO image corresponding to your code - export ISO_URL=file:///home/compass/compass4nfv.iso + export ISO_URL=file:///home/compass/compass4nfv.tar.gz 1.3. Set scenario that you want to deploy @@ -164,16 +180,6 @@ nosdn-nofeature scenario deploy sample # NETWORK is your network.yml's path export NETWORK=./deploy/conf/vm_environment/huawei-virtual1/network.yml -ocl-nofeature scenario deploy sample - -.. code-block:: bash - - # DHA is your dha.yml's path - export DHA=./deploy/conf/vm_environment/os-ocl-nofeature-ha.yml - - # NETWORK is your network.yml's path - export NETWORK=./deploy/conf/vm_environment/huawei-virtual1/network_ocl.yml - odl_l2-moon scenario deploy sample .. code-block:: bash @@ -204,25 +210,15 @@ odl_l3-nofeature scenario deploy sample # NETWORK is your network.yml's path export NETWORK=./deploy/conf/vm_environment/huawei-virtual1/network.yml -onos-nofeature scenario deploy sample +odl-sfc deploy scenario sample .. code-block:: bash # DHA is your dha.yml's path - export DHA=./deploy/conf/vm_environment/os-onos-nofeature-ha.yml + export DHA=./deploy/conf/vm_environment/os-odl-sfc-ha.yml # NETWORK is your network.yml's path - export NETWORK=./deploy/conf/vm_environment/huawei-virtual1/network_onos.yml - -onos-sfc deploy scenario sample - -.. code-block:: bash - - # DHA is your dha.yml's path - export DHA=./deploy/conf/vm_environment/os-onos-sfc-ha.yml - - # NETWORK is your network.yml's path - export NETWORK=./deploy/conf/vm_environment/huawei-virtual1/network_onos.yml + export NETWORK=./deploy/conf/vm_environment/huawei-virtual1/network.yml 2. Run ``deploy.sh`` diff --git a/docs/release/release-notes/release-notes.rst b/docs/release/release-notes/release-notes.rst index 99e18b54..73825062 100644 --- a/docs/release/release-notes/release-notes.rst +++ b/docs/release/release-notes/release-notes.rst @@ -31,7 +31,7 @@ Release Data | **Release designation** | Euphrates.1.0 | | | | +--------------------------------------+--------------------------------------+ -| **Release date** | September 2017 | +| **Release date** | October 2017 | | | | +--------------------------------------+--------------------------------------+ | **Purpose of the delivery** | OPNFV Euphrates release | @@ -69,13 +69,10 @@ upstream components supported with this release. - Openstack (Ocata release) - - Opendaylight (Nitrogen release) - + - Kubernates (1.7.3) -Document version change -~~~~~~~~~~~~~~~~~~~~~~~ + - Opendaylight (Nitrogen release) -Adjusted the document structure, and you can see document at `OPNFV(Euphrates) Compass4nfv installation instructions <http://artifacts.opnfv.org/compass4nfv/docs/configguide/index.html>`_. Reason for new version ---------------------- @@ -87,16 +84,24 @@ Feature additions | **JIRA REFERENCE** | **SLOGAN** | | | | +--------------------------------------+-----------------------------------------+ -| COMPASS-504 | Open-O deployment with Compass | +| COMPASS-549 | Real Time KVM | | | | +--------------------------------------+-----------------------------------------+ -| COMPASS-362 | OpenDaylight Boron Support | +| | OpenDaylight Nitrogen Support | | | | +--------------------------------------+-----------------------------------------+ -| COMPASS-491 | Support OpenStack Newton | +| COMPASS-542 | Support OpenStack Ocata | +| | | ++--------------------------------------+-----------------------------------------+ +| | Support ODL SFC | +| | | ++--------------------------------------+-----------------------------------------+ +| COMPASS-550 | Support OVS-DPDK | +| | | ++--------------------------------------+-----------------------------------------+ +| COMPASS-495 | Yardstick Integration into Compass4nfv | | | | +--------------------------------------+-----------------------------------------+ - Bug corrections @@ -104,13 +109,13 @@ Bug corrections **JIRA TICKETS:** -+--------------------------------------+--------------------------------------+ -| **JIRA REFERENCE** | **SLOGAN** | -| | | -+--------------------------------------+--------------------------------------+ -| | | -| | | -+--------------------------------------+--------------------------------------+ ++--------------------------------------+----------------------------------------+ +| **JIRA REFERENCE** | **SLOGAN** | +| | | ++--------------------------------------+----------------------------------------+ +| | With no ceph, the cluster will heal | +| | itself after a power failure or reboot | ++--------------------------------------+----------------------------------------+ Known Limitations, Issues and Workarounds @@ -127,25 +132,30 @@ System Limitations **Min Jumphost requirements:** At least 16GB of RAM, 16 core CPU +Scenario Limitations +-------------------- + +**ODL SFC:** In the Euphrates1.0, Compass doesn't integrate OpenStack Tacker +Project yet. However, the SFC related test cases in Functest always use Tacker +as NFVO to delivery VNFFG or SFC related requests to ODL via networking-sfc. +So the odl-sfc scenario of Compass cannot pass the SFC testcases in Functest. +But if you want to use verify SFC in the cluster deployed by Compass, you can +use neutron CLI to achieve the same effect. + Known issues ------------ -+----------------------+-------------------------------+-----------------------+ -| **Scenario** | **Issue** | **Workarounds** | -+----------------------+-------------------------------+-----------------------+ -| os-odl-l3-no-feature | Occasionally failed to assign | Rebuild the instance | -| | floating IP to an instance | and reassign floating | -| | | IP | -+----------------------+-------------------------------+-----------------------+ -| os-odl-l2-no-feature | Occasionally failed to login | Failed in testcase, | -| | instance via ssh | normal in usage | -+----------------------+-------------------------------+-----------------------+ - ++-----------------------+---------------------------------+-----------------------+ +| **Scenario** | **Issue** | **Workarounds** | ++-----------------------+---------------------------------+-----------------------+ +| Ceph Related Scenario | After a power failure or reboot,| Deploy without Ceph | +| | the cluster cannot heal itself | | ++-----------------------+---------------------------------+-----------------------+ Test Result =========== The Euphrates release with the Compass4nfv deployment toolchain has undergone QA test runs with the following results: -Functest: http://testresults.opnfv.org/reporting/functest/release/danube/index-status-compass.html +Functest: http://testresults.opnfv.org/reporting/euphrates/functest/status-compass.html diff --git a/docs/release/scenarios/index.rst b/docs/release/scenarios/index.rst index a00eb44a..131e9852 100644 --- a/docs/release/scenarios/index.rst +++ b/docs/release/scenarios/index.rst @@ -12,4 +12,7 @@ Compass4NFV Scenarios os-nosdn-nofeature-ha.rst os-odl-nofeature-ha.rst + os-odl-sfc-ha.rst + os-nosdn-kvm-ha.rst + k8s-nosdn-nofeature-ha.rst diff --git a/docs/release/scenarios/k8s-nosdn-nofeature-ha.rst b/docs/release/scenarios/k8s-nosdn-nofeature-ha.rst new file mode 100644 index 00000000..d9925cb7 --- /dev/null +++ b/docs/release/scenarios/k8s-nosdn-nofeature-ha.rst @@ -0,0 +1,39 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) Justin Chi (HUAWEI),Yifei Xue (HUAWEI)and Xinhui Hu (FIBERHOME) + +This document introduces scenario descriptions for Euphrates 1.0 of +deployment with no SDN controller and no feature enabled. + +.. contents:: + :depth: 3 + :local: + +====================== +k8s-nosdn-nofeature-ha +====================== + +This scenario is used to deploy an kubernets cluster. + +Scenario components and composition +=================================== + +This scenario includes a set of kubernets services which are kubernets API Server, +Controller Manager, kube-proxy, kubelet,kube-dns,nginx-proxy,kubernetes-dashboard. +Nginx-proxy is used to balance all the services running on 3 control nodes behind +a VIP (Virtual IP address). + +Scenario usage overview +======================= + +To deploy with this scenario, you just need to assign the +k8s-nosdn-nofeature-ha.yaml to DHA file before deployment. + +Limitations, Issues and Workarounds +=================================== + +References +========== + +For more information on the OPNFV Euphrates release, please visit +http://www.opnfv.org/euphrates diff --git a/docs/release/scenarios/os-nosdn-nofeature-ha.rst b/docs/release/scenarios/os-nosdn-nofeature-ha.rst new file mode 100644 index 00000000..6ff3b85c --- /dev/null +++ b/docs/release/scenarios/os-nosdn-nofeature-ha.rst @@ -0,0 +1,41 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) Justin Chi (HUAWEI) and Yifei Xue (HUAWEI) + +This document introduces scenario descriptions for Euphrates 1.0 of +deployment with no SDN controller and no feature enabled. + +.. contents:: + :depth: 3 + :local: + +===================== +os-nosdn-nofeature-ha +===================== + +This scenario is used to deploy an Ocata OpenStack deployment with +Ceph Jewel, and without SDN controller nor any NFV feature enabled. + +Scenario components and composition +=================================== + +This scenario includes a set of common OpenStack services which are Nova, +Neutron, Glance, Cinder, Keystone, Heat, Ceilometer, Gnocchi, Aodh, +Horizon. Ceph is used as the backend of Cinder on deployed hosts. HAproxy +is used to balance all the services running on 3 control nodes behind a +VIP (Virtual IP address). + +Scenario usage overview +======================= + +To deploy with this scenario, you just need to assign the +os-nosdn-nofeature-ha.yaml to DHA file before deployment. + +Limitations, Issues and Workarounds +=================================== + +References +========== + +For more information on the OPNFV Euphrates release, please visit +http://www.opnfv.org/euphrates diff --git a/docs/release/scenarios/os-odl-nofeature-ha.rst b/docs/release/scenarios/os-odl-nofeature-ha.rst new file mode 100644 index 00000000..64e74e04 --- /dev/null +++ b/docs/release/scenarios/os-odl-nofeature-ha.rst @@ -0,0 +1,43 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) Justin Chi (HUAWEI) and Yifei Xue (HUAWEI) + +This document introduces scenario descriptions for Euphrates 1.0 of +deployment with the OpenDaylight controller and no feature enabled. + +.. contents:: + :depth: 3 + :local: + +=================== +os-odl-nofeature-ha +=================== + +This scenario is used to deploy an Ocata OpenStack deployment with +OpenDaylight Nitrogen, Ceph Jewel, and without any NFV feature enabled. + +Scenario components and composition +=================================== + +This scenario includes a set of common OpenStack services which are Nova, +Neutron, Glance, Cinder, Keystone, Heat, Ceilometer, Gnocchi, Aodh, +Horizon. Ceph is used as the backend of Cinder on deployed hosts. HAproxy +is used to balance all the services running on 3 control nodes behind a +VIP (Virtual IP address). OpenDaylight will also be deployed in this +scenario. ODL is also running in HA. Neutron communicates with ODL +through a VIP. + +Scenario usage overview +======================= + +To deploy with this scenario, you just need to assign the +os-odl-nofeature-ha.yaml to DHA file before deployment. + +Limitations, Issues and Workarounds +=================================== + +References +========== + +For more information on the OPNFV Euphrates release, please visit +http://www.opnfv.org/euphrates diff --git a/docs/release/scenarios/os-odl-sfc-ha.rst b/docs/release/scenarios/os-odl-sfc-ha.rst new file mode 100644 index 00000000..7dca2417 --- /dev/null +++ b/docs/release/scenarios/os-odl-sfc-ha.rst @@ -0,0 +1,45 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) Justin Chi (HUAWEI) and Yifei Xue (HUAWEI) + +This document introduces scenario descriptions for Euphrates 1.0 of +deployment with the OpenDaylight controller and SFC feature enabled. + +.. contents:: + :depth: 3 + :local: + +============= +os-odl-sfc-ha +============= + +This scenario is used to deploy an Ocata OpenStack deployment with +OpenDaylight Nitrogen, Ceph Jewel, and SFC feature enabled. + +Scenario components and composition +=================================== + +This scenario includes a set of common OpenStack services which are Nova, +Neutron, Glance, Cinder, Keystone, Heat, Ceilometer, Gnocchi, Aodh, +Horizon. Ceph is used as the backend of Cinder on deployed hosts. HAproxy +is used to balance all the services running on 3 control nodes behind a +VIP (Virtual IP address). OpenDaylight will also be deployed in this +scenario. ODL is also running in HA. Neutron communicates with ODL +through a VIP. Open vSwitch with NSH patched is used instead of native +Open vSwitch to support ODL SFC. Neutron communicates with ODL SFC to +create port pair, classifier, port chain and etc. + +Scenario usage overview +======================= + +To deploy with this scenario, you just need to assign the +os-odl-nofeature-ha.yaml to DHA file before deployment. + +Limitations, Issues and Workarounds +=================================== + +References +========== + +For more information on the OPNFV Euphrates release, please visit +http://www.opnfv.org/euphrates diff --git a/docs/release/userguide/FAQ/faq.rst b/docs/release/userguide/FAQ/faq.rst index 177ff0bb..326b85fe 100644 --- a/docs/release/userguide/FAQ/faq.rst +++ b/docs/release/userguide/FAQ/faq.rst @@ -52,33 +52,38 @@ an additional tagged VLAN is added if uses default network configuration. How to set OpenStack Dashboard login user and password ====================================================== -It uses admin/console as the default user/pass for OpenStack Dashboard, and you can set it in below file: -compass4nfv/deploy/conf/base.conf +It uses admin as the default user for OpenStack Dashboard. The password can be achieved as below: + +.. code-block:: bash + + sudo docker cp compass-tasks:/opt/openrc ./ + sudo cat openrc | grep OS_PASSWORD How to visit OpenStack Dashboard ================================ -You can visit OpenStack Dashboard by URL: http://{puclib_vip}/horizon +For vm deployment, because NAT bridge is used in virtual deployment, horizon can not be access directly +in external IP address. you need to cofigure the related IPtables rule at first. -The public virtual IP is configured in "compass4nfv/deploy/conf/hardware_environment/huawei-pod1/network.yml" -or "compass4nfv_FAQ/deploy/conf/vm_environment/huawei-virtual1/network.yml", defined as below: +.. code-block:: bash -.. code-block:: yaml + iptables -t nat -A PREROUTING -d $EX_IP -p tcp --dport $PORT -j DNAT --to 192.16.1.222:443 - public_vip: - ip: 192.168.50.240 +The $EX_IP here is the server's ip address that can be access from external. +You can use below command to query your external IP address. -How to access controller nodes after deployment -=============================================== +.. code-block:: bash -1. First you should login Compass VM via ssh command on Jumphost by default user/pass root/root. -The default login IP of Compass VM is configured in "compass4nfv/deploy/conf/base.conf", defined as below: + external_nic=`ip route |grep '^default'|awk '{print $5F}' + ip addr show $external_nic +The $PORT here is the one of the port [1- 65535] that does't be used in system. -.. code-block:: bash +After that, you can visit OpenStack Dashboard by URL: http://$EX_IP:$PORT - export MGMT_IP=${MGMT_IP:-192.168.200.2} +How to access controller nodes after deployment +=============================================== -2. Then you can login the controller nodes (host1-3) by default user/pass root/root via the install +You can login the controller nodes (host1-3) by default user/pass root/root via the install network IPs which are configured in "compass4nfv/deploy/conf/base.conf", defined as below: .. code-block:: bash @@ -111,8 +116,13 @@ network IPs which are configured in "compass4nfv/deploy/conf/base.conf", defined Where is OpenStack RC file ========================== -It is located /opt/admin-openrc.sh in each controller node as default. Please source it first if you -want to use OpenStack CLI. +The RC file named openrc is located in /root in utility container on each controller node as default. +Please source it first if you want to use OpenStack CLI. + +.. code-block:: bash + + lxc-attach -n $(lxc-ls | grep utility) + source /root/openrc How to recovery network connection after Jumphost reboot ======================================================== @@ -121,9 +131,44 @@ How to recovery network connection after Jumphost reboot source deploy/network.sh && save_network_info +How to use Kubernetes CLI +========================= + +Login one of the controllers +---------------------------- + +There are 3 controllers referring to host1 to host3 with IPs from 10.1.0.50 to 10.1.0.52. +The username of the nodes is root, and the password is root. + +.. code-block:: bash + + ssh root@10.1.0.50 + +Run the Kubernetes command +-------------------------- + +Kubectl controls the Kubernetes cluster manager. + +.. code-block:: bash + + kubectl help + +Follow the k8s example to create a ngnix service +------------------------------------------------ + +To create a nginx service, please read Ref[2] at the end of this page. + References ========== + +[1] +--- + For more information on the Compass4nfv FAQ, please visit `COMPASS FAQ WIKI Page <https://wiki.opnfv.org/compass4nfv_faq>`_ +[2] +--- + +`K8s Get-Started Page <http://containertutorials.com/get_started_kubernetes/k8s_example.html>`_ diff --git a/plugins/dpdk/plugins.desc b/plugins/dpdk/plugins.desc new file mode 100644 index 00000000..9989af5e --- /dev/null +++ b/plugins/dpdk/plugins.desc @@ -0,0 +1,67 @@ +# This dpdk plugin adds ovs-dpdk and dpdk features from ovsnfv project +# into Compass4nfv together with scenarios. +# +# +# More details can be found in the development document. +# ############################################################## +--- +plugin: + # plugin name,it is also as the switch to enable/disable plugin in scenario + # files + name: dpdk + + description: ovs-dpdk and dpdk based on ovsnfv + + maintainers: + - david.j.chou@intel.com + - chigang@huawei.com + + # host os type: ubuntu/centos + os_version: ubuntu + + # true: this plugin is deployed separately on a new node + # false: this plugin is deployed on controller or compute node + independent_hosts: false + + # artifact: packege download url for this plugin + artifacts: + url: + + global_vars: + - dpdk_repo: https://github.com/dpdk/dpdk.git + - dpdk_version: v16.11 + - ovs_repo: https://github.com/openvswitch/ovs.git + - ovs_version: v2.7.2 + + # orchestration + # A plugin can have mutiple components, each component may need to be + # installed on different inventory or have its own configuration. + # due to Compass4nfv currently only supports ansible, so each component + # of the installation and configuration script need to be use ansible. + # cm : congfiguration management tool : only ansible support + # role: each component corresponds to ansible script that locates in the same + # directory as plugin.desc. + # phrase: pre_openstack -- the component is installed after the OS + # provisioning, before the OpenStack deployment. + # phrase: post_openstack -- the component is installed before the OpenStack + # deployment. + # inventory: if the phrase is pre_openstack, inventory can be controller and + # compute. if the phrase is post_openstack, inventory can be get from the file + # openstack-ansible.inventory + orchestration: + cm: ansible + roles: + - role: ins_dpdk + phrase: pre_openstack + inventory: + - compute + + - role: ins_ovs + phrase: pre_openstack + inventory: + - compute + + - role: dpdk_config + phrase: post_openstack + inventory: + - neutron_agents_container diff --git a/plugins/dpdk/roles/config-dpdk/files/openvswitch-switch.service b/plugins/dpdk/roles/config-dpdk/files/openvswitch-switch.service new file mode 100644 index 00000000..cb46c341 --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/files/openvswitch-switch.service @@ -0,0 +1,17 @@ +[Unit] +Description=openvswitch-switch + +[Service] +User=root +Group=root +Type=oneshot +RemainAfterExit=yes +ExecStart=/opt/start_ovs_vswitchd.sh + +TimeoutSec=120 +#Restart=on-failure +#RestartSec=2 + +[Install] +WantedBy=multi-user.target + diff --git a/plugins/dpdk/roles/config-dpdk/handlers/main.yml b/plugins/dpdk/roles/config-dpdk/handlers/main.yml new file mode 100644 index 00000000..b1a62327 --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/handlers/main.yml @@ -0,0 +1,28 @@ +############################################################################## +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- name: service openvswitch restart + systemd: + name: "{{ item }}" + state: restarted + daemon_reload: "yes" + enabled: "yes" + with_items: "{{ openvswitch_service }}" + +- name: service libvirtd restart + service: + name: "{{ item }}" + state: restarted + with_items: "{{ libvirtd_service }}" + +- name: service neutron-openvswitch-agent restart + service: + name: "{{ item }}" + state: restarted + with_items: "{{ ovs_agent_service }}" diff --git a/plugins/dpdk/roles/config-dpdk/tasks/compute.yml b/plugins/dpdk/roles/config-dpdk/tasks/compute.yml new file mode 100644 index 00000000..b5285d79 --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/tasks/compute.yml @@ -0,0 +1,82 @@ +############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- name: get dpdk interface device name + command: echo "{{ compu_sys_mappings['tenant']['interface'] }}" + register: dpdk_device_name + +- name: get dpdk interface ip + shell: > + ip a show "{{ dpdk_device_name.stdout }}" | grep -E "\<inet\>" | + awk '{print $2}' + register: dpdk_device_ip + +- debug: + msg: "{{ dpdk_device_ip.stdout }}" + +- name: get dpdk interface device pci + shell: > + {{ devbind_script }} -s | grep {{ dpdk_device_name.stdout }} | + awk '{print $1}' + register: dpdk_device_pci + +- name: switch dpdk interface driver + shell: "{{ switch_driver_script }}" + notify: service openvswitch restart + +- name: kill ovs process + shell: > + ps aux | grep ovs | grep -v grep | awk '{print $2}' | xargs kill -9 | + true + notify: service openvswitch restart + +- name: copy service file + copy: + src: openvswitch-switch.service + dest: /lib/systemd/system/openvswitch-switch.service + notify: service openvswitch restart + +- name: config libvirtd + shell: echo 'user = "root"' >> /etc/libvirt/qemu.conf + notify: service libvirtd restart + +- meta: flush_handlers + +- name: config neutron-openvswitch-agent + blockinfile: + dest: /etc/neutron/plugins/ml2/openvswitch_agent.ini + insertafter: '^\[ovs\]' + block: | + datapath_type=netdev + vhostuser_socket_dir=/usr/local/var/run/openvswitch + +- name: set ovs manager + shell: ovs-vsctl set-manager ptcp:6640:127.0.0.1 + notify: service neutron-openvswitch-agent restart + +- name: config ovs to dpdk + shell: | + ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true + ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="{{ dpdk_memory }}" + notify: service neutron-openvswitch-agent restart + +- name: add dpdk bridge + shell: | + ovs-vsctl add-br br-dpdk -- set bridge br-dpdk datapath_type=netdev + ovs-vsctl add-port br-dpdk dpdk0 -- set Interface dpdk0 \ + type=dpdk options:dpdk-devargs="{{ dpdk_device_pci.stdout }}" + notify: service neutron-openvswitch-agent restart + +- name: bind ip on dpdk bridge + shell: | + ifconfig br-dpdk "{{ dpdk_device_ip.stdout }}" + ifconfig br-dpdk up + notify: service neutron-openvswitch-agent restart + +- meta: flush_handlers diff --git a/plugins/dpdk/roles/config-dpdk/tasks/config-dpdk.yml b/plugins/dpdk/roles/config-dpdk/tasks/config-dpdk.yml new file mode 100644 index 00000000..b0e1a1ed --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/tasks/config-dpdk.yml @@ -0,0 +1,16 @@ +############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- include_vars: "{{ ansible_distribution }}.yml" + +- include: neutron_agent.yml + when: inventory_hostname in groups['neutron_openvswitch_agent'] + +- include: compute.yml + when: inventory_hostname in groups['compute'] diff --git a/plugins/dpdk/roles/config-dpdk/tasks/main.yml b/plugins/dpdk/roles/config-dpdk/tasks/main.yml new file mode 100644 index 00000000..19fc66b7 --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/tasks/main.yml @@ -0,0 +1,11 @@ +############################################################################## +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- include: config-dpdk.yml + when: dpdk is defined and dpdk == "Enable" diff --git a/plugins/dpdk/roles/config-dpdk/tasks/neutron_agent.yml b/plugins/dpdk/roles/config-dpdk/tasks/neutron_agent.yml new file mode 100644 index 00000000..aa65142b --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/tasks/neutron_agent.yml @@ -0,0 +1,15 @@ +############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- name: config neutron-openvswitch-agent + lineinfile: + dest: /etc/neutron/plugins/ml2/openvswitch_agent.ini + regexp: '^firewall_driver' + line: "firewall_driver = openvswitch" + notify: service neutron-openvswitch-agent restart diff --git a/plugins/dpdk/roles/config-dpdk/vars/Ubuntu.yml b/plugins/dpdk/roles/config-dpdk/vars/Ubuntu.yml new file mode 100644 index 00000000..697785ad --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/vars/Ubuntu.yml @@ -0,0 +1,14 @@ +######################################################################### +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +########################################################################## +--- +devbind_script: /root/dpdk/tools/dpdk-devbind.py +switch_driver_script: /root/dpdk_uio.sh +openvswitch_service: openvswitch-switch +ovs_agent_service: neutron-openvswitch-agent +libvirtd_service: libvirtd diff --git a/plugins/dpdk/roles/config-dpdk/vars/main.yml b/plugins/dpdk/roles/config-dpdk/vars/main.yml new file mode 100644 index 00000000..f6115b62 --- /dev/null +++ b/plugins/dpdk/roles/config-dpdk/vars/main.yml @@ -0,0 +1,10 @@ +########################################################################## +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +########################################################################## +--- +dpdk_memory: 128 diff --git a/plugins/dpdk/roles/ins_dpdk/tasks/dpdk.yml b/plugins/dpdk/roles/ins_dpdk/tasks/dpdk.yml new file mode 100644 index 00000000..6a08386f --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/tasks/dpdk.yml @@ -0,0 +1,81 @@ +# ############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# ############################################################################# +--- +- name: install prerequisites package + apt: + name: "{{ item }}" + state: present + with_items: + - git + - gcc + - make + - cmake + - libpcap0.8 + - libpcap0.8-dev + +- name: git clone DPDK code + git: + repo: "{{ dpdk_repo }}" + dest: "{{ dpdk_dir }}" + version: "{{ dpdk_version }}" + +- name: Configure DPDK + lineinfile: + dest: "{{ dpdk_dir }}/config/common_linuxapp" + regexp: '^{{ item.key }}=' + line: "{{ item.key }}={{ item.value }}" + with_items: + - key: CONFIG_RTE_BUILD_COMBINE_LIBS + value: y + register: dpdk_config_change + +- name: make config DPDK + command: make config T=x86_64-native-linuxapp-gcc chdir={{ dpdk_dir }} + +- name: Configure PMD + lineinfile: + dest: "{{ dpdk_dir }}/build/.config" + regexp: '^{{ item.key }}=' + line: "{{ item.key }}={{ item.value }}" + with_items: + - key: PMD_PCAP + value: y + +- name: Check if DPDK build exists + stat: path={{ dpdk_build }} + register: dpdk_build_status + +- name: Build DPDK + command: make install T=x86_64-native-linuxapp-gcc chdir={{ dpdk_dir }} + when: (dpdk_build_status.stat.isdir is not defined) or + (dpdk_rebuild is defined) or + dpdk_config_change.changed or dpdk_changed.changed + +- name: Get dpdk interface device name + command: echo "{{ compu_sys_mappings['tenant']['interface'] }}" + register: dpdk_device_name + when: compu_sys_mappings["tenant"]["type"] == "dpdk" + +- debug: + msg: "{{ dpdk_device_name }}" + +- name: Create DPDK scripts + template: + src: "templates/{{ item.name }}.j2" + dest: "/root/{{ item.name }}" + mode: 0755 + with_items: + - name: dpdk_uio.sh + dpdk_build: '{{ dpdk_build }}' + dpdk_dir: '{{ dpdk_dir }}' + device_name: '{{ dpdk_device_name.stdout | default("eth2") }}' + - name: dpdk_vfio.sh + dpdk_build: '{{ dpdk_build }}' + dpdk_dir: '{{ dpdk_dir }}' + device_name: '{{ dpdk_device_name.stdout | default("eth2") }}' diff --git a/plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml b/plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml new file mode 100644 index 00000000..3f41cf03 --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml @@ -0,0 +1,45 @@ +# ############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# ############################################################################# +--- +# yamllint disable rule:truthy +- name: Check hugepages + shell: grep -q intel_iommu /etc/default/grub + register: check_result + ignore_errors: True +# yamllint enable rule:truthy + +- name: Config grub + lineinfile: + dest: /etc/default/grub + regexp: '^GRUB_CMDLINE_LINUX_DEFAULT=""' + line: "{{ grub_cmdline }}" + state: present + when: check_result.rc == 1 + +- name: Update grub + shell: update-grub + when: check_result.rc == 1 + +- name: wait a moment + command: sleep 5 + when: check_result.rc == 1 + +- name: Reboot + shell: sleep 2 && shutdown -r now 'Reboot required' + become: true + async: 1 + poll: 0 + when: check_result.rc == 1 + ignore_errors: true + +- name: Wait for reboot + local_action: + module: wait_for + host={{ ansible_eth0.ipv4.address }} port=22 delay=1 timeout=300 + when: check_result.rc == 1 diff --git a/plugins/dpdk/roles/ins_dpdk/tasks/main.yml b/plugins/dpdk/roles/ins_dpdk/tasks/main.yml new file mode 100644 index 00000000..923dc3b4 --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/tasks/main.yml @@ -0,0 +1,14 @@ +############################################################################## +# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- include: hugepages.yml + when: dpdk is defined and dpdk == "Enable" + +- include: dpdk.yml + when: dpdk is defined and dpdk == "Enable" diff --git a/plugins/dpdk/roles/ins_dpdk/templates/dpdk_uio.sh.j2 b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_uio.sh.j2 new file mode 100644 index 00000000..560d30ca --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_uio.sh.j2 @@ -0,0 +1,9 @@ +#!/bin/bash +ifdown {{ item.device_name }} +modprobe uio +lsmod |grep igb_uio +if [ $? == 0 ];then + rmmod igb_uio +fi +insmod {{ item.dpdk_build }}/kmod/igb_uio.ko +{{ item.dpdk_dir }}/tools/dpdk-devbind.py --bind=igb_uio {{ item.device_name }} diff --git a/plugins/dpdk/roles/ins_dpdk/templates/dpdk_vfio.sh.j2 b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_vfio.sh.j2 new file mode 100644 index 00000000..58839342 --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_vfio.sh.j2 @@ -0,0 +1,6 @@ +#!/bin/bash +ifdown {{ item.device_name }} +modprobe vfio-pci +chmod a+x /dev/vfio +chmod 0666 /dev/vfio/* +{{ item.dpdk_dir }}/tools/dpdk-devbind.py --bind=vfio-pci {{ item.device_name }} diff --git a/plugins/dpdk/roles/ins_dpdk/vars/main.yml b/plugins/dpdk/roles/ins_dpdk/vars/main.yml new file mode 100644 index 00000000..4bd4076e --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/vars/main.yml @@ -0,0 +1,17 @@ +############################################################################## +# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# yamllint disable rule:line-length +grub_cmdline: GRUB_CMDLINE_LINUX_DEFAULT="hugepagesz=2M hugepages=2048 iommu=pt intel_iommu=on" +# yamllint enable rule:line-length + +dpdk_dir: /root/dpdk +dpdk_build: '{{ dpdk_dir }}/x86_64-native-linuxapp-gcc' +dpdk_repo: https://github.com/dpdk/dpdk.git +dpdk_version: v16.11 diff --git a/plugins/dpdk/roles/ins_ovs/tasks/main.yml b/plugins/dpdk/roles/ins_ovs/tasks/main.yml new file mode 100644 index 00000000..6570d06c --- /dev/null +++ b/plugins/dpdk/roles/ins_ovs/tasks/main.yml @@ -0,0 +1,11 @@ +# ############################################################################# +# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# ############################################################################# +--- +- include: ovs.yml + when: dpdk is defined and dpdk == "Enable" diff --git a/plugins/dpdk/roles/ins_ovs/tasks/ovs.yml b/plugins/dpdk/roles/ins_ovs/tasks/ovs.yml new file mode 100644 index 00000000..64475c6a --- /dev/null +++ b/plugins/dpdk/roles/ins_ovs/tasks/ovs.yml @@ -0,0 +1,93 @@ +############################################################################## +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- name: install prerequisites package + apt: + name: "{{ item }}" + state: present + with_items: + - git + - libnuma-dev + - dh-autoreconf + - python-pip + +- name: git clone open-vswitch code + git: + repo: "{{ ovs_repo }}" + dest: "{{ ovs_dir }}" + version: "{{ ovs_version }}" + +- name: install prerequisites package + pip: + name: six + +- name: Check if OVS configure script exists + stat: path={{ ovs_dir }}/configure + register: ovs_config_status + +- name: Bootstrap OVS if required + command: ./boot.sh chdir={{ ovs_dir }} + when: ovs_config_status.stat.exists == false or (ovs_rebuild is defined) or ovs_changed.changed + +- name: Check if OVS Makefile exists + stat: path={{ ovs_dir }}/Makefile + register: ovs_makefile_status + +# yamllint disable rule:line-length +- name: Configure OVS + command: ./configure --with-dpdk={{ dpdk_build }} CFLAGS="-g -O2 -Wno-cast-align" chdir={{ ovs_dir }} + when: ovs_makefile_status.stat.exists == false or (ovs_rebuild is defined) or ovs_changed.changed +# yamllint enable rule:line-length + +- name: Check if OVS distribution files exists + stat: path={{ ovs_dir }}/distfiles + register: ovs_distfiles_status + +- name: Build OVS + command: make CFLAGS='-O3 -march=native' chdir={{ ovs_dir }} + when: ovs_distfiles_status.stat.exists == false or (ovs_rebuild is defined) or ovs_changed.changed + +- name: Check if OVS tools are installed + stat: path=/usr/local/bin/ovsdb-tool + register: ovs_tools_status + +- name: Install OVS tools + command: make install chdir={{ ovs_dir }} + when: ovs_tools_status.stat.exists == false or (ovs_rebuild is defined) or ovs_changed.changed + +- name: Create OVS scripts + template: + src: "templates/{{ item }}.j2" + dest: "/opt/{{ item }}" + mode: 0755 + with_items: + - start_ovs_vswitchd.sh + +- name: Create folders + file: path={{ item }} state=directory + with_items: + - /usr/local/etc/openvswitch + - /usr/local/var/run/openvswitch + +- name: Clear database configuration if required + file: path=/usr/local/etc/openvswitch/conf.db state=absent + when: ovs_rebuild is defined or ovs_changed.changed + +- name: Check if database configuration exists + stat: path=/usr/local/etc/openvswitch/conf.db + register: ovs_dbconfig_status + +# yamllint disable rule:line-length +- name: Create database configuration + command: ovsdb-tool create /usr/local/etc/openvswitch/conf.db /usr/local/share/openvswitch/vswitch.ovsschema + when: ovs_dbconfig_status.stat.exists == false +# yamllint enable rule:line-length + +- name: Start OVS vswitchd with DPDK support enabled + command: /opt/start_ovs_vswitchd.sh diff --git a/plugins/dpdk/roles/ins_ovs/templates/start_ovs_vswitchd.sh.j2 b/plugins/dpdk/roles/ins_ovs/templates/start_ovs_vswitchd.sh.j2 new file mode 100644 index 00000000..a96c8721 --- /dev/null +++ b/plugins/dpdk/roles/ins_ovs/templates/start_ovs_vswitchd.sh.j2 @@ -0,0 +1,8 @@ +#!/bin/bash +ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ + --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ + --pidfile --detach + +export DB_SOCK=/usr/local/var/run/openvswitch/db.sock +sudo ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true +sudo ovs-vswitchd unix:$DB_SOCK --pidfile --detach diff --git a/plugins/dpdk/roles/ins_ovs/vars/main.yml b/plugins/dpdk/roles/ins_ovs/vars/main.yml new file mode 100644 index 00000000..c5f14d4e --- /dev/null +++ b/plugins/dpdk/roles/ins_ovs/vars/main.yml @@ -0,0 +1,14 @@ +############################################################################## +# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +dpdk_dir: /root/dpdk +dpdk_build: '{{ dpdk_dir }}/x86_64-native-linuxapp-gcc' +ovs_dir: /root/ovs +ovs_repo: https://github.com/openvswitch/ovs.git +ovs_version: v2.7.2 diff --git a/plugins/moon/roles/moon/handlers/main.yml b/plugins/moon/roles/moon/handlers/main.yml index ab2a090b..5029d378 100755 --- a/plugins/moon/roles/moon/handlers/main.yml +++ b/plugins/moon/roles/moon/handlers/main.yml @@ -7,9 +7,5 @@ ############################################################################## --- - name: restart network service - shell: "ifconfig eth0 down && ifconfig eth0 up && \ - /sbin/ifdown -a && \ + shell: "ifconfig eth0 0 && /sbin/ifdown -a && \ /sbin/ifup --ignore-errors -a" - -- name: restart nfs service - service: name=nfs-kernel-server state=restarted diff --git a/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh b/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh new file mode 100755 index 00000000..55639907 --- /dev/null +++ b/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +rm -rf /home/networking +rm -rf /home/tmp + +mkdir -p /home/networking +mkdir -p /home/tmp + +cd /home/networking + +git clone https://github.com/openstack/networking-odl.git -b stable/ocata + +sed -i 's/^Babel.*/Babel!=2.4.0,>=2.3.4/' /home/networking/networking-odl/requirements.txt + +pip wheel /home/networking/networking-odl/ -w /home/tmp/ + +cp /home/tmp/networking* /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/ + +sleep 30 diff --git a/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service b/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service index f4801a36..a6966d82 100755 --- a/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service +++ b/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service @@ -10,7 +10,7 @@ Type=simple WorkingDirectory=/opt/opendaylight PermissionsStartOnly=true ExecStartPre= -ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/karaf.branding-1.8.1-SNAPSHOT.jar:/opt/opendaylight/lib/karaf-jaas-boot.jar:/opt/opendaylight/lib/karaf.jar:/opt/opendaylight/lib/karaf-org.osgi.core.jar org.apache.karaf.main.Main +ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/boot/org.apache.karaf.diagnostic.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.jaas.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.main-4.0.9.jar:/opt/opendaylight/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main Restart=on-failure LimitNOFILE=65535 TimeoutStopSec=15 diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml index dc071cc7..684f314c 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml @@ -8,7 +8,6 @@ - name: install networking-odl pip: name: networking-odl - version: "{{ networking_odl_version }}" virtualenv: /openstack/venvs/neutron-15.1.4 - name: configure vsctl for dhcp agent diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-3.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-3.yml index 2527852e..e0a9088f 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-3.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-3.yml @@ -4,41 +4,10 @@ shell: | crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight_v2; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan; - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling "True"; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini ovs; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 extension_drivers port_security; -- name: configure bridge_mappings -> ml2 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ contr_l2_mappings }}"; - when: - - odl_l3_agent == "Disable" - - inventory_hostname not in groups['nova_compute'] - -- name: configure bridge_mappings -> ml2 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ compu_l2_mappings }}"; - when: - - odl_l3_agent == "Disable" - - inventory_hostname in groups['nova_compute'] - -- name: configure bridge_mappings for L3 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ contr_l3_mappings }}"; - when: - - odl_l3_agent == "Enable" - - inventory_hostname not in groups['nova_compute'] - -- name: configure bridge_mappings for L3 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ compu_l3_mappings }}"; - when: - - odl_l3_agent == "Enable" - - inventory_hostname in groups['nova_compute'] - - name: configure external bridge name for L2 shell: | crudini --set /etc/neutron/l3_agent.ini \ diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-hosts-1.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-hosts-1.yml index 6879340e..9ca27e0a 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/control-hosts-1.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-hosts-1.yml @@ -94,6 +94,11 @@ sed -i 's/port="8282"/port="8081"/' {{ odl_home }}configuration/tomcat-server.xml +- name: modify 8181 to 8081 + shell: > + sed -i 's/8181/8081/' + {{ odl_home }}etc/org.ops4j.pax.web.cfg + - name: remove karaf data directory file: path: "{{ odl_home }}data" diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-repos-1.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-repos-1.yml index 8427e4f0..7b699a35 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/control-repos-1.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-repos-1.yml @@ -1,17 +1,9 @@ --- +- name: copy download script + copy: + src: odl_pkg.sh + dest: /opt/odl_pkg.sh + mode: 0777 -- name: download networking-odl - get_url: - url: "{{ odl_pip }}" - dest: /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64 - -- name: patch networking-odl to fix a bug - shell: | - cd /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/ - tar -zxf networking-odl-4.0.0.tar.gz # hard code, need to modify - rm -rf networking-odl-4.0.0.tar.gz - sed -i 's/^Babel.*/Babel!=2.4.0,>=2.3.4/' networking-odl-4.0.0/requirements.txt - tar -zcf networking-odl-4.0.0.tar.gz networking-odl-4.0.0/ - rm -rf networking-odl-4.0.0/ - pip install networking-odl-4.0.0.tar.gz -d ./ - cd - +- name: download networking sfc and odl + command: su -s /bin/sh -c "/opt/odl_pkg.sh" diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml index 459c734a..f6f73684 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml @@ -8,7 +8,6 @@ - name: install networking-odl pip: name: networking-odl - version: "{{ networking_odl_version }}" virtualenv: /openstack/venvs/neutron-15.1.4 # Todo: hardcode, need to modify - name: turn off neutron-server on control node diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml index a5d31d4c..39d0312f 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml @@ -10,16 +10,9 @@ shell: > crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight_v2; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan; - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling "True"; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini ovs; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 extension_drivers port_security; - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs bridge_mappings - "{{ contr_l2_mappings }}"; - -- name: configure bridge_mappings for L3 - shell: > - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs bridge_mappings - "{{ contr_l3_mappings }}"; - when: odl_l3_agent == "Enable" - name: turn off l3 ha for odl l2 shell: | diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/main.yml b/plugins/odl_cluster/roles/setup-odl/tasks/main.yml index e65be002..96ca2f96 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/main.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/main.yml @@ -1,4 +1,6 @@ --- - include: odl-cluster.yml - when: opendaylight is defined and opendaylight == "Enable" + when: + - opendaylight is defined and opendaylight == "Enable" + - odl_sfc is not defined diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/odl-cluster.yml b/plugins/odl_cluster/roles/setup-odl/tasks/odl-cluster.yml index 5b57fb00..8cd12da8 100755 --- a/plugins/odl_cluster/roles/setup-odl/tasks/odl-cluster.yml +++ b/plugins/odl_cluster/roles/setup-odl/tasks/odl-cluster.yml @@ -15,7 +15,7 @@ - include: control-repos-1.yml vars: odl_pip: "{{ networking_odl_url }}" - when: inventory_hostname in groups['repo_container'] + when: inventory_hostname == groups['repo_container'][0] - include: control-servers-1.yml when: inventory_hostname in groups['neutron_server'] diff --git a/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg b/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg index bc625cda..86b2baec 100755 --- a/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg +++ b/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg @@ -36,12 +36,15 @@ # # Comma separated list of features repositories to register by default # -featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.8/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.8/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.2.9/xml/features,mvn:org.apache.karaf.features/spring/3.0.8/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.6.1-SNAPSHOT/xml/features +featuresRepositories = \ + mvn:org.opendaylight.integration/features-index/0.7.0/xml/features, \ + mvn:org.apache.karaf.features/framework/4.0.9/xml/features, \ + mvn:org.apache.karaf.features/standard/4.0.9/xml/features # # Comma separated list of features to install at startup # -featuresBoot=config,standard,region,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-dlux-all,odl-netvirt-openstack,odl-mdsal-apidocs,odl-dlux-core,odl-dluxapps-nodes,odl-dluxapps-topology,odl-dluxapps-yangui,odl-dluxapps-yangvisualizer,odl-l2switch-switch,odl-l2switch-switch-ui,odl-ovsdb-hwvtepsouthbound-ui,odl-ovsdb-southbound-impl-ui,odl-netvirt-ui,odl-openflowplugin-flow-services-ui,odl-neutron-logger +featuresBoot=config,standard,wrap,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-netvirt-openstack,odl-mdsal-apidocs,odl-dlux-core,odl-netvirt-ui # # Defines if the boot features are started in asynchronous mode (in a dedicated thread) diff --git a/plugins/odl_cluster/roles/setup-odl/vars/main.yml b/plugins/odl_cluster/roles/setup-odl/vars/main.yml index 5e6325fb..37881880 100755 --- a/plugins/odl_cluster/roles/setup-odl/vars/main.yml +++ b/plugins/odl_cluster/roles/setup-odl/vars/main.yml @@ -13,8 +13,8 @@ odl_username: admin odl_password: admin odl_api_port: 8181 -odl_pkg_url: distribution-karaf-0.6.1-Carbon.tar.gz -odl_pkg_name: distribution-karaf-0.6.1-Carbon.tar.gz +odl_pkg_url: karaf-0.7.0.tar.gz +odl_pkg_name: karaf-0.7.0.tar.gz odl_home: "/opt/opendaylight/" odl_base_features: - config diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh b/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh new file mode 100755 index 00000000..d93da3fd --- /dev/null +++ b/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +rm -rf /home/networking +rm -rf /home/tmp + +mkdir -p /home/networking +mkdir -p /home/tmp + +cd /home/networking + +git clone https://github.com/openstack/networking-odl.git -b stable/ocata +git clone https://github.com/openstack/networking-sfc.git -b stable/ocata + +sed -i 's/^Babel.*/Babel!=2.4.0,>=2.3.4/' /home/networking/networking-odl/requirements.txt + +pip wheel /home/networking/networking-odl/ -w /home/tmp/ +pip wheel /home/networking/networking-sfc/ -w /home/tmp/ + +cp /home/tmp/networking* /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/ + +sleep 30 diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service b/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service index f4801a36..a6966d82 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service +++ b/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service @@ -10,7 +10,7 @@ Type=simple WorkingDirectory=/opt/opendaylight PermissionsStartOnly=true ExecStartPre= -ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/karaf.branding-1.8.1-SNAPSHOT.jar:/opt/opendaylight/lib/karaf-jaas-boot.jar:/opt/opendaylight/lib/karaf.jar:/opt/opendaylight/lib/karaf-org.osgi.core.jar org.apache.karaf.main.Main +ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/boot/org.apache.karaf.diagnostic.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.jaas.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.main-4.0.9.jar:/opt/opendaylight/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main Restart=on-failure LimitNOFILE=65535 TimeoutStopSec=15 diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml index dc071cc7..684f314c 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml @@ -8,7 +8,6 @@ - name: install networking-odl pip: name: networking-odl - version: "{{ networking_odl_version }}" virtualenv: /openstack/venvs/neutron-15.1.4 - name: configure vsctl for dhcp agent diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml index 2527852e..e0a9088f 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml @@ -4,41 +4,10 @@ shell: | crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight_v2; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan; - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling "True"; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini ovs; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 extension_drivers port_security; -- name: configure bridge_mappings -> ml2 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ contr_l2_mappings }}"; - when: - - odl_l3_agent == "Disable" - - inventory_hostname not in groups['nova_compute'] - -- name: configure bridge_mappings -> ml2 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ compu_l2_mappings }}"; - when: - - odl_l3_agent == "Disable" - - inventory_hostname in groups['nova_compute'] - -- name: configure bridge_mappings for L3 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ contr_l3_mappings }}"; - when: - - odl_l3_agent == "Enable" - - inventory_hostname not in groups['nova_compute'] - -- name: configure bridge_mappings for L3 - shell: | - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \ - ovs bridge_mappings "{{ compu_l3_mappings }}"; - when: - - odl_l3_agent == "Enable" - - inventory_hostname in groups['nova_compute'] - - name: configure external bridge name for L2 shell: | crudini --set /etc/neutron/l3_agent.ini \ diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml index 6879340e..9ca27e0a 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml @@ -94,6 +94,11 @@ sed -i 's/port="8282"/port="8081"/' {{ odl_home }}configuration/tomcat-server.xml +- name: modify 8181 to 8081 + shell: > + sed -i 's/8181/8081/' + {{ odl_home }}etc/org.ops4j.pax.web.cfg + - name: remove karaf data directory file: path: "{{ odl_home }}data" diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml index 2e58e141..7b699a35 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml @@ -1,27 +1,9 @@ --- +- name: copy download script + copy: + src: odl_pkg.sh + dest: /opt/odl_pkg.sh + mode: 0777 -- name: download networking-odl - get_url: - url: "{{ odl_pip }}" - dest: /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64 - -- name: download networking-sfc - shell: | - mkdir -p /opt/tmp - pip install networking-sfc==4.0.0 -d /opt/tmp/ - cp /opt/tmp/networking* /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/ - rm -rf /opt/tmp - when: - - odl_sfc == "Enable" - - inventory_hostname in groups['repo_container'][0] - -- name: patch networking-odl to fix a bug - shell: | - cd /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/ - tar -zxf networking-odl-4.0.0.tar.gz # hard code, need to modify - rm -rf networking-odl-4.0.0.tar.gz - sed -i 's/^Babel.*/Babel!=2.4.0,>=2.3.4/' networking-odl-4.0.0/requirements.txt - tar -zcf networking-odl-4.0.0.tar.gz networking-odl-4.0.0/ - rm -rf networking-odl-4.0.0/ - pip install networking-odl-4.0.0.tar.gz -d ./ - cd - +- name: download networking sfc and odl + command: su -s /bin/sh -c "/opt/odl_pkg.sh" diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml index e2dd128d..40149346 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml @@ -8,13 +8,11 @@ - name: install networking-odl pip: name: networking-odl - version: "{{ networking_odl_version }}" virtualenv: /openstack/venvs/neutron-15.1.4 # Todo: hardcode, need to modify - name: install networking-sfc pip: name: networking-sfc - version: "4.0.0" virtualenv: /openstack/venvs/neutron-15.1.4 when: odl_sfc == "Enable" diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml index b54fce22..d8bcf154 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml @@ -10,16 +10,9 @@ shell: > crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight_v2; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan; - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling "True"; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini ovs; + crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver; crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 extension_drivers port_security; - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs bridge_mappings - "{{ contr_l2_mappings }}"; - -- name: configure bridge_mappings for L3 - shell: > - crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs bridge_mappings - "{{ contr_l3_mappings }}"; - when: odl_l3_agent == "Enable" - name: turn off l3 ha for odl l2 shell: | diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml new file mode 100644 index 00000000..c43b6dcc --- /dev/null +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml @@ -0,0 +1,8 @@ +--- + +- name: upgrade networking-sfc + pip: + name: networking-sfc + extra_args: -U + virtualenv: /openstack/venvs/tacker-15.1.4 + when: odl_sfc == "Enable" diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml index 613c796b..d10634fa 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml @@ -3,5 +3,4 @@ - name: Install networking-sfc for CLI pip: name: networking-sfc - version: "4.0.0" when: odl_sfc == "Enable" diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml index e65be002..6b226688 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml @@ -1,4 +1,6 @@ --- - include: odl-cluster.yml - when: opendaylight is defined and opendaylight == "Enable" + when: + - opendaylight is defined and opendaylight == "Enable" + - odl_sfc is defined and odl_sfc == "Enable" diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml index a22e980f..ee2ee32a 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml @@ -4,7 +4,7 @@ - include_vars: "{{ openstack_passwd_file }}" -- include_vars: odl-pre.yml +- include: odl-pre.yml when: inventory_hostname == "localhost" - include_vars: /tmp/odl-extra-vars.yml @@ -15,7 +15,7 @@ - include: control-repos-1.yml vars: odl_pip: "{{ networking_odl_url }}" - when: inventory_hostname in groups['repo_container'] + when: inventory_hostname == groups['repo_container'][0] - include: control-servers-1.yml when: inventory_hostname in groups['neutron_server'] @@ -48,4 +48,7 @@ - inventory_hostname in groups['neutron_server'][0] - inventory_hostname not in groups['network_hosts'] +- include: control-tacker-1.yml + when: inventory_hostname in groups['tacker_all'] + - include: odl-post.yml diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg b/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg index b07e028f..afb7e6b5 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg +++ b/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg @@ -36,12 +36,15 @@ # # Comma separated list of features repositories to register by default # -featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.8/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.8/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.2.9/xml/features,mvn:org.apache.karaf.features/spring/3.0.8/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.6.1-SNAPSHOT/xml/features +featuresRepositories = \ + mvn:org.opendaylight.integration/features-index/0.7.0/xml/features, \ + mvn:org.apache.karaf.features/framework/4.0.9/xml/features, \ + mvn:org.apache.karaf.features/standard/4.0.9/xml/features # # Comma separated list of features to install at startup # -featuresBoot=config,standard,region,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-dlux-all,odl-netvirt-openstack,odl-mdsal-apidocs,odl-dlux-core,odl-dluxapps-nodes,odl-dluxapps-topology,odl-dluxapps-yangui,odl-dluxapps-yangvisualizer,odl-l2switch-switch,odl-l2switch-switch-ui,odl-ovsdb-hwvtepsouthbound-ui,odl-ovsdb-southbound-impl-ui,odl-netvirt-ui,odl-openflowplugin-flow-services-ui,odl-neutron-logger,odl-netvirt-sfc +featuresBoot=config,standard,wrap,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-netvirt-openstack,odl-mdsal-apidocs,odl-dlux-core,odl-netvirt-ui,odl-netvirt-sfc # # Defines if the boot features are started in asynchronous mode (in a dedicated thread) diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml b/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml index a9466ea0..b3d71edb 100755 --- a/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml +++ b/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml @@ -7,6 +7,8 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- +openstack_passwd_file: /etc/openstack_deploy/user_secrets.yml + odl_username: admin odl_password: admin odl_api_port: 8181 @@ -16,8 +18,8 @@ sfc_plugins: src: sfc.conf dst: /opt/sfc.conf -odl_pkg_url: distribution-karaf-0.6.1-Carbon.tar.gz -odl_pkg_name: distribution-karaf-0.6.1-Carbon.tar.gz +odl_pkg_url: karaf-0.7.0.tar.gz +odl_pkg_name: karaf-0.7.0.tar.gz odl_home: "/opt/opendaylight/" odl_base_features: - config diff --git a/plugins/odl_sfc/roles/setup-sfc/tasks/setup_sfc.yml b/plugins/odl_sfc/roles/setup-sfc/tasks/setup_sfc.yml index eb8b5aa6..cb33d59e 100644 --- a/plugins/odl_sfc/roles/setup-sfc/tasks/setup_sfc.yml +++ b/plugins/odl_sfc/roles/setup-sfc/tasks/setup_sfc.yml @@ -10,5 +10,5 @@ - name: copy odl_cluster role shell: | - cp -rf /var/ansible/run/openstack_ocata-opnfv2/roles/setup-odl-sfc \ - /var/ansible/run/openstack_ocata-opnfv2/roles/setup-odl + cp -rf /var/ansible/run/openstack_ocata-opnfv2/roles/setup-odl-sfc/* \ + /var/ansible/run/openstack_ocata-opnfv2/roles/setup-odl/ diff --git a/quickstart_k8s.sh b/quickstart_k8s.sh new file mode 100755 index 00000000..e4fb9ee3 --- /dev/null +++ b/quickstart_k8s.sh @@ -0,0 +1,30 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +sudo apt-get update +sudo apt-get install -y git + +git clone https://gerrit.opnfv.org/gerrit/compass4nfv + +pushd compass4nfv + +CURRENT_DIR=$PWD + +#k8s only support on centos +export OS_VERSION=centos7 +export KUBERNETES_VERSION="v1.7.3" +SCENARIO=${SCENARIO:-os-nosdn-nofeature-ha.yml} + +./build.sh + +export TAR_URL=file://$CURRENT_DIR/work/building/compass.tar.gz +export DHA=$CURRENT_DIR/deploy/conf/vm_environment/$SCENARIO +export NETWORK=$CURRENT_DIR/deploy/conf/vm_environment/network.yml + +./deploy.sh |