I want to deploy my OpenCV application into google cloud. This application is written in python and I need to deploy it into Google Cloud server. It could be run on any os(MAC, Windows, Linux, etc.)
How can I solve this problem?
There are many options to deploy an application on Google Cloud.
If you developed your application using Python 3.7 or 3.8 you could explore the use of App Engine Standard or Cloud Functions, but in order to have more flexibility and if you used any other versions of Python take a look at Cloud Run or App Engine Flexible.
If you are not interested in the serverless aspect of Cloud Computing you could simply deploy your application in a Compute Engine Instance.
Related
Is there any way to test applications for Google Cloud or Azure locally in a computer, similar to the Localstack Docker image for AWS?
Thank you!
To test you application locally you can use Google App Engine Local Devolopment server to simulate your app running on app engine externally.
Demo python application via app engine
As you mentioned docker you may want to test your images locally you can also do this by following these instructions.
You can see this post. Here are some useful links, you will find
https://www.testcontainers.org/modules/gcloud/
We are using GCP's Firebase with Firestore for a new mobile app we are developing. As part of this effort we need to deploy a number of cloud functions which will act as Firestore triggers for doing some back end processing.
Our intention is to keep the deploys encapsulated inside of Firebase by using the firebase cli tools. However when we attempt to initiate the Firebase project for functions using the "firebase init functions" call the only two language options are "Javascript" and "Typescript", and the only deployable stack seems to be Node.js.
On previous GCP projects we had deployed Python based cloud functions (using the gcloud cli) and ideally we'd like to continue using Python for our Firebase cloud functions. So my questions are:
is it possible to deploy Python-based Firebase cloud functions? If not:
can we simply go back to deploying Python-based GCP cloud functions using the gcloud cli and still have them work as Firestore triggers?
Thanks
The Firebase CLI does not support deploying functions written in python.
You can certainly write Cloud Firestore triggers in python and deploy them with gcloud.
One thing you might not be aware of: the underlying Cloud Functions product is the same no matter how you deploy your functions. Firebase just adds tools and APIs on top of the existing Google Cloud Functions infrastructure. There is really no such thing as a "Firebase Cloud Function". There is just Cloud Functions, and you have options about how you can write and deploy them, either using gcloud, or the Firebase CLI.
I'm new to IBM Cloud and cloud platforms in general and wanted to start my Flask app on IBM Cloud, I just started with this Getting started with Python but I'm very confused with how it will work.
Is Cloud Foundry working the same way as containers work?
How the platform handle the dependencies in order to Flask use them in both deployment ways?
Your question is (almost) too broad. I can give you some basic answers, but everything else should be separate questions when you run into specific problems. You are referring to the Getting Started with Python and Cloud Foundry on IBM Cloud (this is the IBM Cloud docs, not the GitHub repo).
When working with Cloud Foundry (CF), the CF environment and buildpack takes care of the dependencies. For Python, they are specified in the file requirements.txt and there is the file manifest.yml to configure the app, its name, memory usage, domain and more. When you push the app (either cf push or ibmcloud cf push) the two files are taken into account and everything else is done automatically. That's the appeal of Cloud Foundry.
With containers, you would write a Dockerfile, then build the container image, push the image to a container registry, deploy the container to Kubernetes. When you build the container, your script would need to take care of resolving the dependencies (based on requirements.txt) and include the necessary modules into the image.
I recommend reading the Deploy an Application Cloud Foundry doc as a starter to give some more background. There is also a simple IBM Cloud solution tutorial that walks you through the steps of deploying a Flask app with a Db2 database. That same site with IBM Cloud solution tutorials also has an overview of tutorials by deployment option (Cloud Foundry, Kubernetes, Cloud Functions, etc.).
I'm deploying a django (python) application. I wondered what is the best way to deploy it. With microsoft azure or Amazon Elastic Beanstalk ?
The application just needs to view data from a database. What are (dis)advantages of azure or elastic beanstalk?
I'm using OSX 10.9.5 and Python 3.4.3
As Gaurav Mantri said, you need to provide more details - atleast the OS you are using. Some more surfing could lead you here :
What's the recommended way to deploy a Django app on IIS?
For web apps, Azure has Azure App Service. Deployment can be done through a variety of ways, including FTP, git, or from Visual Studio. Since you're using Mac, I would recommend deploying via git.
To do so, first create a web app in the Azure portal, and then follow the steps here:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
The advantages of Azure App Service, is that you can easily scale your app to many machines, and everything is taken care for you. Note that depending on how you've configured your database, you would have to deploy that separately.
Also, if you want to test Azure App Service, you can easily create a small sample Django application, using the Azure gallery. See the screen shot below.
Azure Web Apps provide a volume of ways for deployment your web applications. We can leverage tools/IDEs including FTP tools , Visual Studio and WebMatrix on Windows for remoting and modifying your web site code, and leverage repository for continuous deployment including local GIT, GITHUB, Visual Studio Online, Dropbox, Bitbucket.
It depends which way you prefer to.
As # theadriangreen mentioned, Azure Web Apps provide Django template for a quick start, you can simply create a Django application and pull the code to local leveraging the methods above.
Beside Continuous deployment using GIT in Azure App Service, you also can refer to Creating web apps with Django in Azure for more information.
I'm developing a Google App Engine application and I am encountering references to both an App Engine SDK and a Cloud SDK.
How do these two SDKs relate to each other?
There is definitely some overlap between the two. There is a dev_appserver.py and appcfg.py is both of them. I can run a development server using dev_appserver.py, and also with gcloud preview app run.
Why are there two tools that do the same thing? Is one being deprecated in favor of the other? Is there a roadmap for merging the toolsets, or are they going to be maintained in parallel? Do I need both, or just one?
It seems like the Cloud SDK is the more general of the two. But is it a superset? I.e. can I do anything I can in the App Engine SDK with the Cloud SDK?
I'm very confused by this messy and undocumented setup.
The App Engine SDK is older and was designed specifically for App Engine.
The Cloud SDK is newer and its goal is to cover other (all?) Google Cloud products, not only App Engine. So they definitely overlap in functionality from the App Engine's perspective. Specifically from this perspective the Cloud SDK appears not yet as mature and stable as the App Engine SDK. For example the gcloud preview portion is still at a BETA version:
NAME
gcloud preview app - (BETA) manage your App Engine app
As long as your work would be contained in the App Engine environment you can pick either of them, as you prefer.
If you throw in the mix third party tools or IDEs integration support the balance tips towards the App Engine SDK for now (PyCharm, for example).
I guess Google will eventually deprecate the App Engine SDK in favour of the Could SDK, but so far I didn't hear any such announcement. A similar deprecation trend already started in the (old) GAE Console - stuff being gradually migrated to the Developer Console.
Documentation says
The preferred tooling for managing your App Engine applications in PHP is now the Google Cloud SDK. The Google Cloud SDK includes a local development server as well as the tooling for deploying and managing your applications in App Engine. Optionally, you can also download the original App Engine SDK for PHP.Optionally, you can also download the original App Engine SDK for PHP.
Though this is for PHP, I believe similar upgradation for other languages too.