Need some guidence snapping Mongodb to IOT device(arm64)


Ok, so I know there are quite a few MongoDB snaps available through the store.

However, I have a special case where I need to make my own.

I have an IOT device (arm64) that I am not able to download snaps on. I can install snapps that I have manually upload to the device.

I have searched through the forum and internet and have been able to find some yaml files to build a snap. But I haven’t gotten any of them to work.

So the question is how to go about it.
When I go to mongoDbs download page there is a tarball that I think is what I need.

But I’m struggling with how to get it to work. I have tried to just dump it to a bin folder and then run mongod whitout any success. I have tried to copy some existing yaml files but without luck.

How should I think about creating a snap from a tarball.

Anyone want to shed some light on my problem.

I kind of sorta got it working finally, I didnt do it the same way as the yaml files I was able to find online.

I installed using the .deb file from MongoDBs installation. It seems to be working fine, however I’m getting an error that bothers me.

AVC apparmor="DENIED" operation="open" profile="snap.mongo.mongod" name="/proc/vmstat" pid=2222 comm="ftdc" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Does anyone know what that means?

Here is my yaml
The stag packages I dont think is needed on this version of Mongo, I tried with the latest version at first but was not able to get ito work.

name: mongo
version: 1.0
summary: blank
base: core18
description: blank
grade: stable
confinement: strict

  - build-on: amd64
    run-on: [arm64]

    command: mongod --bind_ip --pidfilepath $SNAP_DATA/ --journal --dbpath $SNAP_USER_COMMON
    daemon: simple
    restart-condition: on-failure
    plugs: [home,network,network-bind]

    plugin: dump
    source-type: deb
      - libcurl4
      - libssl1.0.0

You probably want to try plugging the hardware-observe or system-observe interfaces

Thank you for the help.

I tired them both with the same errors occuring unfortunately.

Did you connect the interfaces with snap connect after installing your snap ?

I’m unable to run that command. Sudo commands are locked and I dont have root access to the device.

how do you install the snap in the first place then ?

Through the device ui so I’m somewhat limited to what I can try and debug.