push a python django app to cloudfoundry


Lynn Lin
 

Hi , we have a python django web app . In this web app, we will call VMware ovf tool (https://my.vmware.com/group/vmware/details?productId=491&downloadGroup=OVFTOOL410) .This tool is needed to be installed (sudo bash VMware-ovftool-4.1.0-2459827-lin.x86_64.bundle),How can we support this in CF V2?


Daniel Mikusa
 

Apps don't have root access, so you can't `sudo` or `su`. Can you run this
not as root? If so, you could package the binaries you need with the app.

Dan

On Wed, Jan 27, 2016 at 1:36 AM, Lynn Lin <Lynn.Lin(a)emc.com> wrote:

Hi , we have a python django web app . In this web app, we will call
VMware ovf tool (
https://my.vmware.com/group/vmware/details?productId=491&downloadGroup=OVFTOOL410)
.This tool is needed to be installed (sudo bash VMware-ovftool-
4.1.0-2459827-lin.x86_64.bundle),How can we support this in CF V2?


Lynn Lin
 

Thanks Dan
Before I check if we need root access,we not only package the binary but also its all dependency,correct?

Sent from my iPhone

Loris:leverage cloud foundry for @Scale DevOps


在 2016年1月27日,下午9:12,Daniel Mikusa <dmikusa(a)pivotal.io<mailto:dmikusa(a)pivotal.io>> 写道:

Apps don't have root access, so you can't `sudo` or `su`. Can you run this not as root? If so, you could package the binaries you need with the app.

Dan

On Wed, Jan 27, 2016 at 1:36 AM, Lynn Lin <Lynn.Lin(a)emc.com<mailto:Lynn.Lin(a)emc.com>> wrote:
Hi , we have a python django web app . In this web app, we will call VMware ovf tool (https://my.vmware.com/group/vmware/details?productId=491&downloadGroup=OVFTOOL410) .This tool is needed to be installed (sudo bash VMware-ovftool-4.1.0-2459827<tel:4.1.0-2459827>-lin.x86_64.bundle),How can we support this in CF V2?


Daniel Mikusa
 

Correct. There's a couple ways you could do it.
- You can package the installer and run that before your app starts
(assuming the installer can be run as a non-root user). You can use a
`.profile.d` script to run the installer or just shell out in your app.
- You can pick individual binaries. This is trickier because then you
need to pull in all of the dependencies (shared libraries, files, etc) of
the binary. I find that the `ldd` is helpful to find the shared libraries
required by a binary.

The first option is generally easier, while the second might allow you to
package a smaller amount of files with your app.

Dan

Dan

On Wed, Jan 27, 2016 at 8:18 AM, Lin, Lynn <lynn.lin(a)emc.com> wrote:

Thanks Dan
Before I check if we need root access,we not only package the binary but
also its all dependency,correct?

Sent from my iPhone

Loris:leverage cloud foundry for @Scale DevOps


在 2016年1月27日,下午9:12,Daniel Mikusa <dmikusa(a)pivotal.io> 写道:

Apps don't have root access, so you can't `sudo` or `su`. Can you run
this not as root? If so, you could package the binaries you need with the
app.

Dan


On Wed, Jan 27, 2016 at 1:36 AM, Lynn Lin <Lynn.Lin(a)emc.com> wrote:

Hi , we have a python django web app . In this web app, we will call
VMware ovf tool (
https://my.vmware.com/group/vmware/details?productId=491&downloadGroup=OVFTOOL410)
.This tool is needed to be installed (sudo bash VMware-ovftool-
4.1.0-2459827-lin.x86_64.bundle),How can we support this in CF V2?


Lynn Lin
 

Got your point,Dan

Thanks

Sent from my iPhone

Loris:leverage cloud foundry for @Scale DevOps


在 2016年1月27日,下午10:06,Daniel Mikusa <dmikusa(a)pivotal.io<mailto:dmikusa(a)pivotal.io>> 写道:

Correct. There's a couple ways you could do it.
- You can package the installer and run that before your app starts (assuming the installer can be run as a non-root user). You can use a `.profile.d` script to run the installer or just shell out in your app.
- You can pick individual binaries. This is trickier because then you need to pull in all of the dependencies (shared libraries, files, etc) of the binary. I find that the `ldd` is helpful to find the shared libraries required by a binary.

The first option is generally easier, while the second might allow you to package a smaller amount of files with your app.

Dan

Dan

On Wed, Jan 27, 2016 at 8:18 AM, Lin, Lynn <lynn.lin(a)emc.com<mailto:lynn.lin(a)emc.com>> wrote:
Thanks Dan
Before I check if we need root access,we not only package the binary but also its all dependency,correct?

Sent from my iPhone

Loris:leverage cloud foundry for @Scale DevOps


在 2016年1月27日,下午9:12,Daniel Mikusa <dmikusa(a)pivotal.io<mailto:dmikusa(a)pivotal.io>> 写道:

Apps don't have root access, so you can't `sudo` or `su`. Can you run this not as root? If so, you could package the binaries you need with the app.

Dan


On Wed, Jan 27, 2016 at 1:36 AM, Lynn Lin <Lynn.Lin(a)emc.com<mailto:Lynn.Lin(a)emc.com>> wrote:
Hi , we have a python django web app . In this web app, we will call VMware ovf tool (https://my.vmware.com/group/vmware/details?productId=491&downloadGroup=OVFTOOL410) .This tool is needed to be installed (sudo bash VMware-ovftool-4.1.0-2459827<tel:4.1.0-2459827>-lin.x86_64.bundle),How can we support this in CF V2?