Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Safaribooksonline.com has a video [1] from Jacob Kaplan-Moss about how to deploy a Django app. This video is from 2010. It refers to a site [2] that has a list of many relevant aspects.
Now the workshop mentions things like virtual machines, vagrant (as deployment environments) or Fabric and other tools for deployment automation.
I was wondering how much has changed since then. I can think of Docker replacing Vagrant. Or Heroku or AWS instead of renting a dedicated physical server for deployment (or virtual machines). Or using Ansible or Chef / Puppet instead of Capistrano or Fabric.
But what else has changed? What is still relevant? What is done differently? What is the state of the art in 2017 for deploying a production ready Django app.
Can anybody point me to good blogs / books / tutorials?
[1] "Django deployment workshop", https://www.safaribooksonline.com/library/view/django-deployment-workshop/9781449396442/
[2] "infrastructure of modern websites", https://randomfoo.net/2009/01/28/infrastructure-for-modern-web-sites
Honestly, the answer to this question will be extremely opinionated and defining best practices in ever-changing devops area can be challenging. Something is a best practice one day, and tomorrow someone makes a blog post about that being god awful and obsolete.
There are numerous ways to do deployment, but it all comes down to what do you need, how much do you want to automate and what level of customization is required.
For instance, at my current place we use CircleCI, Heroku, Sentry and
Rollbar.
One of my previous clients (three months ago) wanted us to use
CodePipeline which includes CodeCommit, CodeBuild, CodeDeploy for
AWS.
Recently I also worked on a project involving Docker and flexible
environment from Google App Engine.
For my personal projects I simply use Fabric and Heroku, but I'd really like to try the new CodeStar or whatever the name is on AWS.
Define what you want, how you want to customize it and simply do it. If something does not work out, just change it. Things are becoming easier to do and replacing one item in your pipeline can occur in matter of minutes and not days/weeks as it did. Nowadays every provider has support for Docker and CI, one way or the other.
YMMV.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am working with discord.py, I am wondering if there is a way I can get python to change the data and read the data off a website, like the MEE6 dashboard.
I have data user data like level and XP stored in a postgresql database, hosted with elephantsql
I have the bot hosted on heroku.
Is there a way to acomplish this with a
WIX site or a google site?
Edit:
So ^ wont work but are there any good tutorials out there on how to use
HelioHost or Netlify
You can use netlify to host a website which can be controlled through private GitHub repositories. A dashboard consists of the backend to edit a database so even helios host will work. You cannot use Wix or a google site as they only support front end code.
For hosting the bot you could use heroku and every time you change something you could push it like using a git repository.
or you can use serverless With Google cloud functions
To make a discord.py bot run 24/7 but still be able to edit it
You can use cogs, which will allow you to load, unload, and reload extensions. So then all you need to do is make changes in this cog, and then reload it, for the changes to take place.
https://discordpy.readthedocs.io/en/stable/ext/commands/api.html?#cogs
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I made a project in Pycharm 2018.3 community version with Django and now I want to deploy to a web server to host the project. I'm using Mamp host the web server, but I don't know how to export/import my project from Pycharm to Mamp.
How do I deploy from Pycharm to the web server? What are the options for GitHub integration with Pycharm? Are there other ways to move the project to the web server while staying in the PyCharm IDE?
Thanks very much!
This may fall under looking for opinions, but in general, PyCharm provides you with a few options. You can use the deployments option by setting up a remote host (once you have your server set up) which allows you to develop locally, then sync up over ssh either automatically or when you goto Tools -> Deployment -> Sync Local to Deployed.
Although this previous option can work in PyCharm, I'd opt for and highly suggest setting up a git repository (Github, Bitbucket or other) then use PyCharm to commit and push your code to that remote repository. Then from your server, you can pull down the code from the git repository. This allows you the benefits of managing the code changes through all of the utilities a version control system provides.
You'll want to pay particular attention to any paths you have set in settings.py as they will likely differ on your server. One way to manage that is to use environment variables which allows you to refer to the environment variable, with your local development machine having it's own settings, and the server with its own set. https://12factor.net/config
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm in the early phases of designing and implementing a python web project that i want to be able to easily distribute.
Coming from a primary PHP and Perl world i know how i would do the project in those lanuages but I am trying to find the best method for python.
Not sure if it matters, but I'm thinking of using django as the web framework, but still exploring other frameworks.
What i'm looking for is best practices to be able to bundle my application and have users just install it using pip.
Would i be able to package the wen application like that even if it using django or is that not the way its normally done? Would they instead just download the code and set it up like it was any other tar ball of code?
I tried searching around for this but i find mostly information on people deploying there own projects.
Thanks
Dan
The answer depends of the size of your project.
If it's a plugin that could be integrated to any web site, so probally just an app in the project, it's quite easy check the page of the django's doc
If it's a full websitethen it's a little bit more complicated, since a django project depends on multiple settings that could differ from one system to an other I usually see the project being installed from a tar ball.
I've seen packages like django-admintools bundle multiple apps in one package, but the user still need to create a basic django project.
From what I know a full project cannot be install only by PIP.. the user always need to setup settings and the webserver (apache or nginx).
I hope this helped you.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm working as a system administrator/infrastructure engineer, and sometimes I am wasting my time on checking if everything working properly after infrastructure changes. I want to write some tests, such as:
Download some CSS/JavaScript code from a website
Login to website
Upload some file and try to download it
Login to a server and execute some script
And so on.
Most unit testing frameworks focused on unit testing and code coverage, but all I need is just a configurable runner for my tests with nice reporting and may be additional modules for ease of writing HTTP tests. Possibility to use this tool for stress-testing would be an advantage.
I've found many names (testoob, functest, robotframework, py.test, etc.), but I don't know what to choose.
Robot Framework has many nice libraries that would definitely help you - so you don't have to reinvent the wheel. For example, Robot Framework integrates with the Selenium web testing tool.
I think that from the tools that you mentioned Robot Framework is the most active project - py.test seems to be active also.
One thing that you should notice is that Robot tests are not written in Python directly, but they use a simple text based syntax. You can of course access Robots libraries from Python code if you want to or create your own robot library in Python code.
[DISCLAIMER: I am a member of the team that is developing Robot Framework]
I develop an open-source framework (part of Pycopia) that does exactly this. It's not complete yet (still working on the web UI), but it's usable to run real tests and get emailed reports. You write tests in Python, but it also manages test cases, test results, and equipment inventory.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm working on a web application using isapi_wsgi and django-pyodbc. I'd like to have a way to install all dependencies and push the files out to the webserver. Unfortunately, some of these are easier said than done. In particular, handling dependencies is a pain as some of them won't install correctly even under setuptools (pywin32 is especially difficult).
Most of the tools that I see for automating this kind of stuff (fabric and capistrano) are made for use with unix-y systems. I would like to set up a continuous integration system, but that only solves part of the problem. Is there any way to make life easier for a Pythonista who's forced to use Windows/IIS?
BitNami provides free Windows Django all-in-one installers that include all dependencies to deploy a Django app on Windows. Disclaimer: I am one of the developers of this tool. If you are going for a hosted version, we also have free Windows Amazon Machine Images (look further down in that page) but in that case I would strongly recommend going with a Linux-based AMI.
Have you looked into Paver? It might not be the perfect solution, but maybe better then your current process.
And it has setuptools (and other useful wrappers) built-in.
Nowadays deploying your Django web project on a Windows based server has become less cumbersome. It's still challenging as most guides are geared towards Unix systems, but deploying on a Windows server is not impossible. Microsoft now provides some native support for Django with IIS.
However, you are not limited to IIS. You can use Apache + mod_wsgi. Here is one of my own test projects that you can deploy on Apache my web project.
Guide: Deploy Django with Apache and mod_wsgi on Windows Server 2019