# Pushing/Deploying a Balena cloud pushed "app" to a fleet?

**URL:** <https://forums.balena.io/t/pushing-deploying-a-balena-cloud-pushed-app-to-a-fleet/360644>\
**Category:** Product support\
**Created:** [August 13, 2022, 6:22pm UTC](https://forums.balena.io/t/pushing-deploying-a-balena-cloud-pushed-app-to-a-fleet/360644 "2022-08-13T18:22:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scscsc](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@scscsc](https://forums.balena.io/u/scscsc)\
**Post date:** [August 13, 2022, 6:22pm UTC](https://forums.balena.io/t/pushing-deploying-a-balena-cloud-pushed-app-to-a-fleet/360644/1 "2022-08-13T18:22:34Z")

</div>

As part of our github action, we are now successfully “pushing” draft and release Balena container images using:

```auto
balena push myorg/myapp --nocache --registry-secrets /tmp/image_pull_secrets.yaml --draft --release-tag sha {github-commit-sha-here}

```

balena-cli succeeds:

```auto
[Success] Successfully uploaded images

[Info] Built on x64_01

[Success] Release successfully created!

[Info] Release: {balena-app-sha-here} (id: 12345678)

[Info] ┌─────────────┬────────────┬────────────┐

[Info] │ Service │ Image Size │ Build Time │

[Info] ├─────────────┼────────────┼────────────┤

[Info] │ myapp │ 306.77 MB │ 31 seconds │

[Info] └─────────────┴────────────┴────────────┘

[Info] Build finished in 1 minute, 5 seconds

```

In Balena Cloud, under Apps–\>MyApp–\>Releases we see the release, as can be seen at:  
[Imgur: The magic of the Internet](https://imgur.com/a/QawiJbK) (private info removed prior to screenshot).

Going back to the MyApp page, the “Deploy to fleet” button is disabled and just says “coming soon”.

From the cli, we tried:

```auto
balena deploy test-fleet myorg/myapp
balena deploy test-fleet myorg/myapp:{balena-app-sha-here}
balena deploy test-fleet myapp:{balena-app-sha-here}
balena deploy test-fleet {balena-app-sha-here}

```

all of which attempt to rebuild the app release that is already sitting in the balena cloud (same arch, same target device - Intel NUC), and then fail because those `deploy` cli commands don’t specify `registry-secrets` - on purpose, as we want to use the GitHub Actions/Balena Cloud built container, NOT build it again.

We also tried:

```auto
balena push test-fleet myorg/myapp
balena push test-fleet myorg/myapp:{balena-app-sha-here}
balena push test-fleet myapp:{balena-app-sha-here}
balena push test-fleet {balena-app-sha-here}

```

which all seem to function just like deploy, wanting to build locally and then deploy rather than using the existing App release/draft in balena cloud.

What am I missing here? How do we deploy to a fleet where this balena cloud hosted/built app wasn’t preloaded?

---

<div class="post-metadata">

**Author:** ![scscsc](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@scscsc](https://forums.balena.io/u/scscsc)\
**Post date:** [August 13, 2022, 7:58pm UTC](https://forums.balena.io/t/pushing-deploying-a-balena-cloud-pushed-app-to-a-fleet/360644/2 "2022-08-13T19:58:22Z")

</div>

So, apparently apps and fleets are not actually integrated yet. Public apps can be pushed to fleets using the apps _source_ github repo, but if the app is private, there is no way to do that.

I just ended up changing my github action to push to my fleet instead of to an app. That is:

```auto
balena push **myorg/test-fleet** --nocache --registry-secrets /tmp/image_pull_secrets.yaml --draft --release-tag sha {github-commit-sha-here}

```

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [August 17, 2022, 5:43pm UTC](https://forums.balena.io/t/pushing-deploying-a-balena-cloud-pushed-app-to-a-fleet/360644/5 "2022-08-17T17:43:27Z")

</div>

> [@scscsc](#):
>
> So, apparently apps and fleets are not actually integrated yet. Public apps can be pushed to fleets using the apps _source_ github repo, but if the app is private, there is no way to do that.

@scscsc you hit the nail on the head here. We purposefully marked Apps as ‘alpha’ in the dashboard as they are not yet feature complete and do not represent everything we want to do with them.

We are pushing through a lot of cool features at the moment, and the problem that we’re having is the trade-off between waiting until everything is feature complete and changing _A LOT_ of components all simultaneously, and drip-feeding new features so that our users get the benefit of them today. We chose the latter option as it allows us to refine our roadmap as we go and don’t accidentally spend a bunch of time building something that nobody actually wanted, but as a downside there are cases such as this where it can be a little misleading.

I think you’ve done exactly what I would have recommended here, but, perhaps another thing to consider is the use of blocks. Blocks only work with single containers, so if you have multiple containers within your app you’d have to create multiple blocks, but a block will give you a `bh.cr` URL to the prebuilt image which you can then use in the releases that you push to apps or fleets.

I spend a lot of my time working on these concepts at balena so have a lot of the context in my head ready to go - if you have any questions about this stuff feel free to reply here and ping me and I’ll do my best to get back to you.

You can also check out these blog posts for a bit more back story about what we’re doing:

- [The road to multi-app: transitioning balenaCloud Applications to Fleets](https://www.balena.io/blog/the-road-to-multi-app-transitioning-balenacloud-applications-to-fleets/)
- [The road to multi-app, mile 2: surfacing Apps on balenaHub and balenaCloud](https://www.balena.io/blog/road-to-multi-app-mile-2-surfacing-apps-on-balenahub-balenacloud/)
- [Blocks: new management functionality and a public roadmap for what's next](https://www.balena.io/blog/balenablocks-public-roadmap/)
- [Improving our device image management workflow with the balenaHub Container Registry](https://www.balena.io/blog/improving-device-image-management-workflow-balenaHub-Container-Registry/)

Hope this helps!
