Native C/C++ applications on CF?

1,425 views
Skip to first unread message

rar...@gmail.com

unread,
Sep 10, 2014, 6:39:37 AM9/10/14
to vcap...@cloudfoundry.org

HI all,

I am new to Cloud Foundry and am exploring the possibility of deploying native C/C++ server/client applications onto Cloud Foundry.

Is this possible at all?

I saw several pages which describes about Java apps, eclipse plugin etc. but none talk about native C/C++ apps at all.

If it is possible, please point me to a tutorial or wiki or any documentation.


Thanks you!

Alexander Lomov

unread,
Sep 10, 2014, 8:08:25 AM9/10/14
to vcap...@cloudfoundry.org, rar...@gmail.com
Hey! That's the good question. And I like this idea.

I haven't seen C/C++ deployments to Cloud Foundry, but in fact you are not limited in creation custom deployments. Here is how it works:

Cloud Foundry stages and runs application inside warden containers within DEA component [1]. Firstly application is build within such a container using buildpacks and container's snapshot is stored to blobstore and used as a source for instances that run application. In short, buildpacks are set of scripts that are executed during application staging (building) [2]. Buildpacks are also used to detect application type before staging, anyway you can specify any buildpack with -b option of cf command or buildpack option in manifest [3]. Of course you can create your custom buildpack [4] if you need something special (for instance to install special soft to a container or run special commands to build your app). I often use existing buildpack to create new one.

Best luck with this task. You are welcome to ask more questions.


Daniel Mikusa

unread,
Sep 10, 2014, 11:39:23 AM9/10/14
to vcap...@cloudfoundry.org


On Sep 10, 2014 5:39 AM, <rar...@gmail.com> wrote:
>
> HI all,
>
> I am new to Cloud Foundry and am exploring the possibility of deploying native C/C++ server/client applications onto Cloud Foundry.
>
> Is this possible at all?

You can use this build pack to run a binary. If you compile ahead of time it'll work.

https://github.com/ryandotsmith/null-buildpack

>
> I saw several pages which describes about Java apps, eclipse plugin etc. but none talk about native C/C++ apps at all.

Haven't seen a build pack that compiles C or C++ but you can. Build tools are available in the staging environment. You'd need to find or create a build pack to do that though. See OP for more on that.

Dan

>
> If it is possible, please point me to a tutorial or wiki or any documentation.
>
>
> Thanks you!
>

> --
> You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
> To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/84aecf18-06fe-4bd5-804c-aeb707092e35%40cloudfoundry.org.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

svin...@gmail.com

unread,
Apr 2, 2015, 6:06:06 AM4/2/15
to vcap...@cloudfoundry.org, rar...@gmail.com
Hello,
I am currently trying to determine if it would be possible to repackage various pieces of software (XML database, Composition Engine...) to be able to run them as Cloud Foundry applications / services.
(I work for EMC)
But they are currently designed to be ran as binary (for windows of Linux) and with the need to write to the local file system.
It there a way to workaround this?
Regards,
Sebastien

Mark Macdonald

unread,
Apr 2, 2015, 9:27:58 AM4/2/15
to vcap...@cloudfoundry.org, rar...@gmail.com, svin...@gmail.com
But they are currently designed to be ran as binary (for windows of Linux)

Precompiled Linux binaries should work. Check out the "null" buildpack that Daniel posted above.


and with the need to write to the local file system

Writing to the local file system is fine for temporary storage, but the changes are short-lived and will disappear when the app shuts down. If your software needs persistent storage, it would have to be rewritten to use a CF service.

Mark

Josh Ghiloni

unread,
Apr 2, 2015, 10:27:58 AM4/2/15
to vcap...@cloudfoundry.org
Another option for persistent storage is to have a custom buildpack that mounts some remote persistent storage (like SSHFS or S3). Daniel Mikusa's wordpress example [1] using the PHP buildpack does this.


--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
Reply all
Reply to author
Forward
0 new messages