Been playing with the platform. Very nice so far. One thing I’ve found tho is how to see what services/code/images has been associated with an “App” and more importantly how can I remove a service from application context.
At this stage the only tools/commands I can find with the CLI is to define a new app with my different set of services and move the devices to this app.
Hi there Colin, welcome to the Forums. Just to make sure I understand correctly, you are talking about adding/removing containers (services) from an Application, correct? If that is the case, you basically just need to do another balena deploy from the directory that has your docker compose file, or you could even switch to some other directory on your local dev machine, and if you do a deploy from there that will be built and pushed to the device, effectively replacing what is in the Application previously.
Thank you for the reply, note I"m also new to Docker generically so maybe missing certain fundamentals.
It’s sounds like your saying in essence that an App is essentially just a tag. You can deploy only a single Docker deployment to an app (although it itself can be a single or multi-container deployment). Thus, simply deploying another Docker application to the “App” replaces what was there.
Yes, you could say that deploying is like pushing a new tag in the sense that the application is built based on the contents of the Dockerfile or docker-compose.yml, etc. present in the directory. Just as described in the documentation linked by David above.
Therefore, the standard way to change the services of the application is to edit the underlying configuration and deploy the updated version.
New to this platform so excuse me if question belongs to wrong forum. Please redirect me to correct one.
We have docker-compose.yml file like below.
In logs for openbelena, service with name “main” is seen while for balenacloud service with name “myservice” is created.
Hi @smita - are you deploying the exact same project and compose file to both platforms (open and cloud)? and are you doing so the same way (balena push) ? the 2 should have the exact same behaviour
Hi @curcuz,
In case of OpenBalena we are preloading the image and using below commands for build and deploy -
balena build
balena deploy
In case of BalenaCloud we are using -
balena push
Something is definitely wrong then; both cloud and openBalena should behave in the same way.
Could you try adding another service to your compose file and deploying that… if it isn’t using the service name then I am wondering if that will break it and reveal the location which might be the cause, or it might fix it and then we have reduced the problem space.
I was wrong in my observation initially. What I see now is, there is no dependency on openbalena or balena cloud but how logs are being viewed. Even on balena cloud that is balena io dash board service that is being created is by name of “main”
So in summery when I am checking logs for same perticular device -
1- logs that are available immediately after balena push has service names - myservice and redis ( I tried adding one more service)
2- logs that are available after balema logs has only single service name that is “main”
Hey @smita, thanks for the additional info, I’ll try to clarify as best I can!
When you use balena push the logs you are seeing at first are the service building logs not the running logs. Push will create a new release, and only if successful, and if the release is not pinned, will it get pushed to the device. This is why you are seeing logs with [myservice] and [redis] because those services are being built (but not run yet).
When you use balena logs these are the active running service logs on the device. So if you are still seeing [main] then the new release (myservice and redis) must not have been pushed to the device yet. This could be for a number of reasons, including a failed build, or the release being pinned on the device/app, or still waiting for the device to download the new release.
Do you see any failures in the balena push logs? You should charlie the unicorn if it went well. If the build was successful, then you should see downloading messages on the device dashboard to indicate the new release is available and being sent to the device.