beans
June 4, 2021, 11:53am
1
Hello,
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.
https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu1804-4.4.6.tgz
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.
beans
June 8, 2021, 6:00am
2
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
architectures:
- build-on: amd64
run-on: [arm64]
apps:
mongod:
command: mongod --bind_ip 0.0.0.0 --pidfilepath $SNAP_DATA/mongod.pid --journal --dbpath $SNAP_USER_COMMON
daemon: simple
restart-condition: on-failure
plugs: [home,network,network-bind]
parts:
mongodb:
source: https://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.6/multiverse/binary-arm64/mongodb-org-server_3.6.23_arm64.deb
plugin: dump
source-type: deb
stage-packages:
- libcurl4
- libssl1.0.0
You probably want to try plugging the hardware-observe
or system-observe
interfaces
beans
June 8, 2021, 11:57am
4
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 ?
beans
June 9, 2021, 10:11am
6
I’m unable to run that command. Sudo commands are locked and I dont have root access to the device.
ogra
June 9, 2021, 10:13am
7
how do you install the snap in the first place then ?
beans
June 9, 2021, 11:55am
8
Through the device ui so I’m somewhat limited to what I can try and debug.