So I'm working to deploy my python code to my AWS ec2 instance and at step four of the second part
Create a Django Project... more like creating a waste of your time. Five hours trying to get this setup. Tried seven different setups over the last 3 months.
AWS seems like an overly complicated system setup for enterprise class businesses and they thumb their nose at students trying to learn.
The customer service guy said "go watch youtube training videos" who tells a frustrated potential customer that?
Your salesman came to UW and talked a great game, discounting knowledge to get their product setup vs digitalocean or Heroku.
I tried to post in the AWS forums and I'm not allowed as a registered student developer?
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
It says to make a .ebextension file and add stuff to it but it doesn't say how to create a .ebextension file and mac says that files that begin with dots are reserved for system files so am I reading this wrong?
How can I proceed with this "simple server setup" that is neither simple nor setup if its missing info?
It is not .ebextensions file, the link you provided mentioned create a directory called .ebextensions, it is a folder name, and you can make it by:
mkdir .ebextensions
Then create a configuration file django.config in the folder, it would be
~/ebdjango/.ebextensions/django.config
Related
i am new in developing web apps so i might get confused a lot of times!
The problem is this:
I was developing with Pycharm son sort of basic social network, and at first when you sign up the users were created in local folder as JSON files and then i look foward to make a deployment, and i did it without problem using PythonAnywere (PA). Lets call my .py file "server.py" where i have the whole thing.
Then i started looking for some cloud service and I ended modifying everything in order to work with Mongodb Atlas and it was a complete success. I made a lot of local test using Pycharm and everything is OK, the users are now created on cloud service.
My problem is that i would like to make a deployment test with that Mongodb service version, and i was trying to use (PA) again but this time its give me a lot of errors.
Note: i already install all the requirements in (PA) from pip freeze requirements.txt
Is there a problem with PA and MongoDB? is ther any other better option?
Should it run ok if the first version of "server.py" was ok?
I just replaced that file with new one, that was runnning perfect on localhost.
If you need more info just tell me, i am very new in this.
Thanks a lot
I am working on a project which also contains a got repo initialized in it, we are multiple people working on same project but on different branches,my scenario is one of my friends pushes code to his branch then i pull that code from his branch so now i am having merged code(his and mine) now i push the code to my branch that contains final code.
Now the problem is when i pulled code from his branch then my django server isn't starting, i think there is a directory issue, one more problem is when is witch to project view in pycharm it shows limited files with yellowish background and when i switch to project files it shows all files i am attaching both pictures
My project directory
project View
Project_files_vies
my apologies, for what might be a rather simple and amateur set of questions.
I recently was voluntold (more like told) to absorb a django/python project that was developed by someone else. That someone else has left, and now I have to pick this up and run with it as there is no other backup.
Being a university student (intern at work for another 12 mos), I don't think this experience will go to waste AT ALL so I'm happy to be involved, but because this is production and in use today I need to ramp up rather quickly.
// sordid_tale
I am new to Python, Django, Anaconda, PostGreSQL and the world. I know some coding from my first two years, and I've been reading through books to get up to speed.
Current scenario:
Project deployed in production server (windows 2012)
project has an open connection to postgresql and publishes a website used by multiple people across the firm to upload math analytics for reporting.
i started the project up using the python manage.py runserver 123.123.22.22:8000 which started the DEVELOPMENT server and sent me a big ol' warning sign saying don't do this in production.
so i took it down lol. Now trying to figure out how to run in production.
looks like gunicorn and uwsgi are two ways to start the production environment once deployment is complete.
but then I searched on the server folders for gunicorn, uwsgi but got no returns. Running gunicorn and uwsgi returns command is not recognized.
I cannot find any *.wsgi files within the server
Also noted there might be an APACHE dependency, but I couldn't find any apache files in program files.
Q) With above info - is it fair to say the developer never really "promoted" the code to production and was just using the runserver command to get things going on prod server?
Q) Users on their own desktops try to browse to 123.123.22.22 to access site - but they get an error. But browsing to 123.123.22.22:8000 gets them to the site. I read that for HTTP, you need to have a port 80 defined when running server. So python manage.py runserver 123.123.22.22:80. But this gives me an error I don't have privs to run this. To rectify I opened command prompt in Admin mode, but still got the same error. Any assistance?
Once again sincere apologies if the questions are too basic. I am trying to learn a new coding language, but also having to manage the existing prod environment for business continuity, while also trying to get Python, Anaconda, PostGres setup on my local machine for testing and training.
Many thanks!
I have a Django 1.6 project (stored in a Bitbucket Git repo) that I wish to host on a VPS.
The idea is that when someone purchases a copy of the software I have written, I can type in a few simple commands that will take a designated copy of the code from Git, create a new instance of the project with its own subdomain (e.g. <customer_name>.example.com), and create a new Postgres database (on the same server).
I should hopefully be able to create and remove these 'instances' easily.
What's the best way of doing this?
I've looked into writing scripts using some sort of combination of Supervisor/Gnunicorn/Nginx/Fabric etc. Other options could be something more serious like using Docker or Vagrant. I've also looked into various PaaS options too.
Thanks in advance.
(EDIT: I have looked at the following services/things: Dokku (can't use Heroku due to data constraints), Vagrant (inc Puppet), Docker, Fabfile, Deis, Cherokee, Flynn (under dev))
If I was doing it (and I did a similar thing with a PHP application I inherited), I'd have a fabric command that allows me to provision a new instance.
This could be broken up into the requisite steps (check-out code, create database, syncdb/migrate, create DNS entry, start web server).
I'd probably do something sane like use the DNS entry as the database name: or at least use a reversible function to do that.
You could then string these together to easily create a new instance.
You will also need a way to tell the newly created instance which database and domain name they needed to use. You could have the provisioning script write some data to a file in the checked out repository that is then used by Django in it's initialisation phase.
I had to develop something in Django (new to it) and it went quite smoothly. But after delivering to the client I had to setup a second "testing" instance so that any new features would be tested on it to avoid errors in the production one.
And I have only one apache server at my disposal and this breed some weird things.
I run my applications by adding path to the wsgi script in the httpd.conf.
It works fine, the new server is up and running. it used a different database so all is good. But it doesent use the views and models from its folder, it used the ones from the original app instead and I just ran out of ideas on how to fix it. Please help me in some way.
I believe that your two django projects should be deployed on your staging and production server as two completely seperate projects/directories.
If you use version control, this could be as trivial as branching your main project and adding the new features. After you have two seperate code bases you can put your fixed branch on your production server.
Your project can exist anywhere on your server. You could set up a staging subdomain and create a virtualhost that points to your django project branch
http://httpd.apache.org/docs/2.2/vhosts/examples.html
This would allow both projects to exist on the same server, without one project having to be aware of the other