diff options
author | jdenisco <jdenisco@cisco.com> | 2019-02-19 16:25:05 -0500 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-02-23 09:42:48 +0000 |
commit | 2cefb064045727a50e7e57cc00919389ce8d86ce (patch) | |
tree | c46bbf3c50a42c8302d2bbe5864e4d8c78cdbb91 | |
parent | ba7d8f5a3d4078d673486fbb91fe0ce87dfe7230 (diff) |
Add support for 19.01
Change-Id: I8583f6f6432d8d7c449f43d62d8707a1718f3240
Signed-off-by: jdenisco <jdenisco@cisco.com>
-rw-r--r-- | docs/about.rst | 4 | ||||
-rw-r--r-- | docs/gettingstarted/installing/centos.rst | 52 | ||||
-rw-r--r-- | docs/gettingstarted/installing/ubuntu.rst | 33 | ||||
-rw-r--r-- | extras/vpp_config/setup.py | 2 | ||||
-rw-r--r-- | extras/vpp_config/vpplib/VPPUtil.py | 178 |
5 files changed, 74 insertions, 195 deletions
diff --git a/docs/about.rst b/docs/about.rst index 76e83d5ca9c..272df4979a5 100644 --- a/docs/about.rst +++ b/docs/about.rst @@ -4,6 +4,6 @@ About ===== -**VPP Version:** 19.04-rc0~102-g22c0ece +**VPP Version:** 19.04-rc0~219-g7d139ad -**Built on:** Wed Jan 30 15:37:57 GMT 2019 +**Built on:** Wed Feb 20 16:18:46 GMT 2019 diff --git a/docs/gettingstarted/installing/centos.rst b/docs/gettingstarted/installing/centos.rst index 133d3093464..d4980070b4f 100644 --- a/docs/gettingstarted/installing/centos.rst +++ b/docs/gettingstarted/installing/centos.rst @@ -72,56 +72,6 @@ provided. $ sudo yum --showduplicates list vpp* | expand -VPP Stable Branch -""""""""""""""""""" - -To allow *yum* access to the build artifacts for a VPP stable branch, create -the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content. - -.. code-block:: console - - $ cat /etc/yum.repos.d/fdio-release.repo - [fdio_1810] - name=fdio_1810 - baseurl=https://packagecloud.io/fdio/1810/el/7/$basearch - repo_gpgcheck=1 - gpgcheck=0 - enabled=1 - gpgkey=https://packagecloud.io/fdio/1810/gpgkey - sslverify=1 - sslcacert=/etc/pki/tls/certs/ca-bundle.crt - metadata_expire=300 - - [fdio_1810-source] - name=fdio_1810-source - baseurl=https://packagecloud.io/fdio/1810/el/7/SRPMS - repo_gpgcheck=1 - gpgcheck=0 - enabled=1 - gpgkey=https://packagecloud.io/fdio/1810/gpgkey - sslverify=1 - sslcacert=/etc/pki/tls/certs/ca-bundle.crt - metadata_expire=300 - -For other stable branches, replace the *'1810'* from the above content with the -desired release. Examples: 1606, 1609, 1701, 1704, 1707, 1710, 1804, 1807 - -Update your local yum cache. - -.. code-block:: console - - $ sudo yum clean all - $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_1810' - -The *'yum install vpp'* command will install the most recent build on the -branch, not the latest offical release. Run the following command to get the -list of images produce by the branch: - -.. code-block:: console - - $ sudo yum --showduplicates list vpp* | expand - - VPP Master Branch """"""""""""""""""" @@ -193,7 +143,7 @@ needed: .. code-block:: console - $ sudo yum install vpp-plugins vpp-devel vpp-api-python vpp-api-lua + $ sudo yum install vpp-plugins vpp-ext-deps vpp-devel vpp-api-python vpp-api-lua vpp-api-java vpp-debuginfo vpp-devel libvpp0 Starting VPP ============ diff --git a/docs/gettingstarted/installing/ubuntu.rst b/docs/gettingstarted/installing/ubuntu.rst index 32050334f5b..c8a98939e62 100644 --- a/docs/gettingstarted/installing/ubuntu.rst +++ b/docs/gettingstarted/installing/ubuntu.rst @@ -2,7 +2,7 @@ .. toctree:: -Ubuntu 16.04 - Setup the FD.io Repository +Ubuntu 18.04 - Setup the FD.io Repository ========================================== FD.io VPP is installed using Package Cloud. For a complete set of @@ -37,7 +37,7 @@ Create the file **/etc/apt/sources.list.d/99fd.io.list** that contain the follow .. code-block:: console - deb [trusted=yes] https://packagecloud.io/fdio/release/ubuntu xenial main ./ + deb [trusted=yes] https://packagecloud.io/fdio/release/ubuntu xenial main Get the key: @@ -45,22 +45,6 @@ Get the key: curl -L https://packagecloud.io/fdio/release/gpgkey | sudo apt-key add - -VPP 1810 Branch -^^^^^^^^^^^^^^^^ - -Create the file **/etc/apt/sources.list.d/99fd.io.list** that contain the following contents: - -.. code-block:: console - - deb [trusted=yes] https://packagecloud.io/fdio/1810/ubuntu xenial main ./ - -Get the key: - -.. code-block:: console - - curl -L https://packagecloud.io/fdio/1810/gpgkey | sudo apt-key add - - - VPP master Branch ^^^^^^^^^^^^^^^^^^^^ @@ -68,7 +52,7 @@ Create the file **/etc/apt/sources.list.d/99fd.io.list** that contain the follow .. code-block:: console - deb [trusted=yes] https://packagecloud.io/fdio/master/ubuntu xenial main ./ + deb [trusted=yes] https://packagecloud.io/fdio/master/ubuntu xenial main Get the key: @@ -85,7 +69,7 @@ Install the mandatory packages by running the following commands: .. code-block:: console sudo apt-get update - sudo apt-get install vpp-lib vpp vpp-plugins + sudo apt-get install vpp Install the Optional Packages @@ -93,10 +77,17 @@ Install the Optional Packages Install the optional packages by running the following command: +For the release packages: + .. code-block:: console - sudo apt-get install vpp-dbg vpp-dev vpp-api-python vpp-api-lua + sudo apt-get install vpp-plugins vpp-api-java vpp-api-lua vpp-api-python vpp-dbg vpp-dev + +For the master packages: + +.. code-block:: console + sudo apt-get install vpp-plugin-core vpp-ext-deps vpp-api-python vpp-dbg vpp-dev vpp-plugin-dpdk Uninstall the Packages ====================== diff --git a/extras/vpp_config/setup.py b/extras/vpp_config/setup.py index fca08f66f82..c8d12ef7ef4 100644 --- a/extras/vpp_config/setup.py +++ b/extras/vpp_config/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name="vpp_config", - version="19.01.1", + version="19.01.3", author="John DeNisco", author_email="jdenisco@cisco.com", description="VPP Configuration Utility", diff --git a/extras/vpp_config/vpplib/VPPUtil.py b/extras/vpp_config/vpplib/VPPUtil.py index ff6fa0e98c2..d6354858828 100644 --- a/extras/vpp_config/vpplib/VPPUtil.py +++ b/extras/vpp_config/vpplib/VPPUtil.py @@ -22,6 +22,16 @@ import requests from collections import Counter +ubuntu_pkgs = {'release': ['vpp', 'vpp-plugins', 'vpp-api-java', 'vpp-api-lua', 'vpp-api-python', + 'vpp-dbg', 'vpp-dev'], + 'master': ['vpp', 'vpp-plugin-core', 'vpp-ext-deps', 'vpp-api-python', + 'vpp-dbg', 'vpp-dev', 'vpp-plugin-dpdk']} + +centos_pkgs = {'release': ['vpp', 'vpp-plugins', 'vpp-api-java', 'vpp-api-lua', + 'vpp-api-python', 'vpp-debuginfo', 'vpp-devel', 'libvpp0'], + 'master': ['vpp', 'vpp-plugins', 'vpp-ext-deps', 'vpp-api-java', 'vpp-api-lua', + 'vpp-api-python', 'vpp-debuginfo', 'vpp-devel', 'libvpp0']} + class VPPUtil(object): """General class for any VPP related methods/functions.""" @@ -59,7 +69,7 @@ class VPPUtil(object): for line in lines: if type(line) != str: line = line.decode() - logging.warn(" {}".format(line.strip('\n'))) + logging.warning(" {}".format(line.strip('\n'))) err += line ret = prc.wait() @@ -85,38 +95,6 @@ class VPPUtil(object): if ret != 0: logging.debug(stderr) - def _install_vpp_pkg_ubuntu(self, node, pkg): - """ - Install the VPP packages - - :param node: Node dictionary - :param pkg: The vpp packages - :type node: dict - :type pkg: string - """ - - cmd = 'apt-get -y install {}'.format(pkg) - (ret, stdout, stderr) = self.exec_command(cmd) - if ret != 0: - raise RuntimeError('{} failed on node {} {} {}'.format( - cmd, node['host'], stdout, stderr)) - - def _install_vpp_pkg_centos(self, node, pkg): - """ - Install the VPP packages - - :param node: Node dictionary - :param pkg: The vpp packages - :type node: dict - :type pkg: string - """ - - cmd = 'yum -y install {}'.format(pkg) - (ret, stdout, stderr) = self.exec_command(cmd) - if ret != 0: - raise RuntimeError('{} failed on node {} {} {}'.format( - cmd, node['host'], stdout, stderr)) - def _install_vpp_ubuntu(self, node, branch, ubuntu_version='xenial'): """ Install the VPP packages @@ -136,7 +114,7 @@ class VPPUtil(object): self._autoconfig_backup_file(sfile) reps = 'deb [trusted=yes] https://packagecloud.io/fdio/' - reps += '{}/ubuntu {} main ./\n'.format(branch, ubuntu_version) + reps += '{}/ubuntu {} main\n'.format(branch, ubuntu_version) with open(sfile, 'w') as sfd: sfd.write(reps) @@ -163,13 +141,16 @@ class VPPUtil(object): node['host'], stderr)) - self._install_vpp_pkg_ubuntu(node, 'vpp-lib') - self._install_vpp_pkg_ubuntu(node, 'vpp') - self._install_vpp_pkg_ubuntu(node, 'vpp-plugins') - self._install_vpp_pkg_ubuntu(node, 'vpp-api-python') - self._install_vpp_pkg_ubuntu(node, 'vpp-api-lua') - self._install_vpp_pkg_ubuntu(node, 'vpp-dev') - self._install_vpp_pkg_ubuntu(node, 'vpp-dbg') + # Get the package list + pkgstr = '' + for ps in ubuntu_pkgs[branch]: + pkgstr += ps + ' ' + + cmd = 'apt-get -y install {}'.format(pkgstr) + (ret, stdout, stderr) = self.exec_command(cmd) + if ret != 0: + raise RuntimeError('{} failed on node {} {} {}'.format( + cmd, node['host'], stdout, stderr)) def _install_vpp_centos(self, node, branch): """ @@ -261,15 +242,16 @@ class VPPUtil(object): node['host'], stderr)) - # Install the packages - self._install_vpp_pkg_centos(node, 'vpp-selinux-policy') - self._install_vpp_pkg_centos(node, 'vpp-lib') - self._install_vpp_pkg_centos(node, 'vpp') - self._install_vpp_pkg_centos(node, 'vpp-plugins') - self._install_vpp_pkg_centos(node, 'vpp-api-python') - self._install_vpp_pkg_centos(node, 'vpp-api-lua') - self._install_vpp_pkg_centos(node, 'vpp-devel') - self._install_vpp_pkg_centos(node, 'vpp-debuginfo') + # Get the package list + pkgstr = '' + for ps in centos_pkgs[branch]: + pkgstr += ps + ' ' + + cmd = 'yum -y install {}'.format(pkgstr) + (ret, stdout, stderr) = self.exec_command(cmd) + if ret != 0: + raise RuntimeError('{} failed on node {} {} {}'.format( + cmd, node['host'], stdout, stderr)) def install_vpp(self, node, branch): """ @@ -294,89 +276,47 @@ class VPPUtil(object): self._install_vpp_centos(node, branch) return - def _uninstall_vpp_pkg_ubuntu(self, node, pkg): + def _uninstall_vpp_ubuntu(self, node): """ Uninstall the VPP packages - :param node: Node dictionary - :param pkg: The vpp packages + :param node: Node dictionary with cpuinfo. :type node: dict - :type pkg: string """ - cmd = 'dpkg --purge {}'.format(pkg) - (ret, stdout, stderr) = self.exec_command(cmd) - if ret != 0: - raise RuntimeError('{} failed on node {} {} {}'.format( - cmd, node['host'], stdout, stderr)) - def _uninstall_vpp_pkg_centos(self, node, pkg): - """ - Uninstall the VPP packages + # get the package list + pkgstr = '' + pkgs = self.get_installed_vpp_pkgs() + for pkg in pkgs: + pkgname = pkg['name'] + pkgstr += pkgname + ' ' - :param node: Node dictionary - :param pkg: The vpp packages - :type node: dict - :type pkg: string - """ - cmd = 'yum -y remove {}'.format(pkg) + cmd = 'dpkg --purge {}'.format(pkgstr) (ret, stdout, stderr) = self.exec_command(cmd) if ret != 0: raise RuntimeError('{} failed on node {} {} {}'.format( cmd, node['host'], stdout, stderr)) - def _uninstall_vpp_ubuntu(self, node): - """ - Uninstall the VPP packages - - :param node: Node dictionary with cpuinfo. - :type node: dict - """ - pkgs = self.get_installed_vpp_pkgs() - - if len(pkgs) > 0: - if 'version' in pkgs[0]: - logging.info("Uninstall Ubuntu Packages") - self._uninstall_vpp_pkg_ubuntu(node, 'vpp-dbg') - self._uninstall_vpp_pkg_ubuntu(node, 'vpp-dev') - self._uninstall_vpp_pkg_ubuntu(node, 'vpp-api-python') - self._uninstall_vpp_pkg_ubuntu(node, 'vpp-api-lua') - self._uninstall_vpp_pkg_ubuntu(node, 'vpp-plugins') - self._uninstall_vpp_pkg_ubuntu(node, 'vpp') - self._uninstall_vpp_pkg_ubuntu(node, 'vpp-lib') - else: - logging.info("Uninstall locally installed Ubuntu Packages") - for pkg in pkgs: - self._uninstall_vpp_pkg_ubuntu(node, pkg['name']) - else: - logging.error("There are no Ubuntu packages installed") - def _uninstall_vpp_centos(self, node): """ Uninstall the VPP packages :param node: Node dictionary with cpuinfo. :type node: dict - """ + """ + pkgstr = '' pkgs = self.get_installed_vpp_pkgs() + for pkg in pkgs: + pkgname = pkg['name'] + pkgstr += pkgname + ' ' - if len(pkgs) > 0: - if 'version' in pkgs[0]: - logging.info("Uninstall CentOS Packages") - self._install_vpp_pkg_centos(node, 'vpp-debuginfo') - self._uninstall_vpp_pkg_centos(node, 'vpp-devel') - self._uninstall_vpp_pkg_centos(node, 'vpp-api-python') - self._uninstall_vpp_pkg_centos(node, 'vpp-api-lua') - self._uninstall_vpp_pkg_centos(node, 'vpp-plugins') - self._uninstall_vpp_pkg_centos(node, 'vpp') - self._uninstall_vpp_pkg_centos(node, 'vpp-lib') - self._uninstall_vpp_pkg_centos(node, 'vpp-selinux-policy') - else: - logging.info("Uninstall locally installed CentOS Packages") - for pkg in pkgs: - self._uninstall_vpp_pkg_centos(node, pkg['name']) - else: - logging.error("There are no CentOS packages installed") + logging.info("Uninstalling {}".format(pkgstr)) + cmd = 'yum -y remove {}'.format(pkgstr) + (ret, stdout, stderr) = self.exec_command(cmd) + if ret != 0: + raise RuntimeError('{} failed on node {} {} {}'.format( + cmd, node['host'], stdout, stderr)) def uninstall_vpp(self, node): """ @@ -388,7 +328,6 @@ class VPPUtil(object): # First stop VPP self.stop(node) - distro = self.get_linux_distro() if distro[0] == 'Ubuntu': logging.info("Uninstall Ubuntu") @@ -442,7 +381,7 @@ class VPPUtil(object): vmdict = {} - print ("Need to implement get vms") + print("Need to implement get vms") return vmdict @@ -535,6 +474,7 @@ class VPPUtil(object): interfaces[name]['carrier'] = spl[1] # Socket + spl = '' rfall = re.findall(r'numa \d+', line) if rfall: spl = rfall[0].split() @@ -557,13 +497,11 @@ class VPPUtil(object): return interfaces - def _get_installed_vpp_pkgs_ubuntu(self, distro): + def _get_installed_vpp_pkgs_ubuntu(self): """ Get the VPP hardware information and return it in a dictionary - :param distro: The linux distro - :type distro: dict :returns: List of the packages installed :rtype: list """ @@ -625,7 +563,7 @@ class VPPUtil(object): distro = self.get_linux_distro() if distro[0] == 'Ubuntu': - pkgs = self._get_installed_vpp_pkgs_ubuntu(distro) + pkgs = self._get_installed_vpp_pkgs_ubuntu() elif distro[0] == 'CentOS Linux': pkgs = self._get_installed_vpp_pkgs_centos() else: @@ -826,7 +764,7 @@ class VPPUtil(object): bridges = [] for line in lines: if line == 'no bridge-domains in use': - print (line) + print(line) return ifaces if len(line) == 0: continue @@ -850,5 +788,5 @@ class VPPUtil(object): ifcidx = {'name': iface[0], 'index': line.split()[1]} ifaces.append(ifcidx) - print (stdout) + print(stdout) return ifaces |