Difference between revisions of "Yuma Installation Guide"

From Yuma123 Wiki
Jump to navigationJump to search
 
(10 intermediate revisions by the same user not shown)
Line 8: Line 8:
   
   
<center>Version yuma123-2.10 (unreleased)</center>
+
<center>Version yuma123-2.11</center>
   
   
Line 15: Line 15:
 
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.
 
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.
   
Copyright 2013 – 2017, Vladimir Vassilev, All Rights Reserved.
+
Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.
   
 
== Additional Resources ==
 
== Additional Resources ==
Line 61: Line 61:
 
* '''Transpacket'''
 
* '''Transpacket'''
 
** [http://www.transpacket.com/ http://www.transpacket.com]
 
** [http://www.transpacket.com/ http://www.transpacket.com]
** Offers Linux based embedded operating system distribution which uses Yuma for configuration and monitoring.
+
** Uses Yuma for configuration and monitoring of its products.
** Offers support, training, and consulting for YANG and netconf.
 
   
 
=== Mailing Lists ===
 
=== Mailing Lists ===
Line 126: Line 125:
 
The build scripts are tested on the following platforms:
 
The build scripts are tested on the following platforms:
   
* Debian 8.0 "jessie" (32 bit x86 and 64-bit AMD)
+
* Debian "stable"
* Ubuntu 12.04.5 LTS (Precise Pangolin) (32 bit x86 and 64-bit AMD)
 
   
 
== External Packages ==
 
== External Packages ==
Line 135: Line 133:
 
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.
 
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.
   
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Ubuntu systems.
+
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Debian systems.
   
 
=== libssh2 ===
 
=== libssh2 ===
 
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.
 
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.
   
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Ubuntu systems.
+
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Debian systems.
   
 
=== ncurses ===
 
=== ncurses ===
Line 147: Line 145:
 
It is called '''libncurses5''' on Ubuntu systems.
 
It is called '''libncurses5''' on Ubuntu systems.
   
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Ubuntu systems.
+
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Debian systems.
   
 
=== zlib ===
 
=== zlib ===
 
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.
 
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.
   
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Ubuntu systems.
+
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Debian systems.
  +
  +
=== libreadline ===
  +
The '''libreadline''' library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.
  +
  +
To build yuma sources, also install the developer version of this package. It is called '''libreadline-dev '''on Debian systems.
   
 
= Getting the source =
 
= Getting the source =
Line 263: Line 266:
 
 
 
mydir> sudo /etc/rc.d/init.d/sshd restart
 
mydir> sudo /etc/rc.d/init.d/sshd restart
  +
  +
==== Starting multiple netconfd instances ====
  +
You can start multiple instances by specifying different --port/--ncxserver-sockname/--startup parameter tuples:
  +
<nowiki>
  +
for port in 10831 10832 10833
  +
do
  +
cd /root/${port}
  +
rm -f ncxserver.sock
  +
netconfd --startup=startup-cfg.xml --ncxserver-sockname=/tmp/ncxserver-${port}.sock --port=${port} 1>netconfd.log 2>netconfd.stderr.log &
  +
done
  +
</nowiki>
  +
  +
You can either start dedicated sshd instance for each netconfd instance or you can use single sshd with the following configuration in /etc/ssh/sshd_config:
  +
<nowiki>
  +
...
  +
Port 10831
  +
Port 10832
  +
Port 10833
  +
Subsystem netconf "/usr/sbin/netconf-subsystem --ncxserver-sockname=10831@/tmp/ncxserver-10831.sock --ncxserver-sockname=10832@/tmp/ncxserver-10832.sock --ncxserver-sockname=10833@/tmp/ncxserver-10833.sock"
  +
</nowiki>

Latest revision as of 19:19, 19 May 2022

Yuma Installation Guide


YANG-Based Unified Modular Automation Tools


YUMA Package Installation


Version yuma123-2.11


Preface

Legal Statements

Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.

Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.

Additional Resources

Other documentation includes:

Yuma Quickstart Guide

Yuma User Manual

Yuma netconfd Manual

Yuma yangcli Manual

Yuma Developer Manual

There are several sources of free information and tools for use with YANG and/or NETCONF.

The following section lists the resources available at this time.

WEB Sites

Mailing Lists

Conventions Used in this Document

The following formatting conventions are used throughout this document:

Convention Description
--foo CLI parameter foo
<foo> XML parameter foo
foo yangcli command or parameter
$FOO Environment variable FOO
$$foo yangcli global variable foo
some text
Example command or PDU
some text Plain text

Introduction

Yuma-tools.png

Refer to section 3 of the Yuma User Manual for a complete introduction to Yuma.

This section focuses on the client and server tools within the Yuma programs.

Intended Audience

This document is intended for users of the Yuma NETCONF client and server programs. It covers the installation of the Yuma packages.

Installation Requirements

The following requirements must be met for Yuma to be installed.

Supported Platforms

There are no binary packages distributed at this time. Binaries can be compiled from source and installed using Autotools/Automake or built as Debian package from source using the Debian package management tools. The build scripts are tested on the following platforms:

  • Debian "stable"

External Packages

The following programs and libraries need to be available for Yuma to work.

libxml2

The libxml2 package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.

To build yuma sources, also install the developer version of this package. It is called libxml2-dev on Debian systems.

libssh2

The libssh2 package is needed by the yuma package for the yangcli program to connect to NETCONF servers using the SSH protocol. This package is called libssh2-1 on Ubuntu platforms. This package is not installed by the default Linux installation process.

To build yuma sources, also install the developer version of this package. It is called libssh2-1-dev on Debian systems.

ncurses

The ncurses library is needed by the yuma package for some terminal support. This package is installed by the default Linux installation process.

It is called libncurses5 on Ubuntu systems.

To build yuma sources, also install the developer version of this package. It is called libncurses5-dev on Debian systems.

zlib

The zlib library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.

To build yuma sources, also install the developer version of this package. It is called libz-dev on Debian systems.

libreadline

The libreadline library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.

To build yuma sources, also install the developer version of this package. It is called libreadline-dev on Debian systems.

Getting the source

~> git clone git://git.code.sf.net/p/yuma123/git yuma123
~> cd yuma123

Building and Installation

You can either use the Debian/Ubuntu package management tools or directly the Autotools build scripts if the platform you have is not Debian based or you need more flexibility.

Alternative 1: Debian/Ubuntu *.deb package build and installation steps

Check if you have any unmet dependencies:

yuma123> dpkg-checkbuilddeps
dpkg-checkbuilddeps: Unmet build dependencies: libssh2-1-dev libxml2-dev 

Install the missing packages:

yuma123> sudo apt-get install libssh2-1-dev libxml2-dev

Build the *.deb:

yuma123> dpkg-buildpackage -rfakeroot -uc -b

The generated *.deb package e.g. ../yuma123_2.5-1_i386.deb can be installed:

yuma123> sudo dpkg -i ../yuma123_2.5-1_i386.deb

Alternative 2: Autotools build and installation steps

Assuming you have no unresolved dependencies:

yuma123> autoreconf -i -f
yuma123> ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr
yuma123> make
yuma123> sudo make install

Installed Files

  • /usr/bin directory contains the following programs:
    • yangcli
    • yangrpc-example
  • /usr/sbin directory contains the following server programs:
    • netconfd
    • netconf-subsystem
  • /usr/lib directory contains the following files:
    • libyumancx.so
    • libyumaagt.so
    • libyumamgr.so
    • libyangrpc.so
  • /usr/lib/yuma directory contains the following file:
    • libhelloworld.so
    • libtoaster.so
  • /usr/share/yuma/modules directory contains all the YANG modules:
    • yang/
    • ietf/
    • netconfcentral/
    • ietf-draft/
    • helloworld.yang
  • /usr/share/doc/yuma123 directory (*.deb only) containing the following files:
    • copyright
    • changelog.Debian.gz
  • /usr/include/yuma directory contains H files needed to compile SIL code so it can be loaded into the server at runtime:
    • ncx/*.h
    • agt/*.h
    • platform/*.h
    • yangrpc/*.h

Next Steps

More Documentation

Yuma Quickstart Guide

Yuma User Manual

Yuma netconfd Manual

Yuma yangcli Manual

Yuma Developer Manual

Each program also has extensive help information available with the --help CLI parameter. For example:

  • yangcli --help
  • netconfd --help

Running the Yuma Programs

yangcli

If you are just using the Yuma client applications, then there is no further mandatory setup required.

  • If a work directory is used, then the $YUMA_HOME environment variable needs to be defined. Refer to the user manual for details.
  • If Yuma is installed in a location other than the default location described above, then the $YUMA_INSTALL environment variable needs to be defined. Refer to the user manual for details.
  • The following binary applications are available:
    • /usr/bin/yangcli: NETCONF-over-SSH client application

netconfd and netconf-subsystem

The Yuma server does not automatically start running when installed. This will be supported in a future release.

The following steps must be taken to start the netconfd server:

  • You must modify the /etc/ssh/sshd_config file, and add the 'netconf' subsystem, as described in the user manual.If the yuma package was installed in a non-default location, then the path to the netconf-subsystem will be different than the example below. The following commands must be present:
    Port 22
    Port 830
    Subsystem netconf /usr/sbin/netconf-subsystem
  • Start the netconfd server, as described in the Yuma User Manual or the Yuma Quickstart Guide. This can be in the foreground or the background. If it is in the background, then the '--log' CLI parameter should be provided, as shown below:


    mydir> /usr/sbin/netconfd --log=$HOME/mylog &
    


  • Restart the SSH server. This is a platform-specific task. Refer to the sshd manual page for your system for more details. This step may need to be run as root or with the 'sudo' program.


Debian/Ubuntu:

    mydir> sudo  /etc/init.d/ssh restart   

Fedora 12 version:

    mydir> sudo /etc/rc.d/init.d/sshd restart

Starting multiple netconfd instances

You can start multiple instances by specifying different --port/--ncxserver-sockname/--startup parameter tuples:

for port in 10831 10832 10833
do
    cd /root/${port}
    rm -f ncxserver.sock
    netconfd --startup=startup-cfg.xml --ncxserver-sockname=/tmp/ncxserver-${port}.sock --port=${port} 1>netconfd.log 2>netconfd.stderr.log &
done

You can either start dedicated sshd instance for each netconfd instance or you can use single sshd with the following configuration in /etc/ssh/sshd_config:

...
Port 10831
Port 10832
Port 10833
Subsystem netconf "/usr/sbin/netconf-subsystem --ncxserver-sockname=10831@/tmp/ncxserver-10831.sock --ncxserver-sockname=10832@/tmp/ncxserver-10832.sock --ncxserver-sockname=10833@/tmp/ncxserver-10833.sock"