- Introduction to IOx
- IOx Edge Compute Devices
- IC3000-series
- IR 800-series
- IR 1100 Series
- IE 4000-series
- IE3x00 Series
- IE93xx Series
- CGR 1000 Compute Module
- ISR 800-series
- Catalyst 9000-series
- ISR 4000/ASR 1000-series
- Comparison of IOx Devices
- IOx Resource Downloads
- IOx Local Manager
- IOx Development Tools
- ioxclient Reference
- What is ioxclient?
- Profiles
- App management
- App file management
- App console
- Service management
- Platform management
- Getting CAF Metrics
- Manage devices
- Managing logical networks
- Manage platform log files
- Manage package signature validation
- Debuggability and Diagnostics
- Platform Certificates
- Smart License Management
- Cartridge management
- Messaging service
- Docker commands
- Docker Layers
- Docker Toolchain Setup
- ioxclient Reference
- IOx App Tutorials
- Docker Applications
- Overview
- Tutorial: Deploy Dockerhub Image
- Tutorial: Create Custom Package Descriptor for Docker Apps
- Tutorial: Build Sample Docker Type IOx app Using Docker Toolchain
- Tutorial: Build Sample Docker Type Python Simple App
- Tutorial: Build Sample Docker Type C Based Simple App
- Tutorial: Build Sample Docker Type Python with C App
- Tutorial:Build Sample Docker Type C++ Based Simple App
- Tutorial: Build Sample Docker Type nodejs Based HTTP Server Using Alpine Base Image
- Tutorial: Build Sample Docker Type IOx App That Consumes GPS Service
- VM Applications
- Legacy Styles
- Docker Applications
- IOx App Concepts
- Advanced Features
- Application Groups
- Remote Docker workflow
- OVA to IOx VM App Package Deployment
- Debuggability and Diagnostics
- USB Storage and Serial Device
- IOx Services
- Key Value Datastore
- Cisco Local Manager Based App Console Access
- Fog Director API Documentation
- IOx Smart Licensing
- Access GPS data from an IOx App via serial interface on IR1101
- Troubleshooting Guide
- Developer Resources
- Community and Support
Docker Commands
On select platforms, developers will be able to utilize well known docker tools to easily create applications for IOx platforms. ioxclient
provides convenient wrapper CLIs to aid in this process.
**To use the below commands, A machine (remote or local) with the Docker daemon installed is required. ioxclient uses client libraries to make a connection to the daemon. These connection settings can be configured using init command at any time. By default, the settings will automatically be configured to use this local machine as the target. It is recommended that the target machine have a minimum Docker version of 1.10 (API 1.22).
Copy$ ioxclient docker
NAME:
ioxclient docker - Commands for using docker tools for IOx app development
USAGE:
ioxclient docker command [command options] [arguments...]
COMMANDS:
package, pkg Package an existing docker image as an IOx application
init, in Initialize configuration for internal Docker client
sign, s Sign a docker image to deploy it as a signed IOx application at a later point of time
descriptor, desc Generate specific schema version package descriptor yaml file
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help
--generate-bash-completion
Configure internal Docker client settings using the Init command
By default, ioxclient will set to connect locally via Unix socket to the Docker daemon upon using any Docker related commands. If the target Docker server is not your local machine, the client settings can be changed to point to the correct server. The API version can also be adjusted to match the server to ensure compatibility.
NOTE: At this time, ioxclient only supports http connections without authentication (in addition to local Unix sockets).
Copy$ ioxclient docker init
Enter the URI for the Docker daemon to use[unix:///var/run/docker.sock]: http://sample.cisco.com:2376
Enter the API version that the target daemon is running[v1.22]: 1.24
Saving current configuration
Packaging an existing docker image as IOx application
With docker workflow support, you can use any existing docker image (public/private) and convert it to an IOx compatible image.
NOTE: The size of the iox application package may be huge depending on the docker image that you are using. If the size exceeds the available resources on your target platform, you may not be able to install the application.
CAVEAT: When "ioxclient docker package" command is used to package lxc type app, ioxclient requires linux development environment. MAC/WINDOWS are not supported yet.
Copy$ ioxclient docker package
Insufficient Args.
NAME:
package - Package an existing docker image as an IOx application
USAGE:
command package [command options] <docker_image> <project_dir>
DESCRIPTION:
Usage: ioxclient docker package <image_name> <project_dir>
image_name
-> is a valid docker image name.
project_dir
-> should be a directory location that has the required IOx files.
At a minimum, must have package.yaml file. Can also contain other
files such as package_config.ini etc.,
Example: docker package cisco/alpine:3.3 .
image_name is cisco/alpine:3.3
project_dir is "." signifying current directory
To generate layers from a docker image:
ioxclient docker package --layers <image_name> <project_dir>
To generate layers from an IOx package:
ioxclient docker package --layers <iox_package> <project_dir>
OPTIONS:
--package-type, -p Use this option to specify the rootfs type: ext2 or ufs.
--auto, -a Use this flag to build IOx package according to labels in the docker image. This option has lower precedence over package-type option
--use-targz Use this to use gz compression on package
--skip-schema-validation Use this flag to skip package descriptor schema validation
--descriptor-merge, -m enable addition/override of information from docker inspect to package.yaml
--labels, -l Pass label(s) to be translated into IOx application descriptor fields.
--headroom, -r '0' For LXC type apps, specify the headroom (in MB) that needs to be created in the rootfs. Default is 5MB or 20 percent of rootfs size, whichever is greater
--layers, -s Use this flag to package docker image as IOx compatible layers
--rsa-key, -k Use this option to specify a RSA key in PEM format to sign the package
--certificate, -c Use this option to specify a x509 Certificate in PEM format
--skip-signing Use this option to skip package signing
To package, you will need to supply:
- Image name of the docker image to be used. If the image is not locally present, it will be pulled from the registry configured in the docker daemon on your system.
- Path to a project directory that contains IOx related files. A package descriptor file (
package.yaml
) is no longer required but recommended if readily available or if strict values are required. Otherwise ioxclient will generate a descriptor file from the LABELS in the specified Docker image. The directory can contain other optional files (ex.package_config.ini
etc.,)
ioxclient
uses its internal Docker client to connect to the remote Docker server/daemon as configured in the ioxclient configuration file. This will silently default to the system's Docker daemon but can be changed using the docker init command. Contacts the configured Docker daemon in the background to save the docker image in an IOx compatible format and produces a rootfs.tar
file that contains the contents of the original docker image. It then uses the files present in the project directory to create a IOx application package and prints out the path.
NOTE: The docker image name supplied should already be pulled and present in the configured docker daemon.
The outcome of package descriptor file (package.yaml
) generation differs based on the existence of the file and whether other options were specified.
- package.yaml exists in project folder.
- If the package descriptor file is present, ioxclient will use this exact copy to include in the generated package. This was the default behavior when this CLI was introduced.
- package.yaml exists in project folder and the --descriptor-merge flag is enabled.
- With the --descriptor-merge flag specified and the package.yaml file present in project folder, ioxclient will merge information from the Docker image (LABELS, CMD, AUTHOR, etc.) and the existing package.yaml. Information from the Docker image will only override fields that can be translated, otherwise the rest of the fields will be left as is in the final package.yaml.
- package.yaml exists in project folder and --descriptor-merge and --labels flags are specified.
- In addition to having an existing package.yaml and --descriptor-merge option, --labels flags provides the user with the ability to change fields in resultant package.yaml directly through ioxclient. Labels specified via command line will override those from Docker metadata and existing in the package.yaml. See section on Label Format below.
- No package.yaml is present
- ioxclient will attempt to generate a package.yaml on the fly using the metadata of the Docker image specified. A copy will be placed in the project directory.
- No package.yaml is present with --labels option specified.
- Will allow the user to change fields in the generated package.yaml in addition to those brought in by Docker image metadata. Labels specified via command line will override those specified in image.. See section on Labels
An example of package generation with an existing package.yaml file:
Copy$ pwd
/home/hvishwanath/projects/sample-apps-v2/docker/nodeapp
$ ls -la
total 12
drwxrwxr-x 2 hvishwanath hvishwanath 4096 Aug 23 14:51 .
drwxrwxr-x 6 hvishwanath hvishwanath 4096 Aug 19 16:07 ..
-rw-rw-r-- 1 hvishwanath hvishwanath 513 Aug 23 14:51 package.yaml
$ ioxclient docker package cisco/baserootfs:latest .
Currently active profile : local
Command Name: docker-package
Attempting to save docker image cisco/baserootfs:latest
Running command : [docker save cisco/baserootfs:latest -o rootfs.tar]
Checking if package descriptor file is present..
Created Staging directory at : /tmp/hvishwanath/903471683
Copying contents to staging directory
Checking for application runtime type
Couldn't detect application runtime type
Creating an inner envelope for application artifacts
Generated /tmp/hvishwanath/903471683/artifacts.tar.gz
Calculating SHA1 checksum for package contents..
Root Directory : /tmp/hvishwanath/903471683
Output file: /tmp/hvishwanath/152127686
Path: artifacts.tar.gz
SHA1 : ae8ebd3e64febc14f09452d2e5f18745d277e60f
Path: package.yaml
SHA1 : 2675a7d79f514bb77dd4943d4ae67875da6418aa
Generated package manifest at package.mf
Generating IOx Package..
Package docker image cisco/baserootfs:latest at /home/hvishwanath/projects/sample-apps-v2/docker/nodeapp/package.tar
An example to generate a signed package.
To generate a signed package, a private key and corresponding x509 Certificate in PEM format are required.
Copydev@dev-VirtualBox:~/Documents/iox/alpine/pkg$ ls -l
total 0
dev@dev-VirtualBox:~/Documents/iox/alpine/pkg$ ioxclient docker package -k ~/iox/key.pem -c ~/iox/cert.pem alpine:3.3 ./
Currently active profile : default
Command Name: docker-package
Warning: package.yaml not present in project folder. Will attempt to generate one.
No app type specified.
Checking device capabilities using active profile.
WARNING: Unable to get device capabilities using active profile.
Generating IOx package of type docker with rootfs consisting of layers
Removing emulation layers in docker rootfs, if any
The docker image is better left in it's pristine state
Replacing symbolically linked layers in docker rootfs, if any
Finding the minimum schema version for the descriptor file
Setting the descriptor schema version to 2.2
Validating generated descriptor file.
Validating descriptor file /tmp/desc221599723 with package schema definitions
Parsing descriptor file..
Found schema version 2.2
Loading schema file for version 2.2
Validating package descriptor file..
File /tmp/desc221599723 is valid under schema version 2.2
Package MetaData file was not found at /home/dev/Documents/iox/alpine/pkg/.package.metadata
Wrote package metadata file : /home/dev/Documents/iox/alpine/pkg/.package.metadata
Using rsa key and cert provided via command line to sign the package
Checking if package descriptor file is present..
Skipping descriptor schema validation..
Created Staging directory at : /tmp/954550862
Copying contents to staging directory
Checking for application runtime type
Couldn't detect application runtime type
Creating an inner envelope for application artifacts
Including rootfs.tar
Generated /tmp/954550862/artifacts.tar.gz
Calculating SHA1 checksum for package contents..
Parsing Package Metadata file : /tmp/954550862/.package.metadata
Wrote package metadata file : /tmp/954550862/.package.metadata
Root Directory : /tmp/954550862
Output file: /tmp/715460437
Path: .package.metadata
SHA1 : fc3ce3b8ee377e6149a9ccff2b03e28a97102fbb
Path: artifacts.tar.gz
SHA1 : 7091ca785b96cebdd7eedd65d9c3b4fd103ecbfb
Path: package.yaml
SHA1 : 425f4de862257214106e2fa70494078bd359a74a
Generated package manifest at package.mf
Signed the package and the signature is available at package.cert
Generating IOx Package..
Package docker image alpine:3.3 at /home/dev/iox/alpine/pkg/package.tar
To package multiple schema version specific package descriptor yaml files along with default package.yaml to app package, the name of version specific descriptor yaml file should have format x.xx_package_version.yaml. So schema 2.15 version specific yaml file will have name as 2.15_package_version.yaml.
To package multiple platform specific package.yaml files in app package, you can specify platform specific resources in package_
You can also package following files into IOx app apckage: controller.yaml, image_properties.xml and app icon files (with file name app_icon and extension .png, .jpeg, .gif and .tiff)
Default IOx package descriptor file
IOxclient generates a default minimal package descriptor file with all the mandatory fields based on the information available from the Docker image (CMD, USER, AUTHOR, ENTRYPOINT, ENV, USER, EXPOSE and WORKDIR instructions). Default values are overridden by user specified values via Docker labels, which is described later in this page.
An example using a simple Dockerfile.
CopyFROM alpine
COPY loop.sh /
RUN chmod 777 loop.sh
CMD /loop.sh
ENV https_proxy=http://173.36.224.109:80
Below is the IOx package descriptor file generated by IOxclient when invoked with the image built using the above Dockerfile.
Copydescriptor-schema-version: "2.2"
info:
name: simple
version: latest
app:
cpuarch: x86_64
env:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
https_proxy: http://173.36.224.109:80
resources:
profile: c1.large
startup:
rootfs: rootfs.tar
target:
- /bin/sh
- -c
- /loop.sh
type: docker
- Note: For IOxclient to include network interfaces in the package descriptor file, user needs to add interfaces using "cisco.resources.network.[x].interface-name" LABEL. Here x is the interface number.
An example using Dockerfile labels.
First we'll inspect the Dockerfile contents:
Copy$ cat Dockerfile
FROM alpine:3.3
RUN apk add --update nodejs -X http://dl-4.alpinelinux.org/alpine
COPY server.js /server.js
LABEL cisco.resources.profile=custom \
cisco.resources.cpu=500 \
cisco.resources.memory=256 \
cisco.resources.disk=50 \
cisco.resources.network.0.interface-name=eth0 \
cisco.resources.network.0.ports.tcp=[9000,9001]
EXPOSE 8000
CMD ["node", "/server.js"]
Build the new image using the Docker CLIs:
Copy$ sudo docker build -t iox-nodejs .
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM alpine:3.3
---> 6c2aa2137d97
Step 2 : RUN apk add --update nodejs -X http://dl-4.alpinelinux.org/alpine
---> Using cache
---> 823e5e51b3f5
Step 3 : COPY server.js /server.js
---> Using cache
---> 052a5acba3e0
Step 4 : LABEL cisco.resources.profile custom cisco.type docker cisco.resources.cpu 500 cisco.resources.memory 256 cisco.resources.disk 50 cisco.resources.network.0.interface-name eth0 cisco.resources.network.0.ports.tcp [9000,9001]"
---> Running in 66fa72a57586
---> f3f2aaa59d4f
Removing intermediate container 66fa72a57586
Step 5 : EXPOSE 8000
---> Running in cbfa6ffc0c38
---> d14acf591149
Removing intermediate container cbfa6ffc0c38
Step 6 : CMD node /server.js
---> Running in 16a72cf1445a
---> 12f28e6877f5
Removing intermediate container 16a72cf1445a
Successfully built 12f28e6877f5
Now build the IOx package using ioxclient and specify the newly created Docker image:
Copy$ sudo ioxclient docker package iox-nodejs .
Currently active profile : IR829
Command Name: docker-package
Warning: package.yaml not present in project folder. Will attempt to generate one.
app type is docker. Retrieving ufs capability info
Checking device capabilities using active profile.
WARNING: Unable to get device capabilities using active profile.
Generating IOx package of type docker with rootfs consisting of layers
Removing emulation layers in docker rootfs, if any
The docker image is better left in it's pristine state
Replacing symbolically linked layers in docker rootfs, if any
Finding the minimum schema version for the descriptor file
Setting the descriptor schema version to 2.2
Validating generated descriptor file.
Validating descriptor file /tmp/desc687408607 with package schema definitions
Parsing descriptor file..
Found schema version 2.2
Loading schema file for version 2.2
Validating package descriptor file..
File /tmp/desc687408607 is valid under schema version 2.2
Package MetaData file was not found at /home/dev/Documents/iox/alpine/.package.metadata
Wrote package metadata file : /home/dev/Documents/iox/alpine/.package.metadata
No rsa key and/or certificate files to sign the package
Checking if package descriptor file is present..
Skipping descriptor schema validation..
Created Staging directory at : /tmp/681579954
Copying contents to staging directory
Checking for application runtime type
Couldn't detect application runtime type
Creating an inner envelope for application artifacts
Including rootfs.tar
Generated /tmp/681579954/artifacts.tar.gz
Calculating SHA1 checksum for package contents..
Parsing Package Metadata file : /tmp/681579954/.package.metadata
Wrote package metadata file : /tmp/681579954/.package.metadata
Root Directory : /tmp/681579954
Output file: /tmp/700032873
Path: .package.metadata
SHA1 : 877217f33ea6957debc918c3bdc96d255ce37d60
Path: artifacts.tar.gz
SHA1 : 75dbb9a63650f14b1ec8b406a4c6a61e78852ab4
Path: package.yaml
SHA1 : e66668bc7c4d243cffe184252631698c04b9c106
Generated package manifest at package.mf
Generating IOx Package..
Package docker image iox-nodejs at /repo/packages/iox/apps/docker/nodejs/tmp/package.tar
package.yaml should contain fields that were specified using the LABEL directive in the Dockerfile along with the CMD (starting process for container) and EXPOSE (expose ports):
Copy$ cat package.yaml
descriptor-schema-version: "2.2"
info:
name: iox-nodejs
version: latest
app:
cpuarch: x86_64
resources:
cpu: "500"
disk: "50"
memory: "256"
network:
- interface-name: eth0
ports:
tcp:
- "9000"
- "9001"
- "8000"
profile: custom
startup:
rootfs: rootfs.tar
target:
- '"node"'
- '"/server.js"'
type: docker
IOx package descriptor fields defined in Dockerfile
Certain IOx descriptor fields can be incorporated in Docker images using the LABEL instruction when building from Dockerfile. This allow specific resources such as disk, memory, CPU architecture, etc. to be predefined when automatically generating the package descriptor upon package creation.
The format for the label is a key/value pair with the key prepended with the string “cisco” to differentiate from other labels that the author may include in the image. The key needs to follow the node structure of the IOx package descriptor schema (starts at the “app” root) in order for the resultant file to be valid. The value can be written as a plain old string or a set of values.
Reference on the syntax of inputting Labels in Dockerfile can be found here: https://docs.docker.com/engine/reference/builder/#/label
Examples below of Dockerfile snippets:
Adding a simple profile definition:
CopyLABEL cisco.resources.profile c1.large
Defining the resource profile for the container and defining the network device name along with additional ports to map to container (when NAT’ing is enabled):
CopyLABEL cisco.resources.profile=c1.large \
cisco.resources.network.0.interface-name=eth0 \
cisco.resources.network.0.ports.tcp=[9000,9001]
For boolean values (true and false), please be sure to use single quotes within the double quotes. The following format can be followed: "'<value>'"
Note that the network node is described as an array in the package descriptor schema so the proceeding node in this notation will be the index of the element trying to be accessed starting from 0.
Also, note that values can be written in array format using brackets to enclose the list and commas to separate each value without spaces in between.
A example on how to generate a complete package descriptor file using LABELs
Copy
LABEL cisco.info.name="Cisco agent" \
cisco.info.description="Cisco agent for CAT9K" \
cisco.info.version="0.1" \
cisco.info.author-link="http://www.cisco.com" \
cisco.info.author-name="Cisco Systems" \
cisco.type=docker \
cisco.cpuarch=x86_64 \
cisco.resources.profile=custom \
cisco.resources.cpu=500 \
cisco.resources.memory=256 \
cisco.resources.disk=50 \
cisco.resources.network.0.interface-name=eth0 \
cisco.resources.network.0.ports.tcp=[9000,9001] \
cisco.resources.devices.0.type=usbdev \
cisco.resources.devices.0.label="HOST_DEV829" \
cisco.resources.devices.0.usage="Brief description of usage" \
cisco.resources.devices.0.function="storage" \
cisco.resources.devices.0.mandatory="'true'" \
cisco.resources.devices.0.mount-point="/extra/storage/"
EXPOSE 8000
CMD ["node", "/server.js"]
Below is the corresponding package descriptor file generated by ioxclient
Copydescriptor-schema-version: "2.5"
info:
name: Cisco agent
description: Cisco agent for CAT9K
version: "0.1"
author-link: http://www.cisco.com
author-name: Cisco Systems
app:
cpuarch: x86_64
resources:
cpu: "500"
devices:
- function: storage
label: HOST_DEV829
mandatory: true
mount-point: /extra/storage/
type: usbdev
usage: Brief description of usage
disk: "50"
memory: "256"
network:
- interface-name: eth0
ports:
tcp:
- "9000"
- "9001"
- "8000"
profile: custom
visualization: true
startup:
rootfs: rootfs.tar
target:
- '"node"'
- '"/server.js"'
type: docker
Specific IOx schema version package descriptor file
Currently app package that uses latest descriptor schema version cannot be deployed on older IOx release. This has become the pain point for most of the app develop team to maintain multiple IOx packages for the app. To satisfy this requirement IOx packaging format is extended to allow to package multiple schema specific package.yaml(s) in app package.
To generate package yaml file for a specific schema version, a new command is added to ioxclient:
Copy$ ioxclient docker desc
Insufficient Args.
NAME:
descriptor - Generate specific schema version package descriptor yaml file
USAGE:
command descriptor [command options] <docker_image> <project_dir>
DESCRIPTION:
Usage: ioxclient docker descriptor <image_name> <project_dir>
image_name
-> is a valid docker image name.
project_dir
-> should be a valid directory location that generated package descriptor yaml file will be saved.
Example: docker descriptor alpine:latest .
schema version is not provided, latest supported schema version will be used
image_name is alpine:latest
project_dir is "." signifying current directory
default package descriptor file package.yaml will be generated at current directory
To generate a specific schema version package descriptor file from a docker image:
ioxclient docker descriptor --schema-version <schema version> <image_name> <project_dir>
or:
ioxclient docker descriptor -v <schema version> <image_name> <project_dir>
Example: docker descriptor -v 2.14 alpine:latest .
schema version is 2.14
image_name is alpine:latest
project_dir is "." signifying current directory
package descriptor file 2.14_package.yaml will be generated at current directory
OPTIONS:
--schema-version, -v Use this option to specify a schema version for package descriptor yaml file
For example:
ioxclient docker descriptor -v 2.15 alpine:latest .
2.15_package_version.yaml will be generated under current folder. Any unsupported attribute specified using LABEL directive in Dockerfile under one schema version will not be translated into this version of package yaml file, a warning message is thrown out. If schema version is not provided for the command, latest ioxclient supported schema version is used and default package.yaml file is generated, unsupported Dockerfile attributes will be ignored and shown in warning message.
An Example of command syntax error using docker descriptor command to generate package descriptor yaml file
Copyyuli4@yuli4-vm:~/ioxclient_test$ sudo ./ioxclient docker desc -v 04.08 schema_2.15:latest pkg_proj_dir/
Currently active profile : ir829_18
Command Name: docker-descriptor
Timestamp at DockerDescriptor start: 1611358157548
Invalid schema version
Valid schema version: <1-9>.<0-99>
Error occurred : Invalid schema version: 04.08
An Example using docker descriptor command to generate default package descriptor package.yaml file when there are unsupported attributes specified using LABEL directive in Dockerfile under schema version 2.15 while latest ioxclient supported schema version is 2.14:
Copyyuli4@yuli4-vm:~/ioxclient_test$ sudo ./ioxclient docker desc schema_2.15:latest pkg_proj_dir/
Currently active profile : ir829_18
Command Name: docker-descriptor
Timestamp at DockerDescriptor start: 1611358689074
Package descriptor yaml file will be generated: package.yaml
Finding the minimum schema version for the descriptor file
Failed to find suitable schema version for package description
Setting schema version to 2.14
Setting the descriptor schema version to 2.14
Validating generated descriptor file.
Validating descriptor file /tmp/desc174516577 with package schema definitions
Parsing descriptor file..
Found schema version 2.14
Loading schema file for version 2.14
Validating package descriptor file..
File /tmp/desc174516577 is invalid under schema version 2.14. Errors below:
app - Additional property child is not allowed
Property will be removed under schema version 2.14
app.startup - Additional property restricted_disk_options is not allowed
Property will be removed under schema version 2.14
Removing unsupported property and re-generating yaml file
Removing unsupported property: cisco.startup.restricted_disk_options
Removing unsupported property: cisco.child.manage-child
Removing unsupported property: cisco.child.reserve-disk
Skip validating generated descriptor file.
Package descriptor file is generated at: pkg_proj_dir/package.yaml
An Example using docker descriptor command to generate schema version 2.15 package descriptor yaml file while latest ioxclient supported schema version is 2.14:
Copyyuli4@yuli4-vm:~/ioxclient_test$ sudo ./ioxclient docker desc -v 2.15 schema_2.15:latest pkg_proj_dir/
Currently active profile : ir829_18
Command Name: docker-descriptor
Timestamp at DockerDescriptor start: 1611358750626
Package descriptor yaml file will be generated: 2.15_package.yaml
Setting the descriptor schema version to 2.15
Validating generated descriptor file.
Validating descriptor file /tmp/desc342555129 with package schema definitions
Parsing descriptor file..
Found schema version 2.15
Descriptor schema version in /tmp/desc342555129 2.15 doesn't have a matching schema. Proceeding without validation..
Package descriptor file is generated at: pkg_proj_dir/2.15_package.yaml
An Example using docker descriptor command to generate older schema version package descriptor package.yaml file when there are unsupported attributes specified using LABEL directive in Dockerfile under schema version 2.15 while latest ioxclient supported schema version is 2.14:
Copyyuli4@yuli4-vm:~/ioxclient_test$ sudo ./ioxclient docker desc -v 2.9 schema_2.15:latest pkg_proj_dir/
Currently active profile : ir829_18
Command Name: docker-descriptor
Timestamp at DockerDescriptor start: 1611358817089
Package descriptor yaml file will be generated: 2.9_package.yaml
Setting the descriptor schema version to 2.9
Validating generated descriptor file.
Validating descriptor file /tmp/desc401923383 with package schema definitions
Parsing descriptor file..
Found schema version 2.9
Loading schema file for version 2.9
Validating package descriptor file..
File /tmp/desc401923383 is invalid under schema version 2.9. Errors below:
app - Additional property child is not allowed
Property will be removed under schema version 2.9
app.startup - Additional property runtime_options is not allowed
Property will be removed under schema version 2.9
app.startup - Additional property restricted_disk_options is not allowed
Property will be removed under schema version 2.9
Removing unsupported property and re-generating yaml file
Removing unsupported property: cisco.startup.restricted_disk_options
Removing unsupported property: cisco.startup.runtime_options
Removing unsupported property: cisco.child.manage-child
Removing unsupported property: cisco.child.reserve-disk
Skip validating generated descriptor file.
Package descriptor file is generated at: pkg_proj_dir/2.9_package.yaml
Generating an LXC package
To generate an IOx package of type LXC please look at the below example.
Please note that LXC package generation is only supported in Linux and Darwin based operating systems
Copydev@dev-VirtualBox:~/iox/alpine/pkg$ sudo ioxclient docker package alpine:3.3 ./
Currently active profile : caf
Command Name: docker-package
Using the package descriptor file in the project dir
Validating descriptor file package.yaml with package schema definitions
Parsing descriptor file..
Found schema version 2.2
Loading schema file for version 2.2
Validating package descriptor file..
File package.yaml is valid under schema version 2.2
Generating IOx LXC package
Docker image rootfs size in 1M blocks: 5
Creating iox package with rootfs size in 1M blocks: 10
Parsing Package Metadata file : /home/dev/iox/alpine/pkg/.package.metadata
Wrote package metadata file : /home/dev/iox/alpine/pkg/.package.metadata
No rsa key and/or certificate files to sign the package
Checking if package descriptor file is present..
Skipping descriptor schema validation..
Created Staging directory at : /tmp/960654222
Copying contents to staging directory
Checking for application runtime type
Couldn't detect application runtime type
Creating an inner envelope for application artifacts
Generated /tmp/960654222/artifacts.tar.gz
Calculating SHA1 checksum for package contents..
Parsing Package Metadata file : /tmp/960654222/.package.metadata
Wrote package metadata file : /tmp/960654222/.package.metadata
Root Directory : /tmp/960654222
Output file: /tmp/147610005
Path: .package.metadata
SHA1 : 44a53959f93c3013442f8fd9266fb6843d9d9ada
Path: artifacts.tar.gz
SHA1 : fa7a0347e046eab3dd768998fc9252b2c0dd5aef
Path: package.yaml
SHA1 : 7c224ba9655d5ec8f9c9feb5b3bcfd13060af30d
Generated package manifest at package.mf
Generating IOx Package..
Package docker image alpine:3.3 at /home/dev/iox/alpine/pkg/package.tar
- Note: One can increase the size of the rootfs by using the "--headroom" option to specify the additional disk space (in MB) that needs to be added