TurboGears Deployment - TurboGears

What is TurboGears Deployment?

To switch over from a development environment to a full-fledged production environment, application needs to be deployed on a real internet server. Depending upon what you have got, there are distinct options available to install a TurboGears net application.

Apache with mod_wsgi

The mod_wsgi is an Apache module evolved by using Graham Dumpleton. It permits WSGI packages to be served using the Apache internet server.

Firstly, installation Apache 2.X on your platform, if not done already. As soon as you've got Apache established, deploy mod_wsgi. Create and activate Python digital environment at the server and installation TurboGears in it.

Installation your utility in the utility director, then create a script named app.wsgi.

Configure Apache installation as follows –

TurboGears under Circus and Chaussette

Circus is a process & socket manager. It can be used to monitor and control processes and sockets. When paired with the Chaussette WSGI server, it can become a powerful tool to deploy your application and manage any related process your applications need.

TurboGears - GoogleAppEngine

Install the Google AppEngine SDK for Python from the following URL − https://cloud.google.coms

Install the Google AppEngine on your system. Then open Google Developer console and sign in with your Google Account − https://console.developers.google.com/start

Create a new project called mytgapp –

mytgapp_project

Using Google AppEngine Launcher, create a new application named mytgapp.

new_application

google_app_engine_launcher

The following files will be created in the specified directory −

  • app.yaml
  • favicon.ico
  • index.yaml
  • main.py


By default,the created application relies on the Webapp2 framework. To remove this dependency, edit the app.yaml file and delete the following part −

Create a temporary virtual environment in a directory named mytgapp and install TurboGears. Create a TurboGears application in it. Now we can proceed editing the main.py file which is started by AppEngine to run our application and actually write a TurboGears application there.

Add the following contents in main.py −

Now run the application from AppEngine Launcher and click on browse button to see that application works properly on the localhost.

We have already created a project named mytgapp in the developer console. Now click on the deploy button in the Launcher. After the deployment process is over, http://mytgapp.appspot.com/ visit to view our application online.

mytgapp_appspot

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

TurboGears Topics