Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
It's working now with '3º fail' that I describe. I'm using fake_migrate_all with previews version and migrate with new version Thx for all helpers! Em quarta-feira, 9 de julho de 2014 19h00min33s UTC-3, Diogo Munaro escreveu: I'm with some problems here... I really hate .table files. That's my deploy routine: 1. download web2py from src 2. get my application from git and put inside web2py 3. remove some unused folders 4. backup my database 5. migrate my database structure with python web2py.py -S app -M -R anyscript.py *(that's the point!!)* 6. if ok, finished, else restore backup and last code 5 is my problem. I have a database structure and a lot of data but new code come with new table structure (that needs database migration). So I have some fails: - If I maintain .table files into databases folder on localhost, than the hash is different from production hash (because connection is different). Solution: rename .table files for new db._uri_hash (It's not so beautiful) - If I set migrate=False I need to do migrations setting sql into my mysql database (not good and I'm doing by now). - If I not mantain .table files I need fake_migrate from previews deploy and than migrate. Looks good but need a lot of extra work and I don't know if it work. What's the best way? Are there new suggestions? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
I'm with some problems here... I really hate .table files. That's my deploy routine: 1. download web2py from src 2. get my application from git and put inside web2py 3. remove some unused folders 4. backup my database 5. migrate my database structure *(that's the point!!)* 6. if ok, finished, else restore backup and last code 5 is my problem. I have a database structure and a lot of data but new code come with new table structure (that needs database migration). So I have some fails: - If I maintain .table files into databases folder on localhost, than the hash is different from production hash (because connection is different). Solution: rename .table files for new db._uri_hash (It's not so beautiful) - If I set migrate=False I need to do migrations setting sql into my mysql database (not good and I'm doing by now). - If I not mantain .table files I need fake_migrate from previews deploy and than migrate. Looks good but need a lot of extra work and I don't know if it work. What's the best way? Are there new suggestions? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
Thx massimo... I will plain a deploy structure and then I'll post here. Perhaps web2py migration just need read database structure and view diff between database structure and model structure. Have you thought about that? It sound great for deploy! Couldn't be? 2014-05-27 1:26 GMT-03:00 Massimo Di Pierro massimo.dipie...@gmail.com: If migrate_enabled=False then .table files are ignored. You can use command line tools. If you create a applications/yourapp/DISABLED file, your app is temporarily disabled. If you run python web2py.py -S web2py -M -R anyscript.py your script anyscript.py will run as if it were a controller. On Monday, 26 May 2014 10:54:38 UTC-5, Diogo Munaro wrote: Thx Massimo, but I need other .tables inside deploy version? i.e: I have my production version with x db structure, but my new production version have x+1 db structure. I need x .tables inside my deploy? Could I make migrate without access page? Could I use any command line tools? 2014-05-26 12:40 GMT-03:00 Massimo Di Pierro massimo.dipie...@gmail.com : They are automatic in web2py. They only problem you may incur in is that if you have multiple web2py instances accessing the server, multiple instances may initiate the migrations concurrently. Normally you handle this at the application level. You set migrate_enabled=False and when you deploy a new version of the app you first disable the app (so users cannot access it during migration) then set migrate_enabled=True and after the migration is completed you restore migrate_enabled=False and and enable the app again to users. http://web2py.com/books/default/chapter/29/06/the- database-abstraction-layer?search=migrate_enabled%3DFalse On Saturday, 24 May 2014 10:47:38 UTC-5, Diogo Munaro wrote: But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, Massimo Di Pierro massimo.dipie...@gmail.com escreveu: There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME) s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From:http://blog.uptill3.com/2 012/08/25/python-on-elastic-beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices. com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards
Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
I do not know would be helpful, but there is recipe for Beanstalk. Please use the Google translater, because it is Japanese. http://docs1.erp2py.com/web2py_deploy/aws_beanstalk/aws_beanstalk.html#id4 2014年5月24日土曜日 12時47分38秒 UTC-3 Diogo Munaro: But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, Massimo Di Pierro massimo@gmail.comjavascript: escreveu: There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME) s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From:http://blog.uptill3.com/2012/08/25/python-on-elastic- beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices. com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/qR6tx0Sa6i0/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
They are automatic in web2py. They only problem you may incur in is that if you have multiple web2py instances accessing the server, multiple instances may initiate the migrations concurrently. Normally you handle this at the application level. You set migrate_enabled=False and when you deploy a new version of the app you first disable the app (so users cannot access it during migration) then set migrate_enabled=True and after the migration is completed you restore migrate_enabled=False and and enable the app again to users. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=migrate_enabled%3DFalse On Saturday, 24 May 2014 10:47:38 UTC-5, Diogo Munaro wrote: But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, Massimo Di Pierro massimo.dipie...@gmail.com escreveu: There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME) s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From:http://blog.uptill3.com/2012/08/25/python-on-elastic- beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices. com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/qR6tx0Sa6i0/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit
Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
Thx Massimo, but I need other .tables inside deploy version? i.e: I have my production version with x db structure, but my new production version have x+1 db structure. I need x .tables inside my deploy? Could I make migrate without access page? Could I use any command line tools? 2014-05-26 12:40 GMT-03:00 Massimo Di Pierro massimo.dipie...@gmail.com: They are automatic in web2py. They only problem you may incur in is that if you have multiple web2py instances accessing the server, multiple instances may initiate the migrations concurrently. Normally you handle this at the application level. You set migrate_enabled=False and when you deploy a new version of the app you first disable the app (so users cannot access it during migration) then set migrate_enabled=True and after the migration is completed you restore migrate_enabled=False and and enable the app again to users. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=migrate_enabled%3DFalse On Saturday, 24 May 2014 10:47:38 UTC-5, Diogo Munaro wrote: But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, Massimo Di Pierro massimo.dipie...@gmail.com escreveu: There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME)s: %(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From:http://blog.uptill3.com/2012/08/25/python-on-elastic- beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices. com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/ topic/web2py/qR6tx0Sa6i0/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)
Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
If migrate_enabled=False then .table files are ignored. You can use command line tools. If you create a applications/yourapp/DISABLED file, your app is temporarily disabled. If you run python web2py.py -S web2py -M -R anyscript.py your script anyscript.py will run as if it were a controller. On Monday, 26 May 2014 10:54:38 UTC-5, Diogo Munaro wrote: Thx Massimo, but I need other .tables inside deploy version? i.e: I have my production version with x db structure, but my new production version have x+1 db structure. I need x .tables inside my deploy? Could I make migrate without access page? Could I use any command line tools? 2014-05-26 12:40 GMT-03:00 Massimo Di Pierro massimo.dipie...@gmail.com: They are automatic in web2py. They only problem you may incur in is that if you have multiple web2py instances accessing the server, multiple instances may initiate the migrations concurrently. Normally you handle this at the application level. You set migrate_enabled=False and when you deploy a new version of the app you first disable the app (so users cannot access it during migration) then set migrate_enabled=True and after the migration is completed you restore migrate_enabled=False and and enable the app again to users. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=migrate_enabled%3DFalse On Saturday, 24 May 2014 10:47:38 UTC-5, Diogo Munaro wrote: But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, Massimo Di Pierro massimo.dipie...@gmail.com escreveu: There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME) s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From:http://blog.uptill3.com/2012/08/25/python-on-elastic- beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices. com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users
[web2py] Re: AWS Elastic Beanstalk installation Recipe
There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME)s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From: http://blog.uptill3.com/2012/08/25/python-on-elastic-beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe
But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, Massimo Di Pierro massimo.dipie...@gmail.com escreveu: There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME) s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From:http://blog.uptill3.com/2012/08/25/python-on-elastic- beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices. com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/qR6tx0Sa6i0/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: AWS Elastic Beanstalk installation Recipe
Hey Massimo, and how could I replace command: django-admin.py syncdb --noinput ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME)s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From: http://blog.uptill3.com/2012/08/25/python-on-elastic-beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: AWS Elastic Beanstalk installation Recipe
The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME)s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From:http://blog.uptill3.com/2012/08/25/python-on-elastic-beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: AWS Elastic Beanstalk installation Recipe
Thank you very much. On Thursday, July 25, 2013 8:53:33 PM UTC+8, Massimo Di Pierro wrote: The instructions should be almost identical except that: 1) you do not pip install Django 2) you do not ever call django-admin 3) instead you download and unzip web2py. The web2py folder plays the role of the mysite folder in the example 4) you do not edit any django config file (there is no django!) 5) instead you edit db.py and you replace db= DAL(...) with import os uri = “mysql://%(RDS_USERNAME)s:%(RDS_PASSWORD)s@%(RDS_HOSTNAME)s:%(RDS_PORT)s/%(RDS_DB_NAME)s” % os.environ db = DAL(uri, pool_size=10) session.connect(request, response db=db) # sessions in DB! 6) before you commit and push you must create a file web2py/application.py which contains FILE web2py/application.py import sys import os path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path] + [p for p in sys.path if not p == path] sys.stdout = sys.stderr import gluon.main application = gluon.main.wsgibase FILE This should work. If you try it please post your findings. Caveat 1. You must get web2py from web2py_src.zip from the web site and not from the Git report else the web2py git repo will conflict with the git repo you are supposed to create according to this tutorial. Caveat 2. From: http://blog.uptill3.com/2012/08/25/python-on-elastic-beanstalk.html It's critical to understand that the Elastic Beanstalk images are all ephemeral, in the 'old' style of AWS AMIs. This means that nothing on an instances filesystem will survive through a deployment, redeployment, or stoppage of the environment/instance. This means that session/tickets/uploads must all go to the file system. web2py admin will be useful. You also needs to setup sticky sessions and I am not sure whether AWS does it automatically or not. On Wednesday, 17 July 2013 11:14:20 UTC-5, Aladdin Teng wrote: Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: AWS Elastic Beanstalk installation Recipe
Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: AWS Elastic Beanstalk installation Recipe
Hi Massimo Big fans of web2py here in CST. We would look at using Red Hat, Openshift, but we have to host in Europe. I think one of the problems is web2py is so easy to set up on ubuntu, eb uses Amazon Linux so I am probably struggling with stuff I never ad to worry about. Best Regardws Michael --
[web2py] Re: AWS Elastic Beanstalk installation Recipe
I will try a demo asap but I do not have an account so it will take a tille time. In principle everything in eb is not django specific and should work with web2py almost out of them box. On Tuesday, 9 October 2012 11:42:35 UTC-5, CST International Mike wrote: Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael --