Re: [mezzanine-users] What's wrong in my local_settings / how to do basic deploy to aws
This post helped me in setting up my user for the ec2 instance. http://www.crmarsh.com/aws/ On Wed, Apr 18, 2018 at 12:56 PM, Wolfgang Mwrote: > Yes, now I can ssh in. (Couldn't before without 'ssh -i path/to/key' so I > added my .pem to my .ssh/config.) > > I did a lot of troubleshooting with my environment, not sure the exact > formula but something to do with fabric+future+python2.7 has allowed fabric > to work. > > Now I can run 'fab all', but after the first line '$ apt-get update -y -q > ->' , I am prompted for my "[IP] Login password for 'ec2-user' " which is > the standard instance user name. AWS by default doesn't provide a password > and handles authentication through a .pem private key, this means I've > never set a password for ec2-user. > > I've messaged Matt Mansour to see if in his experience with AWS he has to > configure anything specifically. I've tried setting a password for ec2-user > within my instance and using that but it doesn't pass. > > Thanks for the help above, I've sorted out my ssh and fabric issues, but > now I think I'm dealing with more aws specific configuration than anything > else. > > On Monday, April 16, 2018 at 10:57:24 AM UTC-5, Kenneth Bolton wrote: > >> You can `ssh ec2-user@54.219.###.###` no problem? >> >> >> -- >> Ken Bolton >> > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to mezzanine-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] What's wrong in my local_settings / how to do basic deploy to aws
Yes, now I can ssh in. (Couldn't before without 'ssh -i path/to/key' so I added my .pem to my .ssh/config.) I did a lot of troubleshooting with my environment, not sure the exact formula but something to do with fabric+future+python2.7 has allowed fabric to work. Now I can run 'fab all', but after the first line '$ apt-get update -y -q ->' , I am prompted for my "[IP] Login password for 'ec2-user' " which is the standard instance user name. AWS by default doesn't provide a password and handles authentication through a .pem private key, this means I've never set a password for ec2-user. I've messaged Matt Mansour to see if in his experience with AWS he has to configure anything specifically. I've tried setting a password for ec2-user within my instance and using that but it doesn't pass. Thanks for the help above, I've sorted out my ssh and fabric issues, but now I think I'm dealing with more aws specific configuration than anything else. On Monday, April 16, 2018 at 10:57:24 AM UTC-5, Kenneth Bolton wrote: > You can `ssh ec2-user@54.219.###.###` no problem? > > > -- > Ken Bolton > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] What's wrong in my local_settings / how to do basic deploy to aws
Hi Wolfgang, I wrote a tutorial on doing test deployments from local to a local Vagrant virtual-machine at http://bscientific.org/blog/mezzanine-fabric-git-vagrant-joy/ which covers your questions about git. You can definitely use a local git repository for deployment *if* the server/remote can find a network route to the local repo. The tutorial is for older versions of Mezz, but the fundamental ideas have not changed. More answers inline below. --ken Wolfgang Mwrites: Hello, I saw the recent posts about aws but didn't want to hijack a thread with my own questions. I have an app I really like that I've made with mezzanine, can someone point out what's wrong with my deployment. I'm following the standard deployment in the tutorials and am trying to get it online using aws, either ec2 or elasticbeanstalk. Any tutorial for running Django on EC2 should provide a lot of insight. There is nothing particularly special about Mezzanine. Also if someone can explain how git works for a deployment that would be great. Do I push my local MyProject folder contents to a repository, then pull that to the ec2, (and separarely transfer local_settings.py to keep secret keys off of git)? Or does the fabric deployment suggest I handle it all remotely and not within an ec2 instance, and if so how does git integrate with fab? The fabfile is designed to run on whatever machine(s) you are using for development work, but that can cover a lot of different locations. Nothing prevents you from doing development work in prod except perhaps self-preservation. local_settings.py # This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. DEBUG = False # Make these unique, and don't share it with anybody. SECRET_KEY = "12345SecretKeyHidden54321" NEVERCACHE_KEY = "12345NevercacheKeyHidden54321" DATABASES = { "default": { # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "postgresql_psycopg2", #django.db.backends.sqlite3 This is your local database. Unless you have a postgresql database running locally, change it to back to `sqlite3`. N.B. these need to be fully qualified, so `django.db.backends.postgresql_psycopg2`. # DB name or path to database file if using sqlite3. "NAME": "", #dev.db Change the above value back to `dev.db` unless you are definitely using postgresql locally, in which case the value should be the name of the database. If you don't know, just use SQLite! If you are using SQLite, comment out the `USER`, `PASSWORD`, `HOST`, and `PORT` keys below. # Not used with sqlite3. "USER": "", # Not used with sqlite3. "PASSWORD": "", # Set to empty string for localhost. Not used with sqlite3. "HOST": "", # Set to empty string for default. Not used with sqlite3. "PORT": "", } } ### # DEPLOY SETTINGS # ### # Domains for public site ALLOWED_HOSTS = ["myCustomRoute53domain.me"] This should be fine. You might also add `127.0.0.1` and/or `localhost` for debugging on "locally" on your server. # These settings are used by the default fabfile.py provided. # Check fabfile.py for defaults. FABRIC = { "DEPLOY_TOOL": "git", # Deploy with "git", "hg", or "rsync" "SSH_USER": "ec2-user", # VPS SSH username "HOSTS": ["54.219.###.###"], # The IP address of your VPS "DOMAINS": ALLOWED_HOSTS, # Edit domains in ALLOWED_HOSTS "REQUIREMENTS_PATH": "requirements.txt", # Project's pip requirements "LOCALE": "en_US.UTF-8", # Should end with ".UTF-8" "DB_PASS": "default", # Live database password "ADMIN_PASS": "default", # Live admin user password "SECRET_KEY": SECRET_KEY, "NEVERCACHE_KEY": NEVERCACHE_KEY, } Yellow are the important questions I have, red is values I'm unsure of. I Color is a terrible way to differentiate. I'm reading and writing in emacs, and it is all blue-on-beige for me. My browser doesn't use Javascript, so I can't read the message through-the-web. Damn these walled gardens! know these are some simple questions, so I'm hoping to figure this out and do a tutorial on it for other beginners. Right now I have my app on my home computer, and I have an ec2 instance open on aws, which I've connected to using the aws CLI to install mezzanine and git in preparation. Thanks in The fabfile installs mezzanine and git as part of the build process. Installing them yourself isn't gonna get you anywhere, but sure is a good exercise. advance to anyone who can help. So far whatever values I put only result in "fab all" and other fab commands hanging with no response. You can `ssh ec2-user@54.219.###.###` no problem? -- Ken Bolton -- You received this message because you are subscribed to the Google Groups
[mezzanine-users] What's wrong in my local_settings / how to do basic deploy to aws
Hello, I saw the recent posts about aws but didn't want to hijack a thread with my own questions. I have an app I really like that I've made with mezzanine, can someone point out what's wrong with my deployment. I'm following the standard deployment in the tutorials and am trying to get it online using aws, either ec2 or elasticbeanstalk. Also if someone can explain how git works for a deployment that would be great. Do I push my local MyProject folder contents to a repository, then pull that to the ec2, (and separarely transfer local_settings.py to keep secret keys off of git)? Or does the fabric deployment suggest I handle it all remotely and not within an ec2 instance, and if so how does git integrate with fab? local_settings.py > # This file is exec'd from settings.py, so it has access to and can > # modify all the variables in settings.py. > > DEBUG = False > > # Make these unique, and don't share it with anybody. > SECRET_KEY = "12345SecretKeyHidden54321" > NEVERCACHE_KEY = "12345NevercacheKeyHidden54321" > > DATABASES = { > "default": { > # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". > "ENGINE": "postgresql_psycopg2", #django.db.backends.sqlite3 > # DB name or path to database file if using sqlite3. > "NAME": "", #dev.db > # Not used with sqlite3. > "USER": "", > # Not used with sqlite3. > "PASSWORD": "", > # Set to empty string for localhost. Not used with sqlite3. > "HOST": "", > # Set to empty string for default. Not used with sqlite3. > "PORT": "", > } > } > > ### > # DEPLOY SETTINGS # > ### > > # Domains for public site > ALLOWED_HOSTS = ["myCustomRoute53domain.me"] > > # These settings are used by the default fabfile.py provided. > # Check fabfile.py for defaults. > > FABRIC = { > "DEPLOY_TOOL": "git", # Deploy with "git", "hg", or "rsync" > "SSH_USER": "ec2-user", # VPS SSH username > "HOSTS": ["54.219.###.###"], # The IP address of your VPS > "DOMAINS": ALLOWED_HOSTS, # Edit domains in ALLOWED_HOSTS > "REQUIREMENTS_PATH": "requirements.txt", # Project's pip requirements > "LOCALE": "en_US.UTF-8", # Should end with ".UTF-8" > "DB_PASS": "default", # Live database password > "ADMIN_PASS": "default", # Live admin user password > "SECRET_KEY": SECRET_KEY, > "NEVERCACHE_KEY": NEVERCACHE_KEY, > } > > Yellow are the important questions I have, red is values I'm unsure of. I know these are some simple questions, so I'm hoping to figure this out and do a tutorial on it for other beginners. Right now I have my app on my home computer, and I have an ec2 instance open on aws, which I've connected to using the aws CLI to install mezzanine and git in preparation. Thanks in advance to anyone who can help. So far whatever values I put only result in "fab all" and other fab commands hanging with no response. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.