cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13233
Views
0
Helpful
1
Replies

Anyone have example docker package.yaml with depends-on: ?

Levi Iiams
Level 1
Level 1

I'm trying to get IOxCore running so that I can play with that API.  (I am looking for a way to get platform info from my app - like platform serial number for example.  Sorry for adding a second question!)

I'm having trouble with ioxclient yaml validation - it's failing.    Here is what I've got, please help!

I'm running:

ioxclient docker pkg -m -a <imagename:1.0> .

Here is the package.yaml I'm trying to merge - I want to add the 'depends-on' as referenced here: https://developer.cisco.com/docs/iox/#!cisco-core-services/core-services-on-ir8xx-platforms

li-mbp:app_package levi$ cat package.yaml

descriptor-schema-version: "2.2"

info:

  name: webrelay:1.2

  version: "1.2"

app:

  cpuarch: x86_64

  env:

    PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

  resources:

    cpu: "50"

    disk: "2"

    memory: "64"

    network:

    - interface-name: eth0

      ports: {}

    profile: custom

  startup:

    rootfs: rootfs.tar

    target:

    - /bin/sh

    - -c

    - /usr/bin/web-relay.py

  type: docker

  depends-on:

    packages:

      - name: "IOxCore"

        version: "1.5.0"

I'm getting this error:

File /var/folders/42/f8sn5v5d6l3144d4q8d7j4fm0000gn/T/desc739397925 is invalid under schema version 2.2. Errors below:

- app: Must validate one and only one schema (oneOf)

{

"cpuarch": "x86_64",

"depends-on": {

  "packages": [

   {

    "name": "IOxCore",

    "version": "1.5.0"

   }

  ]

},

"env": {

  "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

},

"resources": {

  "cpu": "50",

  "disk": "2",

  "memory": "64",

  "network": [

   {

    "interface-name": "eth0",

    "ports": {}

   }

  ],

  "profile": "custom"

},

"startup": {

  "rootfs": "rootfs.tar",

  "target": [

   "/bin/sh",

   "-c",

   "/usr/bin/web-relay.py"

  ]

},

"type": "docker"

}

- app.type: app.type must be one of the following: "vm"

"docker"

- app.startup: Must validate one and only one schema (oneOf)

{

"rootfs": "rootfs.tar",

"target": [

  "/bin/sh",

  "-c",

  "/usr/bin/web-relay.py"

]

}

- kernel: kernel is required

{

"rootfs": "rootfs.tar",

"target": [

  "/bin/sh",

  "-c",

  "/usr/bin/web-relay.py"

]

}

- target: Additional property target is not allowed

{

"rootfs": "rootfs.tar",

"target": [

  "/bin/sh",

  "-c",

  "/usr/bin/web-relay.py"

]

}

- app.depends-on: Must validate one and only one schema (oneOf)

{

"packages": [

  {

   "name": "IOxCore",

   "version": "1.5.0"

  }

]

}

- services: services is required

{

"packages": [

  {

   "name": "IOxCore",

   "version": "1.5.0"

  }

]

}

I've looked around, I can't find a good reference yaml file that has this requirement. 

1 Reply 1

Levi Iiams
Level 1
Level 1

Oh ok small update - I misunderstood the interplay between 'apps' and 'services'. 

I think I'm going down the wrong rabbit hole.