Hi All ,
I am working on python based application. My requirement is that
i want to run two application independently using on snap.
name: testsnapone # you probably want to 'snapcraft register ’
version: ‘1.0’ # just for humans, typically ‘1.2+git’ or ‘1.3.2’
summary: python test snap
This is test snap
grade: devel # must be ‘stable’ to release into candidate/stable channels
confinement: devmode # use ‘strict’ once you have the right plugs and slots
# See 'snapcraft plugins'
above is my snapcraft.yaml
My questions is how i can run two python application using one snap?
Please suggest some solution
Thanks in advance
If you are asking how you’d launch each app, the commands should be
Edit: I see they are declared as daemons - thanks ppd for spotting that.
You declared your applications as daemons (https://snapcraft.io/docs/services-and-daemons), so both apps will start as system daemons, like how you would run a webserver or similar.
If that’s not what you want, make sure to give https://snapcraft.io/docs/snapcraft-overview a good read, and most importantly: look at a really easy example/tutorial like Create your first snap.
I am asking that how to build this snap using two python services because i was facing issue at stage.
Is my above snapcraft.yaml declaration is correct or wrong?
If correct then tell me why i was facing issue during build
if wrong then suggest the way to do that
You really need to provide us with the error messages you are facing etc. Generally, try to answer the following questions when seeking help:
What is happening? What’s the current output of the tool (snapcraft or the running program)? Error messages, anything like that.
What do you expect to happen? What are you trying to achieve? What is the purpose of your program? Provide context here.
What have you tried so far? Generally a good idea; people are more willing to help if an earnest attempt has been made. Also, this provides context and we can see what you’re actually trying to do.
How can we reproduce the issue? If possible, give us access to the source, the repository etc. People can quickly judge whether stuff is right if they can see the whole picture. Trying to guess your problem is not going to be the favourite pastime of the experts here.
What is your environment? In case the issue is not an obvious one, it might sometimes also be related to the versions of software or operating system you use. The environment is most likely not part of your issue here, but it’s still an important thing to keep in mind if you report issues in bug trackers or in forums.