Santosh-2644 avatar image
0 Votes"
Santosh-2644 asked PramodValavala-MSFT commented

Installing executable Packages in Python Azure Function App

I have in my free subscription plan created a azure function app with Python run time, OS being selected as Linux, plan shows as CentralUSLinuxDynamicPlan (Y1: 0)

Whole Idea about this App is to respond to http request and download the PDF (It converts the HTML to pdf)

So to convert HTML into PDF, i would need to add some packages into this Azure function app. I believe they can be added with SSH commands as given below


dpkg -i wkhtmltox_0.12.6-1.buster_amd64.deb

apt-get install -f

cp /usr/local/bin/wkhtmlto /usr/bin/*

But, am told it's no possible to use SSH at all on plain azure function app, so is why SSH isn't visible to me in the left menu bar. Is it true that SSH can be used only with dockerized Azure function app only ?

If I dont want to dockerize and want to still install packages into my Python Azure function app what should i do ? Googled a lot, no clear details on Doc as well.

I saw some responses to access KUDU with SCM URL, no, for me that doesn't open into anything but just some settings with nothing to do there

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered PramodValavala-MSFT commented

@Santosh-2644 While you do have the ability to SSH into the instance, it's a limited environment best for when developing and working with local files. Any commands that require elevation will not work.

Especially, in your case, external dependencies are best managed in a custom container as the environment on the consumption plan is recycled as your function app scales. Another option would be to bundle the external dependencies along with your function app assuming you could include all dependencies along with it and ensure it works on Azure, but either way, the customer container approach is the best suited approach since you could test the container as a whole which runs as-is on azure.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am yet to start implementing this idea of containerizing.

By adding a container on top of azure function app, does it become serverfull instead of serverless ? will it still be azure function ? or it becomes service app ?

Containerizing, means you are asking us to use docker etc ?

0 Votes 0 ·

@Santosh-2644 Yes. Docker would be the preferred tool for development here and is the one that is used in our docs as well.

As for whether it will be a serverless/traditional app would depend on how its hosted. You could either host it in Premium Plan (serverless) or Dedicated App Service Plan (traditional app). Consumption Plan is currently not supported.

The Premium Plan is like the Consumption Plan except that at-least one instance needs to always run (so no cold start) with higher compute options available. Scaling is the same with additional capabilities that supports scaling of triggers (built-in and custom) against sources that are being a VNET.

While costlier that a consumption plan, function apps with constant load should see similar costs for the same compute power.

0 Votes 0 ·