SlideShare a Scribd company logo
1 of 12
Download to read offline
Mumbai Technology Meetup Feb-2020
UCI (Universal Configuration Interface)
for
IoT Device Management
Siji Sunny | AntsWireless
siji@melabs.in
Mumbai Technology Meetup Feb-2020
OVERVIEW

Challenges in Configuration Management

Proposed Approach- UCI/NetJson

UCI – Overview

NetJson Overview

Demo
Mumbai Technology Meetup Feb-2020
THE CASE OF NON-STANDARD
Nginx Conf Systemd Conf
Mumbai Technology Meetup Feb-2020
NEED OF STANDARDISATION

No need to write your own parser. That has been done already in many programming languages and can
easily be used. Also the parser probably is faster than a self-written one and is a bit more robust.

The formats have various extra features like comments, hierarchy, native representation of data types.
These might not seem to be required now, but it is good if the format has some complexity in reserve in
case it is needed.

Text editors also know about these formats and can provide syntax highlighting and indentation.

The configuration file can be parsed with different programs. The interpretation of the values of course
differs, but an analysis program can simply read the parameters of the simulation without being told.
Mumbai Technology Meetup Feb-2020
UCI -UNIFIED CONFIGURATION INTERFACE

A small utility written in C

Part Of OpenWrt -Linux Operating System for Light Weight Embedded devices

UCI - system to centralize the configuration of OpenWrt service

Central configuration is split into several files located in the /etc/config/ directory.

Supports various method of execution
– SSH
– CLI
– SMS
– JSON-PRC
Mumbai Technology Meetup Feb-2020
CONFIGURATION HIERARCHY
config: main configuration groups like network, system, firewall. Each
configuration group has it's own file in /etc/config
sections: a config is divided into sections. A section can either be named
or unnamed
types: a section can have a type. E.g, in the network config we typically
have sections of the type "interface"
options: each section has options that hold configuration values
values: value of an option
Mumbai Technology Meetup Feb-2020
SAMPLE CONFIG
# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.1.1'
Mumbai Technology Meetup Feb-2020
UCI COMMANDS
batch - Executes a multi-line UCI script which is typically wrapped into a
here document syntax
export [<config>] Exports the configuration in a machine readable format. It is used
internally to evaluate configuration files as shell scripts
import [<config>] Imports configuration files in UCI syntax
changes [<config>] Lists staged changes to the given configuration file or if none given,
all configuration files
commit [<config>] Writes changes of the given configuration file, or if none is given,
all configuration files, to the filesystem. All "uci set", "uci add", "uci
rename" and "uci delete" commands are staged into a temporary
location until they are written to flash with the "uci commit"
command. This is used exclusively for UCI commands and is not
needed after editing configuration files with a text editor
add <config> <section-type> Adds an anonymous section of type section-type to the given
configuration
add_list <config>.<section>.<option>=<string> Adds the given string to an existing list option
del_list <config>.<section>.<option>=<string> Removes the given string from an existing list option
Mumbai Technology Meetup Feb-2020
UCI COMMANDS
show [<config>[.<section>[.<option>]]] Shows the given option, section or configuration in compressed notation. If
no option is given, shows all configuration files
get <config>.<section>[.<option>] Gets the value of the given option or the type of the given section
set <config>.<section>[.<option>]=<value
>
Sets the value of the given option, or add a new section with the type set to
the given value
delete <config>[.<section>[[.<option>]
[=<id>]]]
Deletes the given section or option
rename <config>.<section>[.<option>]=<nam
e>
Renames the given option or section to the given name
revert <config>[.<section>[.<option>]] Reverts the given option, section or configuration file. Used to undo any
changes performed with UCI and not yet committed with uci commit
reorder <config>.<section>=<position> Moves the specified section to the given position. Used for easier
management purposes
Mumbai Technology Meetup Feb-2020
http://netjson.org/

Data Interchange format designed to describe the basic building blocks of layer2 and layer3
networks, but easy to expand to other configuration types too

Network configuration of devices

Monitoring data

Routing information

Network topology

Netjson definition - http://netjson.org/rfc.html
Mumbai Technology Meetup Feb-2020
NETJSONCONFIG -PYTHON TOOL

netjsonconfig is a python implementation of the NetJSON data interchange
format, more specifically the DeviceConfiguration object.

Supports terminal based attributes

Install
– pip install netjsonconfig

Create UCI rendered file -
– netjsonconfig --config sample.json --backend openwrt --method generate >
config.tar.gz
Mumbai Technology Meetup Feb-2020
Email : siji@melabs.in
Twitter : siji_sunny
Blog - https://www.cnx-software.com/
Phone : +91 8080125555
CONTACT

More Related Content

Similar to Universal Configuration Interface

How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkRapidValue
 
Whidbey old
Whidbey old Whidbey old
Whidbey old grenaud
 
Microsoft deployment toolkit 2010 final
Microsoft deployment toolkit 2010 finalMicrosoft deployment toolkit 2010 final
Microsoft deployment toolkit 2010 finalHarold Wong
 
Catia product enhancement_overview_v5_r21
Catia product enhancement_overview_v5_r21Catia product enhancement_overview_v5_r21
Catia product enhancement_overview_v5_r21Jimmy Chang
 
​Abinitio online training
​Abinitio online training​Abinitio online training
​Abinitio online trainingonlineitguru369
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
Implementing ASP.NET Role Based Security
Implementing ASP.NET Role Based SecurityImplementing ASP.NET Role Based Security
Implementing ASP.NET Role Based SecurityDean Willson
 
Autoconf&Automake
Autoconf&AutomakeAutoconf&Automake
Autoconf&Automakeniurui
 
Yii in action
Yii in actionYii in action
Yii in actionKeaNy Chu
 
Advanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerAdvanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerSencha
 
Building and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextBuilding and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextSvilen Sabev
 
Install, configure and customize TFS 2013
Install, configure and customize TFS 2013Install, configure and customize TFS 2013
Install, configure and customize TFS 2013Davide Benvegnù
 
Multi Configurations For Mtj
Multi Configurations For MtjMulti Configurations For Mtj
Multi Configurations For Mtjfeng.wang
 
Knockout.js components&routing
Knockout.js components&routingKnockout.js components&routing
Knockout.js components&routingCarlo Bernaschina
 
Biztalk Server 2010: Introdução
Biztalk Server 2010: IntroduçãoBiztalk Server 2010: Introdução
Biztalk Server 2010: IntroduçãoComunidade NetPonto
 
New Engineering Client for Agile PLM
New Engineering Client for Agile PLMNew Engineering Client for Agile PLM
New Engineering Client for Agile PLMZero Wait-State
 

Similar to Universal Configuration Interface (20)

How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
 
Microsoft deployment toolkit 2010 final
Microsoft deployment toolkit 2010 finalMicrosoft deployment toolkit 2010 final
Microsoft deployment toolkit 2010 final
 
Catia product enhancement_overview_v5_r21
Catia product enhancement_overview_v5_r21Catia product enhancement_overview_v5_r21
Catia product enhancement_overview_v5_r21
 
​Abinitio online training
​Abinitio online training​Abinitio online training
​Abinitio online training
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Implementing ASP.NET Role Based Security
Implementing ASP.NET Role Based SecurityImplementing ASP.NET Role Based Security
Implementing ASP.NET Role Based Security
 
Autoconf&Automake
Autoconf&AutomakeAutoconf&Automake
Autoconf&Automake
 
6. safe users-guide
6.  safe users-guide6.  safe users-guide
6. safe users-guide
 
Yii in action
Yii in actionYii in action
Yii in action
 
Readme
ReadmeReadme
Readme
 
Ab initio training Ab-initio Architecture
Ab initio training Ab-initio ArchitectureAb initio training Ab-initio Architecture
Ab initio training Ab-initio Architecture
 
Advanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerAdvanced Techniques for Ext Designer
Advanced Techniques for Ext Designer
 
T4 presentation
T4 presentationT4 presentation
T4 presentation
 
Building and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextBuilding and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and Context
 
Install, configure and customize TFS 2013
Install, configure and customize TFS 2013Install, configure and customize TFS 2013
Install, configure and customize TFS 2013
 
Multi Configurations For Mtj
Multi Configurations For MtjMulti Configurations For Mtj
Multi Configurations For Mtj
 
Knockout.js components&routing
Knockout.js components&routingKnockout.js components&routing
Knockout.js components&routing
 
Biztalk Server 2010: Introdução
Biztalk Server 2010: IntroduçãoBiztalk Server 2010: Introdução
Biztalk Server 2010: Introdução
 
New Engineering Client for Agile PLM
New Engineering Client for Agile PLMNew Engineering Client for Agile PLM
New Engineering Client for Agile PLM
 

More from Siji Sunny

Arduino programming
Arduino programmingArduino programming
Arduino programmingSiji Sunny
 
OpenSource IoT Middleware Frameworks
OpenSource IoT Middleware FrameworksOpenSource IoT Middleware Frameworks
OpenSource IoT Middleware FrameworksSiji Sunny
 
Vedic Sanskrit-on the way of Digitization
Vedic Sanskrit-on the way of DigitizationVedic Sanskrit-on the way of Digitization
Vedic Sanskrit-on the way of DigitizationSiji Sunny
 
Indian Language App.Development Framework for Android
Indian Language App.Development Framework for AndroidIndian Language App.Development Framework for Android
Indian Language App.Development Framework for AndroidSiji Sunny
 
A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)Siji Sunny
 
Unified Text Layout Engine for FOSS Systems -Paper
Unified Text Layout Engine for FOSS Systems -PaperUnified Text Layout Engine for FOSS Systems -Paper
Unified Text Layout Engine for FOSS Systems -PaperSiji Sunny
 
Unified Text Layout Engine for FOSS Systems
Unified Text Layout Engine for FOSS SystemsUnified Text Layout Engine for FOSS Systems
Unified Text Layout Engine for FOSS SystemsSiji Sunny
 
Android System Developement
Android System DevelopementAndroid System Developement
Android System DevelopementSiji Sunny
 
Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015Siji Sunny
 
OpenSource Hardware -Debian Way
OpenSource Hardware -Debian WayOpenSource Hardware -Debian Way
OpenSource Hardware -Debian WaySiji Sunny
 

More from Siji Sunny (11)

Arduino programming
Arduino programmingArduino programming
Arduino programming
 
OpenSource IoT Middleware Frameworks
OpenSource IoT Middleware FrameworksOpenSource IoT Middleware Frameworks
OpenSource IoT Middleware Frameworks
 
Vedic Sanskrit-on the way of Digitization
Vedic Sanskrit-on the way of DigitizationVedic Sanskrit-on the way of Digitization
Vedic Sanskrit-on the way of Digitization
 
Indian Language App.Development Framework for Android
Indian Language App.Development Framework for AndroidIndian Language App.Development Framework for Android
Indian Language App.Development Framework for Android
 
A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)
 
Unified Text Layout Engine for FOSS Systems -Paper
Unified Text Layout Engine for FOSS Systems -PaperUnified Text Layout Engine for FOSS Systems -Paper
Unified Text Layout Engine for FOSS Systems -Paper
 
Unified Text Layout Engine for FOSS Systems
Unified Text Layout Engine for FOSS SystemsUnified Text Layout Engine for FOSS Systems
Unified Text Layout Engine for FOSS Systems
 
Android System Developement
Android System DevelopementAndroid System Developement
Android System Developement
 
Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
OpenSource Hardware -Debian Way
OpenSource Hardware -Debian WayOpenSource Hardware -Debian Way
OpenSource Hardware -Debian Way
 

Recently uploaded

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

Universal Configuration Interface

  • 1. Mumbai Technology Meetup Feb-2020 UCI (Universal Configuration Interface) for IoT Device Management Siji Sunny | AntsWireless siji@melabs.in
  • 2. Mumbai Technology Meetup Feb-2020 OVERVIEW  Challenges in Configuration Management  Proposed Approach- UCI/NetJson  UCI – Overview  NetJson Overview  Demo
  • 3. Mumbai Technology Meetup Feb-2020 THE CASE OF NON-STANDARD Nginx Conf Systemd Conf
  • 4. Mumbai Technology Meetup Feb-2020 NEED OF STANDARDISATION  No need to write your own parser. That has been done already in many programming languages and can easily be used. Also the parser probably is faster than a self-written one and is a bit more robust.  The formats have various extra features like comments, hierarchy, native representation of data types. These might not seem to be required now, but it is good if the format has some complexity in reserve in case it is needed.  Text editors also know about these formats and can provide syntax highlighting and indentation.  The configuration file can be parsed with different programs. The interpretation of the values of course differs, but an analysis program can simply read the parameters of the simulation without being told.
  • 5. Mumbai Technology Meetup Feb-2020 UCI -UNIFIED CONFIGURATION INTERFACE  A small utility written in C  Part Of OpenWrt -Linux Operating System for Light Weight Embedded devices  UCI - system to centralize the configuration of OpenWrt service  Central configuration is split into several files located in the /etc/config/ directory.  Supports various method of execution – SSH – CLI – SMS – JSON-PRC
  • 6. Mumbai Technology Meetup Feb-2020 CONFIGURATION HIERARCHY config: main configuration groups like network, system, firewall. Each configuration group has it's own file in /etc/config sections: a config is divided into sections. A section can either be named or unnamed types: a section can have a type. E.g, in the network config we typically have sections of the type "interface" options: each section has options that hold configuration values values: value of an option
  • 7. Mumbai Technology Meetup Feb-2020 SAMPLE CONFIG # cat /etc/config/network config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option ifname 'eth0.1' option proto 'static' option netmask '255.255.255.0' option ip6assign '60' option ipaddr '192.168.1.1'
  • 8. Mumbai Technology Meetup Feb-2020 UCI COMMANDS batch - Executes a multi-line UCI script which is typically wrapped into a here document syntax export [<config>] Exports the configuration in a machine readable format. It is used internally to evaluate configuration files as shell scripts import [<config>] Imports configuration files in UCI syntax changes [<config>] Lists staged changes to the given configuration file or if none given, all configuration files commit [<config>] Writes changes of the given configuration file, or if none is given, all configuration files, to the filesystem. All "uci set", "uci add", "uci rename" and "uci delete" commands are staged into a temporary location until they are written to flash with the "uci commit" command. This is used exclusively for UCI commands and is not needed after editing configuration files with a text editor add <config> <section-type> Adds an anonymous section of type section-type to the given configuration add_list <config>.<section>.<option>=<string> Adds the given string to an existing list option del_list <config>.<section>.<option>=<string> Removes the given string from an existing list option
  • 9. Mumbai Technology Meetup Feb-2020 UCI COMMANDS show [<config>[.<section>[.<option>]]] Shows the given option, section or configuration in compressed notation. If no option is given, shows all configuration files get <config>.<section>[.<option>] Gets the value of the given option or the type of the given section set <config>.<section>[.<option>]=<value > Sets the value of the given option, or add a new section with the type set to the given value delete <config>[.<section>[[.<option>] [=<id>]]] Deletes the given section or option rename <config>.<section>[.<option>]=<nam e> Renames the given option or section to the given name revert <config>[.<section>[.<option>]] Reverts the given option, section or configuration file. Used to undo any changes performed with UCI and not yet committed with uci commit reorder <config>.<section>=<position> Moves the specified section to the given position. Used for easier management purposes
  • 10. Mumbai Technology Meetup Feb-2020 http://netjson.org/  Data Interchange format designed to describe the basic building blocks of layer2 and layer3 networks, but easy to expand to other configuration types too  Network configuration of devices  Monitoring data  Routing information  Network topology  Netjson definition - http://netjson.org/rfc.html
  • 11. Mumbai Technology Meetup Feb-2020 NETJSONCONFIG -PYTHON TOOL  netjsonconfig is a python implementation of the NetJSON data interchange format, more specifically the DeviceConfiguration object.  Supports terminal based attributes  Install – pip install netjsonconfig  Create UCI rendered file - – netjsonconfig --config sample.json --backend openwrt --method generate > config.tar.gz
  • 12. Mumbai Technology Meetup Feb-2020 Email : siji@melabs.in Twitter : siji_sunny Blog - https://www.cnx-software.com/ Phone : +91 8080125555 CONTACT