Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

This section describes setting up A-Stack on Cisco IoX IRGW829


Useful IOX Documentation Links

  1. https://communities.cisco.com/docs/DOC-60826
  2. http://www.cisco.com/c/en/us/td/docs/routers/access/800/829/software/configuration/guide/IR800config/guest-os.pdf
  3. https://communities.cisco.com/thread/79906?start=0&tstart=0

Hardware and Network Setup

Setting up the brand new router the starting point is:

https://communities.cisco.com/docs/DOC-60826

Access Router via Console

  1. Take a mini USB Cable and connect one end of the mini USB cable  to console port of the router and other end of the cable to your MAC/PC USB port.
  2. The chipset CP210x from Silicon Labs requires special drivers before you can connect.

    1. Download the driver here and install it
    2. Check your devices,you will see two new ones (SLAB...)

      sebastiankoch@~$ls -lah /dev/cu.*
      crw-rw-rw-1root  wheel   17,   9May 1815:03/dev/cu.SLAB_USBtoUART
      crw-rw-rw-1root  wheel   17,  11May 1815:09/dev/cu.SLAB_USBtoUART5
      ...

    3. Now you can directly connect to the console through /dev/cu.SLAB_USBtoUART5

      sebastiankoch@~$screen /dev/cu.SLAB_USBtoUART5

    4. The connection can be closed by CTRL + A, K

Boot the device from rommon-2 to the IOS:

To boot from rommon-2 prompt to the router IOS, an IOx image is required.

 In rommon-2 mode, boot it up using the IOx image. The IOx image starts the boot sequence and once completed, the device should come up from rommon-2 to the router IOS.

rommon-2> boot flash:ir800-universalk9-mz.SPA.156-3.M

Press RETURN to get started!

IR800>

 The IOx image is booted up successfully from rommon 2 to the IOS.

IR800>en

IR800#show version | i image

System image file is "flash:ir800-universalk9-mz.SPA.156-3.M"

Complete the IOS Configuration 

Follow this template configuration.

Complete IOS Configuration
!
! Last configuration change at 19:49:29 UTC Wed Jan 18 2017
!
version 15.6
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service internal
service unsupported-transceiver
!
hostname IR800
!
boot-start-marker
boot system flash:/ir800-universalk9-mz.SPA.156-1.T1
boot-end-marker
!
!
no logging console
enable secret 5 $1$Ntmx$CBEK7WPOOw8/0.xdtxYV7/
!
no aaa new-model
ethernet lmi ce
service-module wlan-ap 0 bootimage autonomous
!
ignition off-timer 20
ip dhcp excluded-address 192.168.1.1 192.168.1.5
ip dhcp pool gospool
 network 192.168.1.0 255.255.255.0

 default-router 192.168.1.1 
 dns-server 8.8.8.8 
 domain-name tqlioxapps.com
 option 42 ip 128.138.140.44 
ip domain lookup source-interface Vlan999
ip domain name atomiton.com
ip name-server 10.0.1.1
ip inspect WAAS flush-timeout 10
ip dhcp-client update dns
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
chat-script lte "" "AT!CALL" TIMEOUT 20 "OK"
license udi pid IR829GW-LTE-VZ-AK9 sn FTX1941805R
iox hypervisor sched-policy 90
username tql privilege 15 password 0 tql123
redundancy
 notification-timer 120000
controller Cellular 0
 lte sim max-retry 0
 lte failovertimer 0
 lte gps mode standalone
 lte gps nmea ip
 lte modem link-recovery rssi onset-threshold -110
 lte modem link-recovery monitor-timer 20
 lte modem link-recovery wait-timer 10
 lte modem link-recovery debounce-count 6
interface GigabitEthernet0
 no ip address
 shutdown
interface wlan-ap0
 no ip address
 arp timeout 0
 no mop enabled
 no mop sysid
interface GigabitEthernet1
 no ip address
interface GigabitEthernet2
 no ip address
interface GigabitEthernet3
 no ip address
interface GigabitEthernet4
 switchport access vlan 999
 no ip address
interface Wlan-GigabitEthernet0
 no ip address
interface GigabitEthernet5
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 duplex auto
 speed auto
 ipv6 address autoconfig
 ipv6 enable
!
interface Cellular0
 ip address negotiated
 ip nat outside
 ip virtual-reassembly in
encapsulation slip
 dialer in-band
 dialer idle-timeout 0
 dialer string lte
 dialer watch-group 1
 dialer-group 1
 async mode interactive
 routing dynamic
interface Vlan1
 no ip address
!
interface Vlan999
 ip dhcp relay information check-reply 
 no ip dhcp client request tftp-server-address
 ip dhcp client lease 365 0 0
 ip address 10.0.1.70 255.255.255.0
 ip nat outside
 ip virtual-reassembly in
!
interface Async0
 no ip address
 encapsulation scada
!
interface Async1
 no ip address
 encapsulation scada
ip default-gateway 10.0.1.1
ip forward-protocol nd
no ip http server
no ip http secure-server
ip nat inside source list NAT_ACL interface Vlan999 overload
ip nat inside source static tcp 192.168.1.6 8443 interface Vlan999 8443
ip nat inside source static tcp 192.168.1.6 22 interface Vlan999 2222
ip nat inside source static tcp 192.168.1.8 8080 interface Vlan999 8080
ip nat inside source static 192.168.1.6 10.0.1.71
ip nat inside source static 192.168.1.8 10.0.1.72
ip access-list standard NAT_ACL
 permit 192.168.0.0 0.0.255.255
control-plane
line con 0
 stopbits 1
line 1 2
 stopbits 1
line 3
 script dialer lte
 no exec
 transport preferred lat pad telnet rlogin lapb-ta mop udptn v120 ssh
 transport output lat pad telnet rlogin lapb-ta mop udptn v120 ssh
line 4
 no activation-character
 no exec
 transport preferred none
 transport input all
 transport output lat pad telnet rlogin lapb-ta mop udptn v120 ssh
line 7
 modem InOut
 no exec
 transport input all
 transport output all
line 1/3
 transport preferred none
 transport output none
 stopbits 1
line 1/4
 transport preferred none
 transport input all
 transport output none
 stopbits 1
line 1/5 1/6
 transport preferred none
 transport output none
 stopbits 1
line vty 0 4
 password tql123
 login
 transport input telnet
no scheduler max-task-time
ntp master
end

Upgrade to Latest IOX Image 

  1. Download this image to your local computer.
    1. http://sandbox.atomiton.com:8080/fid-downloads/res/downloads/ir800-universalk9-bundle.SPA.156-3.M2.bin
  2. Copy the image to router's flash using scp. [copy scp://baseerkhan@10.0.1.100//Users/baseerkhan/Downloads/ir800-universalk9-bundle.SPA.156-3.M2.bin flash:]
  3. bundle install flash:ir800-universalk9-bundle.SPA.156-3.M2.bin

ioxclient Tool

What is ioxclient?

"ioxclient" is a command line tool provided as part of Cisco IOx SDK. This utility is primarily meant for assisting application development for Cisco's IOx platforms. It aims to increase developer productivity by providing easy to use CLI to perform most common operations such as :

  • App life cycle management [install, activate, deactivate, uninstall, start, stop, upgrade etc.,]
  • Application troubleshooting [view and manage application logs]
  • Life cycle management and troubleshooting for IOx services
  • Cartridge management [install, uninstall, view info, upgrade etc.,]
  • Platform management [view platform information, health, platform logs, techsupport snapshots, network information etc.,]
  • Provides a notion of profiles that captures connection information to an IOx device and switch between multiple profiles.

For Mac Users: http://sandbox.atomiton.com:8080/fid-downloads/res/downloads/ioxclient-mac.zip can be used.

Detail Documentation of the "ioxclient" tool can be found here:

https://developer.cisco.com/media/iox-dev-guide-3-10-16/ioxclient/ioxclient-reference/

Build Package Archive

Main purpose of ioxclient is to build the package archive. From the directory where all the contents are placed execute the command: 

 ioxclient package .

This will produce package.tar file that can be uploaded to the IOXContainer.

A-Stack Package - PaaS Style

PreRequisites

  • Make sure Network setup is done.
  • Download IoXClient Application for your platform (Mac or Window)
  • Current version of A-Stack
  • HelloTQL Models
  • JDK 1.8 Cartridge is installed.


Creating Package

The first step in creating a package for deploying to IoX is creating a package.yaml file. Below is the package.yaml file for A-Stack. Key things to capture are:

a) Selecting the app profile

b) Runtime and its version

b) Runtime options

Package.yaml file
descriptor-schema-version: "2.0"
info:
  name: Atomiton A-Stack
  description: "IOx Atomiton A-Stack Thing Computing Runtime"
  version: "1.0"
  author-link: "http://www.atomiton.com"
  author-name: "Atomiton Inc"
app:
  # Indicate app type (vm, paas, lxc etc.,)
  type: paas
  resources:
      profile: c1.large
      network:
        -
          interface-name: eth0
          ports:
            tcp:
            - 8080
  startup: 
    runtime: java-se-embedded-cp3
    runtime-version: 1.8
    runtime-options: 
      classpath: $CAF_APP_PATH/
      java-options: -jar $CAF_APP_PATH/atomiton.tqlengine.jar
    target: 
      x.jar
  • No labels