Deployment on Google App Engine - Django, Vagrant, Ansible - python

I want to deploy Django project on google app engine
Following are the current situations.
I have a code on GITHUB
Djnago project has setup using Vagrant, Ansible, VirtualBox
I am completely new for cloud base deployments.
Need help to achieve this.
I checked google docs but there are couple of options for django related deployment, I am not sure which to pick for vagrant and ansible.

Your question is a bit too generic as it stands - making it here rather than comment for clarity.
If you're talking about deploying to GAE (Google App Engine) then most likely you cannot re-use your Ansible scripts as you've been writing for vagrant. As it may be possible to use Ansible to deploy on GAE, most people I know are using standard google procedure to deploy their app.
If you plan to use GCE (Google Compute Engine, a layer down in the infrastructure), you would be able to use your existing Ansible provisioning scripts (maybe with slight modification), follow along the Ansible documentation

Related

Running One Instance of Google App Engine with frontend in nodejs and backend server in python

I'm getting my feet wet with GCP and GAE, also nodejs and python and networking (I know).
[+] What I have:
Basically I have some nodejs code that takes in some input and is supposed to then send that input to some python code that will do more stuff to it. My first idea was to deploy the nodejs code via GAE, then host the python code in a python server, then make post requests from the nodejs front-end to the python server backend.
[+] What I would like to be able to do:
just deploy both my nodejs code and my python code in the same project and instance of GAE so that the nodejs is the frontend that people see but so that the python server is also running in the same environment and can just communicate with the nodejs without sending anything online.
[+] What I have read
https://www.netguru.co/blog/use-node-js-backend
Google App Engine - Front and Backend Web Development
and countless other google searches for this type of setup but to no avail.
If anyone can point me in the right direction I would really appreciate it.
You can't have both python and nodejs running in the same instance, but they can run as separate services, each with their own instance(s) inside the same GAE app/project. See Service isolation and maybe Deploying different languages services to the same Application [Google App Engine]
Using post requests can work pretty well, but will likely take some effort to ensure no outside access.
Since you intend to use as frontend the nodejs service you're limited to using only the flexible environment for it, which limits the inter-service communication options - you can't use push queues (properly supported only in the standard environment) which IMHO would be a better/more secure solution than post requests.
Another secure communication option would be for the nodejs service to place the data into the datastore and have the python service pick it up from there - the datastore is shared by all instances/versions/services inside the same GAE app. Also more loosely coupled IMHO - each service can function (at least for a while) without the other being alive (not possible if using the post requests).
Maybe of interest: How to tell if a Google App Engine documentation page applies to the standard or the flexible environment
UPDATE:
Node.JS is currently available in the standard environment as well, so you can use those features, see:
Now, you can deploy your Node.js app to App Engine standard environment
Google App Engine Node.js Standard Environment Documentation

Deploy django application on Microsoft Azure or Amazon Elastic Besanstalk

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.

Will Robohash run as a python app at App Engine?

We have a need for Robohashes that never change and are very secure and reliable. This is perfect for a Google app where it can be monitored, run over SSL and be extremely reliable.
I really don't have much python experience. Would someone please give a mile-high view? Would it be easy to host Robohash as a python app at the App Engine?
requirements.txt
pillow <- not supported
tornado <- looks like it will work
Are there other challenges, like say how files are accessed? Java in the appengine couldn't not read the file system last I checked it had to use resources. Do you think it will be worth-while for me to pursue?
This is the version we need: https://github.com/BitShares/Robohash
I'm afraid that won't work directly as an application deployed to the standard Google App Engine (GAE) runtime.
There is a way to add third party modules to your GAE app, and it would probably work with pillow, but not with Tornado as it would collide with the webapp2 web framework used by GAE.
Having said that, there are good news for you.
You could use Managed VMs that are in the middle of deploying only your application and of having your own virtual instance where you install everything.
With managed VMs you could build your custom runtime with exactly what you need.

Can one source code be deployed to Openshift, Heroku and Google App Engine at once?

As subject, is is possible with just one source code, we can deploy our code to Openshift or Google App Engine? Heroku is not necessarily in my case.
My application is using Python Flask + PostgreSQL 9.1. I love the easiness in Openshift when I configure my technology stack, but is the case will be same with GAE?
Thanks!
I work on Openshift and at this time I'm not aware of anything that will deploy your code to GAE and Openshift at the same time.
You might be able to write your own script for it.
PostgreSQL is not available on GAE, so this code will definitely not run there.

How to set up auto-deploy to AppEngine when pushing to Git Repository

I've heard that other platforms support auto-deployment of their code to production when they push changes to their Git repository.
Can I set up something similar to this for AppEngine? How?
I'm using Python2.7 on Windows, and bitbucket as a repository.
Thanks!
Since app engine deploy is just a python script, why can't you just write a shell script that calls 'git push' followed by 'python appcfg.py deploy'?
Any bitbucket hooks that will send from bitbucket->appengine after you upload to app is probably a bad idea since it will require storing your app engine login credentials on github.
Other projects might have your app server pull from github/bitbucket. You can do this if your app engine site just serves static websites using http://drydrop.binaryage.com/, but you can't update actual running code this way.
Recently, App Engine added Push to Deploy features: https://developers.google.com/appengine/docs/push-to-deploy
It only has built in support for GitHub, but it might still be possible to configure BitBucket to work with it.

Categories

Resources