From d400401e9cbe6f6ff6e84525b224ff9fa0eaa6fc Mon Sep 17 00:00:00 2001 From: jovanchohan Date: Fri, 3 May 2013 09:21:57 -0700 Subject: [PATCH 01/42] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b0b48a7..df73d63 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,8 @@ based on Django. ## Prerequisites ## - Python 2.7 -- Django 1.5 (get the tar ball here: https://www.djangoproject.com/download/1.5.1/tarball/) +- Django 1.5 (get the tar ball here: https://www.djangoproject.com/download/1.5.1/tarball/) or + run "easy_install django" - Git - Expect (http://downloads.sourceforge.net/project/expect/Expect/5.45/expect5.45.tar.gz or ```apt-get install expect```) From 2dbaaf7aafed5b247eee53ce7b0933e72aeaab5d Mon Sep 17 00:00:00 2001 From: Chris Bunch Date: Wed, 8 May 2013 09:51:10 -0700 Subject: [PATCH 02/42] clarified documentation on readme --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index df73d63..9983c9f 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,7 @@ are not familiar with general cloud principles or those who are not comfortable working with a traditional command line interface can get started with deploying AppScale clouds. -AppsCake has been developed using the Python programming language and is -based on Django. +AppsCake has been developed using the Python programming language and uses Django. ## Prerequisites ## - Python 2.7 @@ -23,11 +22,12 @@ based on Django. - Expect (http://downloads.sourceforge.net/project/expect/Expect/5.45/expect5.45.tar.gz or ```apt-get install expect```) -# Tools Install Process ## -Run ```bash get_tools.sh```. +## Tools Install Process ## +Run ```bash get_tools.sh```, which downloads the AppScale Tools and puts them in the +appscake directory. Next, install the AppScale Tools: ### On an AppScale Image ### -Install the tools for python2.7 by going into appscale/tools/src_install and running +Install the tools for Python 2.7 by going into appscale-tools/src_install and running ```bash appscale_install.sh``` ### For Mac OSX ### @@ -39,7 +39,7 @@ Install the tools by going into appscale-tools/debian and running ```bash appscale_install.sh``` ### Source Install ### -Install the tools for python2.7 by going into appscale/tools/src_install +Install the tools by going into appscale-tools/src_install and running ```bash appscale_install.sh``` # Running AppsCake # @@ -47,13 +47,13 @@ Install the tools for python2.7 by going into appscale/tools/src_install Go to http://localhost:8000 with a browser. -If you are running AppsCake on the image that you will be starting AppScale: +If you are running AppsCake on the image that you will be starting AppScale, start AppsCake by running: ```/usr/local/Python-2.7.3/python manage.py runserver :8090``` -Go to http://:8090 with a browser. +Go to `http://:8090` with a browser. ### Issues ### -Contact us if you have problems at: support@appscale.com or visit our IRC channel #appscale on freenode.net. +Contact us if you have problems at support@appscale.com or visit our IRC channel, #appscale on freenode.net. License From d77c95558281e193bff3ac389ef746f180355f39 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Wed, 8 May 2013 22:16:46 -0700 Subject: [PATCH 03/42] added docs for usage with virtualenv, added requirements.txt --- README.md | 37 +++++++++++++++++++++++++++++++++++++ requirements.txt | 5 +++++ 2 files changed, 42 insertions(+) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 9983c9f..19dbae5 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,43 @@ Go to `http://:8090` with a browser. ### Issues ### Contact us if you have problems at support@appscale.com or visit our IRC channel, #appscale on freenode.net. +### AppsCake w/ virtualenv ### +Prerequisites: +Python 2.6+ +pip/easy_install + +(1) Installing virtualenv & virtualenvwrapper (http://www.virtualenv.org/) via the terminal: +```sudo pip install virtualenvwrapper``` + +(2) Create the AppsCake virtualenv working directory via the terminal. +```virtualenv appscake``` + +(3) Open newly created virtualenv working directory. +```cd appscake``` + +(4) Activate the AppsCake virtualenv. +```source bin/activate``` + +(5) Installing dependencies: +```sudo apt-get install git-core``` +```sudo apt-get install expect``` +```sudo bin/pip install -r requirements.txt``` + +(6) Cloning the AppsCake repository: +```git clone https://github.com/AppScale/appscake.git``` + +(6) Installing the AppScale Tools: +``` +cd appscake +bash get_tools.sh +``` + +(7) Running AppsCake: +```pytohn manage.py runserver``` + + + + License ------- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..eab9b03 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +boto +django +soappy +pyyaml +termcolor From dc95d885d20adceaefe785c8c7b5db4eb033500b Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Wed, 8 May 2013 23:22:37 -0600 Subject: [PATCH 04/42] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 19dbae5..e8f9850 100644 --- a/README.md +++ b/README.md @@ -60,33 +60,33 @@ Prerequisites: Python 2.6+ pip/easy_install -(1) Installing virtualenv & virtualenvwrapper (http://www.virtualenv.org/) via the terminal: +1. Installing virtualenv & virtualenvwrapper (http://www.virtualenv.org/) via the terminal: ```sudo pip install virtualenvwrapper``` -(2) Create the AppsCake virtualenv working directory via the terminal. +2. Create the AppsCake virtualenv working directory: ```virtualenv appscake``` -(3) Open newly created virtualenv working directory. +3. Open newly created virtualenv working directory: ```cd appscake``` -(4) Activate the AppsCake virtualenv. +4. Activate the AppsCake virtualenv. ```source bin/activate``` -(5) Installing dependencies: +5. Installing dependencies: ```sudo apt-get install git-core``` ```sudo apt-get install expect``` -```sudo bin/pip install -r requirements.txt``` -(6) Cloning the AppsCake repository: +6. Cloning the AppsCake repository: ```git clone https://github.com/AppScale/appscake.git``` -(6) Installing the AppScale Tools: +7. Installing the AppScale Tools and requirements: ``` cd appscake bash get_tools.sh +sudo pip install -r requirements.txt ``` -(7) Running AppsCake: +8. Running AppsCake: ```pytohn manage.py runserver``` From 20da71722a45666d5d6fe9f437b657992bdc14de Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Wed, 8 May 2013 23:23:39 -0600 Subject: [PATCH 05/42] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e8f9850..3927dc6 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,10 @@ pip/easy_install ```source bin/activate``` 5. Installing dependencies: -```sudo apt-get install git-core``` -```sudo apt-get install expect``` +``` +sudo apt-get install git-core +sudo apt-get install expect +``` 6. Cloning the AppsCake repository: ```git clone https://github.com/AppScale/appscake.git``` From 55c274e451fe23d00dd9d90d5c2c53ebc6353661 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Wed, 8 May 2013 23:26:43 -0600 Subject: [PATCH 06/42] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3927dc6..79e21c0 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,10 @@ Go to `http://:8090` with a browser. ### Issues ### Contact us if you have problems at support@appscale.com or visit our IRC channel, #appscale on freenode.net. -### AppsCake w/ virtualenv ### -Prerequisites: -Python 2.6+ -pip/easy_install +*** + +# AppsCake w/ virtualenv # +Prerequisites:Python 2.6+ , pip/easy_install 1. Installing virtualenv & virtualenvwrapper (http://www.virtualenv.org/) via the terminal: ```sudo pip install virtualenvwrapper``` From 5529c0514e73c1773ba25fee7f230f988204ecf5 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:13:42 -0600 Subject: [PATCH 07/42] Update README.md --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79e21c0..051f41b 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,19 @@ Prerequisites:Python 2.6+ , pip/easy_install ```sudo pip install virtualenvwrapper``` 2. Create the AppsCake virtualenv working directory: -```virtualenv appscake``` +``` +virtualenv appscake-env +``` 3. Open newly created virtualenv working directory: -```cd appscake``` +``` +cd appscake +``` 4. Activate the AppsCake virtualenv. -```source bin/activate``` +``` +source bin/activate +``` 5. Installing dependencies: ``` From 4f72ace995e80020335e38e38f453f3a45186e7d Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:14:07 -0600 Subject: [PATCH 08/42] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 051f41b..37636ae 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,9 @@ sudo apt-get install expect ``` 6. Cloning the AppsCake repository: -```git clone https://github.com/AppScale/appscake.git``` +``` +git clone https://github.com/AppScale/appscake.git +``` 7. Installing the AppScale Tools and requirements: ``` From ccb79a59b2d653ee0ebee77e6c997e228b183383 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:14:33 -0600 Subject: [PATCH 09/42] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37636ae..0c54a1f 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,9 @@ Contact us if you have problems at support@appscale.com or visit our IRC channel Prerequisites:Python 2.6+ , pip/easy_install 1. Installing virtualenv & virtualenvwrapper (http://www.virtualenv.org/) via the terminal: -```sudo pip install virtualenvwrapper``` +``` +sudo pip install virtualenvwrapper +``` 2. Create the AppsCake virtualenv working directory: ``` From 2edef365244e38d0ffec2ab4e75c66aeb8a5ebf7 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 11:17:44 -0700 Subject: [PATCH 10/42] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c54a1f..376b1fa 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ cd appscake source bin/activate ``` -5. Installing dependencies: +5. Installing dependencies for debian systems: ``` sudo apt-get install git-core sudo apt-get install expect From 525d26c4e1caefd1b310fe0367d6e1d99af6986e Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 11:21:29 -0700 Subject: [PATCH 11/42] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 376b1fa..12b75dd 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ cd appscake source bin/activate ``` -5. Installing dependencies for debian systems: +5. Installing dependencies for debian systems -- for Mac OSX ensure git and expect are installed in your path: ``` sudo apt-get install git-core sudo apt-get install expect From d4c697646c83e0185f7b5b6241507501ad7c9003 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:22:02 -0600 Subject: [PATCH 12/42] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12b75dd..482cddd 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,9 @@ sudo pip install -r requirements.txt ``` 8. Running AppsCake: -```pytohn manage.py runserver``` +``` +python manage.py runserver +``` From c01a25b06c0f06bec9b8654404f79860c36b011c Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:23:47 -0600 Subject: [PATCH 13/42] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 482cddd..16e5723 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ sudo pip install -r requirements.txt python manage.py runserver ``` - +9. Navigate to the URL returned from the command above to use AppsCake. From 7d9434963042f6640e304298db351473f7de2500 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:27:58 -0600 Subject: [PATCH 14/42] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 16e5723..4f020ca 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,9 @@ Contact us if you have problems at support@appscale.com or visit our IRC channel *** # AppsCake w/ virtualenv # -Prerequisites:Python 2.6+ , pip/easy_install +Prerequisites: Python 2.6+, pip/easy_install -1. Installing virtualenv & virtualenvwrapper (http://www.virtualenv.org/) via the terminal: +1. Installing virtualenv/virtualenvwrapper via the terminal: ``` sudo pip install virtualenvwrapper ``` @@ -75,7 +75,7 @@ virtualenv appscake-env cd appscake ``` -4. Activate the AppsCake virtualenv. +4. Activate the AppsCake virtualenv: ``` source bin/activate ``` From 9327731f0a8155d659bc5cbe02d4892521a38311 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:29:19 -0600 Subject: [PATCH 15/42] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f020ca..54cbaf6 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ cd appscake source bin/activate ``` -5. Installing dependencies for debian systems -- for Mac OSX ensure git and expect are installed in your path: +5. Installing dependencies for debian systems -- for Mac OSX ensure git and expect are installed in your path (if not use homebrew to install): ``` sudo apt-get install git-core sudo apt-get install expect @@ -100,7 +100,7 @@ sudo pip install -r requirements.txt 8. Running AppsCake: ``` -python manage.py runserver +python manage.py runserver ``` 9. Navigate to the URL returned from the command above to use AppsCake. From f3c17c8dfad90d1a7acbf4ed7b05d0c8c4f31152 Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:29:52 -0600 Subject: [PATCH 16/42] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54cbaf6..34eeecb 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ cd appscake source bin/activate ``` -5. Installing dependencies for debian systems -- for Mac OSX ensure git and expect are installed in your path (if not use homebrew to install): +5. Installing dependencies for debian systems -- for Mac OSX ensure git and expect are installed in your path (if not use homebrew to install): ``` sudo apt-get install git-core sudo apt-get install expect From 2beb19eb9278a43db6eedfc45719758398ef469d Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Thu, 9 May 2013 12:30:36 -0600 Subject: [PATCH 17/42] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34eeecb..ac7cc0c 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ cd appscake source bin/activate ``` -5. Installing dependencies for debian systems -- for Mac OSX ensure git and expect are installed in your path (if not use homebrew to install): +5. Installing dependencies for debian systems -- for Mac OSX ensure git and expect are installed in your path (if not use Homebrew to install): ``` sudo apt-get install git-core sudo apt-get install expect From 4d0408de7331ff1212685f8eded02b662712e40a Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Mon, 8 Jul 2013 15:16:39 -0700 Subject: [PATCH 18/42] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index eab9b03..9b1bcd8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ django soappy pyyaml termcolor +expect From 70bcd767cdda6c526da97f307e93aab6e8efdfda Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Mon, 8 Jul 2013 15:17:01 -0700 Subject: [PATCH 19/42] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9b1bcd8..e6ba62c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ django soappy pyyaml termcolor -expect + From 374ed5f28ff3d128ee2fbc9ec08f57e28543e44a Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Tue, 9 Jul 2013 08:55:18 -0700 Subject: [PATCH 20/42] small script to find the ip address of the deployment node --- get_my_ip.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 get_my_ip.py diff --git a/get_my_ip.py b/get_my_ip.py new file mode 100644 index 0000000..90aad4d --- /dev/null +++ b/get_my_ip.py @@ -0,0 +1,2 @@ +import socket +print socket.gethostbyname(socket.gethostname()) From 74b595417029ab78bf05d3f52edfbe6dc5365892 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Tue, 9 Jul 2013 15:18:43 -0700 Subject: [PATCH 21/42] A god config file to start appscake daemonized --- appscake.god | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 appscake.god diff --git a/appscake.god b/appscake.god new file mode 100644 index 0000000..012afa3 --- /dev/null +++ b/appscake.god @@ -0,0 +1,5 @@ +God.watch do |w| + w.name = "appscake" + w.start = "cd /root/appscake && python manage.py runserver `get_my_ip.py`:80" + w.keepalive +end \ No newline at end of file From 352d0bc6a915bc63cab0e3a28438700e4ee11378 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Wed, 10 Jul 2013 08:25:42 -0700 Subject: [PATCH 22/42] invoke get_my_ip correctly --- appscake.god | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appscake.god b/appscake.god index 012afa3..c02bba7 100644 --- a/appscake.god +++ b/appscake.god @@ -1,5 +1,5 @@ God.watch do |w| w.name = "appscake" - w.start = "cd /root/appscake && python manage.py runserver `get_my_ip.py`:80" + w.start = "cd /root/appscake && python manage.py runserver `python get_my_ip.py`:80" w.keepalive end \ No newline at end of file From 0db43a56b105c95f12310ea8a4ec5decee6cf1d7 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Wed, 10 Jul 2013 15:04:59 -0700 Subject: [PATCH 23/42] nginx config file --- nginx_config | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 nginx_config diff --git a/nginx_config b/nginx_config new file mode 100644 index 0000000..da6267b --- /dev/null +++ b/nginx_config @@ -0,0 +1,30 @@ +upstream app_server { + server 127.0.0.1:8000 fail_timeout=0; +} + +server { + listen 80; + server_name _; + rewrite ^ https://$server_name$request_uri? permanent; +} + +server { + listen 443 ssl; + ssl on; + ssl_certificate server.crt; + ssl_certificate_key server.key; + client_max_body_size 4G; + keepalive_timeout 5; + root /root/appscake; + + location / { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_redirect off; + if (!-f $request_filename) { + proxy_pass http://app_server; + break; + } + } + error_page 500 502 503 504 /500.html; +} From 94ca96ea220aa7a3dc4e8c02e7a60348fc2e701f Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Wed, 10 Jul 2013 15:55:19 -0700 Subject: [PATCH 24/42] script to generate a self signed ssl cert for nginx --- generate_ssl_cert.py | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 generate_ssl_cert.py diff --git a/generate_ssl_cert.py b/generate_ssl_cert.py new file mode 100644 index 0000000..8d30761 --- /dev/null +++ b/generate_ssl_cert.py @@ -0,0 +1,50 @@ +class NginxCert(): + + # The path on the local filesystem where we can read and write + # AppScale deployment metadata. + LOCAL_NGINX_PATH = "/etc/nginx/" + + + @classmethod + def get_certificate_location(cls, keyname): + """Determines the location where the self-signed certificate for this + AppScale deployment can be found. + + Args: + keyname: A str that indicates the name of the SSH keypair that + uniquely identifies this AppScale deployment. + Returns: + A str that indicates where the self-signed certificate can be found. + """ + return cls.LOCAL_NGINX_PATH + keyname + "-cert.pem" + + + @classmethod + def get_private_key_location(cls, keyname): + """Determines the location where the private key used to sign the + self-signed certificate used for this AppScale deployment can be found. + + Args: + keyname: A str that indicates the name of the SSH keypair that + uniquely identifies this AppScale deployment. + Returns: + A str that indicates where the private key can be found. + """ + return cls.LOCAL_NGINX_PATH + keyname + "-key.pem" + + + @classmethod + def generate_ssl_cert(cls, keyname, is_verbose): + """Generates a self-signed SSL certificate that AppScale services can use + to encrypt traffic with. + + Args: + keyname: A str representing the SSH keypair name used for this AppScale + deployment. + is_verbose: A bool that indicates if we want to print out the certificate + generation to stdout or not. + """ + cls.shell("openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 " + \ + "-subj '/C=US/ST=Foo/L=Bar/O=AppScale/CN=appscale.com' " + \ + "-keyout {0} -out {1}".format(NginxCert.get_private_key_location(keyname), + NginxCert.get_certificate_location(keyname)), is_verbose, stdin=None) \ No newline at end of file From 2b3618e2f52e1320e7b279763bf308bc167bf983 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 07:59:25 -0700 Subject: [PATCH 25/42] properly generating ssl certs --- generate_ssl_cert.py | 14 +++++++++++--- nginx_config | 6 +++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/generate_ssl_cert.py b/generate_ssl_cert.py index 8d30761..5cbaf50 100644 --- a/generate_ssl_cert.py +++ b/generate_ssl_cert.py @@ -1,3 +1,5 @@ +import subprocess + class NginxCert(): # The path on the local filesystem where we can read and write @@ -34,7 +36,7 @@ def get_private_key_location(cls, keyname): @classmethod - def generate_ssl_cert(cls, keyname, is_verbose): + def generate_ssl_cert(cls, keyname): """Generates a self-signed SSL certificate that AppScale services can use to encrypt traffic with. @@ -44,7 +46,13 @@ def generate_ssl_cert(cls, keyname, is_verbose): is_verbose: A bool that indicates if we want to print out the certificate generation to stdout or not. """ - cls.shell("openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 " + \ + subprocess.call("openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 " + \ "-subj '/C=US/ST=Foo/L=Bar/O=AppScale/CN=appscale.com' " + \ "-keyout {0} -out {1}".format(NginxCert.get_private_key_location(keyname), - NginxCert.get_certificate_location(keyname)), is_verbose, stdin=None) \ No newline at end of file + NginxCert.get_certificate_location(keyname)), shell=True) + + def main(): + NginxCert.generate_ssl_cert('appscake') + + if __name__ == '__main__': + main() \ No newline at end of file diff --git a/nginx_config b/nginx_config index da6267b..68b7c28 100644 --- a/nginx_config +++ b/nginx_config @@ -4,15 +4,15 @@ upstream app_server { server { listen 80; - server_name _; + server_name 0.0.0.0; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443 ssl; ssl on; - ssl_certificate server.crt; - ssl_certificate_key server.key; + ssl_certificate appscake-cert.pem; + ssl_certificate_key appscake-key.pem; client_max_body_size 4G; keepalive_timeout 5; root /root/appscake; From cbd3f76a1b803578eabdf79b09cafd1c41ebc210 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 08:55:12 -0700 Subject: [PATCH 26/42] nginx config file changes --- appscake.god | 2 +- generate_nginx_config.py | 11 +++++++++++ generate_ssl_cert.py | 8 ++++---- nginx_config | 8 ++++---- 4 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 generate_nginx_config.py diff --git a/appscake.god b/appscake.god index c02bba7..59a7f7f 100644 --- a/appscake.god +++ b/appscake.god @@ -1,5 +1,5 @@ God.watch do |w| w.name = "appscake" - w.start = "cd /root/appscake && python manage.py runserver `python get_my_ip.py`:80" + w.start = "cd /root/appscake && python manage.py runserver `python get_my_ip.py`:8000" w.keepalive end \ No newline at end of file diff --git a/generate_nginx_config.py b/generate_nginx_config.py new file mode 100644 index 0000000..1395890 --- /dev/null +++ b/generate_nginx_config.py @@ -0,0 +1,11 @@ +import jinja2 +import socket + +my_public_ip = socket.gethostbyname(socket.gethostname()) + +template_contents = open('/root/appscake/nginx_config').read() +template = jinja2.Template(template_contents) +rendered_template = template.render(my_public_ip=my_public_ip) + +with open('/etc/nginx/sites-available/default', 'w') as file_handle: + file_handle.write(rendered_template) \ No newline at end of file diff --git a/generate_ssl_cert.py b/generate_ssl_cert.py index 5cbaf50..8b9c930 100644 --- a/generate_ssl_cert.py +++ b/generate_ssl_cert.py @@ -51,8 +51,8 @@ def generate_ssl_cert(cls, keyname): "-keyout {0} -out {1}".format(NginxCert.get_private_key_location(keyname), NginxCert.get_certificate_location(keyname)), shell=True) - def main(): - NginxCert.generate_ssl_cert('appscake') +def main(): + NginxCert.generate_ssl_cert('appscake') - if __name__ == '__main__': - main() \ No newline at end of file +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/nginx_config b/nginx_config index 68b7c28..d7d8650 100644 --- a/nginx_config +++ b/nginx_config @@ -1,18 +1,18 @@ upstream app_server { - server 127.0.0.1:8000 fail_timeout=0; + server {{ my_public_ip }}:8000 fail_timeout=0; } server { listen 80; - server_name 0.0.0.0; + server_name localhost; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443 ssl; ssl on; - ssl_certificate appscake-cert.pem; - ssl_certificate_key appscake-key.pem; + ssl_certificate /etc/nginx/appscake-cert.pem; + ssl_certificate_key /etc/nginx/appscake-key.pem; client_max_body_size 4G; keepalive_timeout 5; root /root/appscake; From 2039bfcf88c32e0b7aab60848d5fc3ca6ab6063f Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 10:56:22 -0700 Subject: [PATCH 27/42] changes to nginx config file --- nginx_config | 1 + 1 file changed, 1 insertion(+) diff --git a/nginx_config b/nginx_config index d7d8650..f588a04 100644 --- a/nginx_config +++ b/nginx_config @@ -10,6 +10,7 @@ server { server { listen 443 ssl; + server_name localhost; ssl on; ssl_certificate /etc/nginx/appscake-cert.pem; ssl_certificate_key /etc/nginx/appscake-key.pem; From dd4ed2cf6de3e5b218ebdf0c65406b6cd26339f8 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 11:32:59 -0700 Subject: [PATCH 28/42] added public ip address jinja template --- generate_nginx_config.py | 6 ++++-- nginx_config | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/generate_nginx_config.py b/generate_nginx_config.py index 1395890..627df99 100644 --- a/generate_nginx_config.py +++ b/generate_nginx_config.py @@ -1,11 +1,13 @@ import jinja2 +import os import socket -my_public_ip = socket.gethostbyname(socket.gethostname()) +my_public_ip = os.popen("curl -L http://metadata/computeMetadata/v1beta1/instance/network-interfaces/0/access-configs/0/external-ip").read() +my_private_ip = socket.gethostbyname(socket.gethostname()) template_contents = open('/root/appscake/nginx_config').read() template = jinja2.Template(template_contents) -rendered_template = template.render(my_public_ip=my_public_ip) +rendered_template = template.render(my_private_ip=my_private_ip, my_public_ip=my_public_ip) with open('/etc/nginx/sites-available/default', 'w') as file_handle: file_handle.write(rendered_template) \ No newline at end of file diff --git a/nginx_config b/nginx_config index f588a04..fdf79a5 100644 --- a/nginx_config +++ b/nginx_config @@ -1,16 +1,16 @@ upstream app_server { - server {{ my_public_ip }}:8000 fail_timeout=0; + server {{ my_private_ip }}:8000 fail_timeout=0; } server { listen 80; - server_name localhost; + server_name {{ my_public_ip }}; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443 ssl; - server_name localhost; + server_name {{ my_public_ip }}; ssl on; ssl_certificate /etc/nginx/appscake-cert.pem; ssl_certificate_key /etc/nginx/appscake-key.pem; From 549a0d47a4ea25a753c7a33e2a9b4c72896413d5 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 11:40:51 -0700 Subject: [PATCH 29/42] Changes to get public ip for nginx config --- nginx_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx_config b/nginx_config index fdf79a5..e2498c9 100644 --- a/nginx_config +++ b/nginx_config @@ -1,5 +1,5 @@ upstream app_server { - server {{ my_private_ip }}:8000 fail_timeout=0; + server {{ my_public_ip }}:8000 fail_timeout=0; } server { From ace85f8b31fc4efe799007af5718762115df7907 Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 12:05:20 -0700 Subject: [PATCH 30/42] python script to get external ip address --- get_my_public_ip.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 get_my_public_ip.py diff --git a/get_my_public_ip.py b/get_my_public_ip.py new file mode 100644 index 0000000..2f6f61a --- /dev/null +++ b/get_my_public_ip.py @@ -0,0 +1,3 @@ +import os + +print os.popen("curl -L http://metadata/computeMetadata/v1beta1/instance/network-interfaces/0/access-configs/0/external-ip").read() From 79457fa82948e385ba49ed4427af8143861a48dd Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 12:06:31 -0700 Subject: [PATCH 31/42] changed private ip to public ip --- appscake.god | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appscake.god b/appscake.god index 59a7f7f..461e53e 100644 --- a/appscake.god +++ b/appscake.god @@ -1,5 +1,5 @@ God.watch do |w| w.name = "appscake" - w.start = "cd /root/appscake && python manage.py runserver `python get_my_ip.py`:8000" + w.start = "cd /root/appscake && python manage.py runserver `python get_my_public_ip.py`:8000" w.keepalive end \ No newline at end of file From 561097c37709a5b3ab988dd492e3224c8a7eff3b Mon Sep 17 00:00:00 2001 From: DrOctogon Date: Thu, 11 Jul 2013 14:21:12 -0700 Subject: [PATCH 32/42] reverting public ip back to private ip --- appscake.god | 2 +- get_my_public_ip.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 get_my_public_ip.py diff --git a/appscake.god b/appscake.god index 461e53e..59a7f7f 100644 --- a/appscake.god +++ b/appscake.god @@ -1,5 +1,5 @@ God.watch do |w| w.name = "appscake" - w.start = "cd /root/appscake && python manage.py runserver `python get_my_public_ip.py`:8000" + w.start = "cd /root/appscake && python manage.py runserver `python get_my_ip.py`:8000" w.keepalive end \ No newline at end of file diff --git a/get_my_public_ip.py b/get_my_public_ip.py deleted file mode 100644 index 2f6f61a..0000000 --- a/get_my_public_ip.py +++ /dev/null @@ -1,3 +0,0 @@ -import os - -print os.popen("curl -L http://metadata/computeMetadata/v1beta1/instance/network-interfaces/0/access-configs/0/external-ip").read() From 3fd9b05fa02cba9b55e7348e16b822165eb92c75 Mon Sep 17 00:00:00 2001 From: Bitdeli Chef Date: Mon, 26 Aug 2013 19:11:26 +0000 Subject: [PATCH 33/42] Add a Bitdeli badge to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9983c9f..79b0586 100644 --- a/README.md +++ b/README.md @@ -62,3 +62,7 @@ This software is licensed under the [New BSD License][BSD]. For more information, read the file ``LICENSE``. [BSD]: http://opensource.org/licenses/BSD-3-Clause + + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/DrOctogon/appscake/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + From 2b79d417d96f41baaba7d7b1554bcc8acd006b23 Mon Sep 17 00:00:00 2001 From: Jovan Chohan Date: Wed, 4 Sep 2013 09:49:51 -0700 Subject: [PATCH 34/42] AppScake updates for appscale-tools compliance --- README.md | 21 +++------- debian/appscake_dependencies_install.sh | 51 +++++++++++++++++++++++++ get_tools.sh | 2 +- src/appscale_tools_thread.py | 6 +++ 4 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 debian/appscake_dependencies_install.sh diff --git a/README.md b/README.md index fd89355..c8ca246 100644 --- a/README.md +++ b/README.md @@ -24,23 +24,14 @@ AppsCake has been developed using the Python programming language and uses Djang ## Tools Install Process ## Run ```bash get_tools.sh```, which downloads the AppScale Tools and puts them in the -appscake directory. Next, install the AppScale Tools: +appscake directory. Next, install the AppScale Tools. -### On an AppScale Image ### -Install the tools for Python 2.7 by going into appscale-tools/src_install and running -```bash appscale_install.sh``` +Install the tools by going into appscale-tools/debian directory and running +```bash appscale_build.sh``` -### For Mac OSX ### -Install the tools by going into appscale-tools/osx and running -```bash appscale_install.sh``` - -### For Debian based systems ### -Install the tools by going into appscale-tools/debian and running -```bash appscale_install.sh``` - -### Source Install ### -Install the tools by going into appscale-tools/src_install and running -```bash appscale_install.sh``` +Next, install the tools dependencies by going into the appscake/debian directory +and running +```bash appscake_dependencies_install.sh``` # Running AppsCake # ```python2.7 manage.py runserver localhost:8000``` diff --git a/debian/appscake_dependencies_install.sh b/debian/appscake_dependencies_install.sh new file mode 100644 index 0000000..f5d53cc --- /dev/null +++ b/debian/appscake_dependencies_install.sh @@ -0,0 +1,51 @@ +# Script for installing AppScale Tools dependencies by source for Python2.7. +export PYTHON=python2.7 +if [ -d "/usr/local/Python-2.7.3/" ] +then + echo "Setting alias for Python2.7" + export PYTHON=/usr/local/Python-2.7.3/python +fi + +if [ -x $PYTHON ] +then + echo "Found python2.7" +else + echo "Did not find python2.7" + exit 1 +fi + +# Install setup tools. +curl https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz > setuptools-0.6c11.tar.gz +tar zxvf setuptools-0.6c11.tar.gz +cd setuptools-0.6c11 +$PYTHON setup.py install +cd .. + +# Install termcolor. +curl https://s3.amazonaws.com/appscale-build/termcolor-1.1.0.tar.gz > termcolor-1.1.0.tar.gz +tar zxvf termcolor-1.1.0.tar.gz +cd termcolor-1.1.0 +$PYTHON setup.py install +cd .. + +# Install boto. +git clone https://github.com/boto/boto.git +cd boto +$PYTHON setup.py install +cd .. + +# Install PyYAML. +curl https://s3.amazonaws.com/appscale-build/PyYAML-3.10.tar.gz > PyYAML-3.10.tar.gz +tar zxvf PyYAML-3.10.tar.gz +cd PyYAML-3.10 +$PYTHON setup.py install +cd .. + +# Install SOAPpy. +git clone https://github.com/kiorky/SOAPpy.git +cd SOAPpy +$PYTHON setup.py install +cd .. + +# Remove downloaded files. +rm -fdr PyYAML-3.10.tar.gz setuptools-0.6c11.tar.gz termcolor-1.1.0.tar.gz setuptools-0.6c11 termcolor-1.1.0 boto PyYAML-3.10 SOAPpy diff --git a/get_tools.sh b/get_tools.sh index 61f256e..18c958e 100644 --- a/get_tools.sh +++ b/get_tools.sh @@ -1,2 +1,2 @@ # Fetches the latest and greatest AppScale tools from github modified for Appscake. -git clone https://github.com/AppScale/appscale-tools.git appscale-tools --branch appscake +git clone https://github.com/AppScale/appscale-tools.git appscale-tools diff --git a/src/appscale_tools_thread.py b/src/appscale_tools_thread.py index 442f8ba..8d26b92 100644 --- a/src/appscale_tools_thread.py +++ b/src/appscale_tools_thread.py @@ -8,6 +8,12 @@ import threading sys.path.append(os.path.join(os.path.dirname(__file__),"../appscale-tools/lib")) + +# Since AppScake doesn't run the tools on the main thread, use a fake +# implementation of the signal class. +import fake_signal +sys.modules['signal'] = __import__('fake_signal').FakeSignal + from appscale_tools import AppScaleTools from custom_exceptions import BadConfigurationException import parse_args From 8d77f5a420def5aaa1e2000c695f2c616fc27ec3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 4 Sep 2013 10:51:49 -0700 Subject: [PATCH 35/42] style fixes and build script fix --- debian/appscake_dependencies_install.sh | 50 ++----------------------- src/appscale_tools_thread.py | 5 +-- src/fake_signal.py | 21 +++++++++++ 3 files changed, 27 insertions(+), 49 deletions(-) create mode 100644 src/fake_signal.py diff --git a/debian/appscake_dependencies_install.sh b/debian/appscake_dependencies_install.sh index f5d53cc..054139e 100644 --- a/debian/appscake_dependencies_install.sh +++ b/debian/appscake_dependencies_install.sh @@ -1,51 +1,9 @@ -# Script for installing AppScale Tools dependencies by source for Python2.7. -export PYTHON=python2.7 -if [ -d "/usr/local/Python-2.7.3/" ] -then - echo "Setting alias for Python2.7" - export PYTHON=/usr/local/Python-2.7.3/python -fi +easy_install termcolor M2Crypto SOAPpy pyyaml boto==2.6 argparse django +apt-get -y install expect -if [ -x $PYTHON ] -then - echo "Found python2.7" -else - echo "Did not find python2.7" - exit 1 -fi - -# Install setup tools. curl https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz > setuptools-0.6c11.tar.gz tar zxvf setuptools-0.6c11.tar.gz cd setuptools-0.6c11 -$PYTHON setup.py install -cd .. - -# Install termcolor. -curl https://s3.amazonaws.com/appscale-build/termcolor-1.1.0.tar.gz > termcolor-1.1.0.tar.gz -tar zxvf termcolor-1.1.0.tar.gz -cd termcolor-1.1.0 -$PYTHON setup.py install -cd .. - -# Install boto. -git clone https://github.com/boto/boto.git -cd boto -$PYTHON setup.py install -cd .. - -# Install PyYAML. -curl https://s3.amazonaws.com/appscale-build/PyYAML-3.10.tar.gz > PyYAML-3.10.tar.gz -tar zxvf PyYAML-3.10.tar.gz -cd PyYAML-3.10 -$PYTHON setup.py install -cd .. - -# Install SOAPpy. -git clone https://github.com/kiorky/SOAPpy.git -cd SOAPpy -$PYTHON setup.py install -cd .. +python setup.py install -# Remove downloaded files. -rm -fdr PyYAML-3.10.tar.gz setuptools-0.6c11.tar.gz termcolor-1.1.0.tar.gz setuptools-0.6c11 termcolor-1.1.0 boto PyYAML-3.10 SOAPpy +rm -fdr setuptools-0.6c11 diff --git a/src/appscale_tools_thread.py b/src/appscale_tools_thread.py index 8d26b92..ba93fe0 100644 --- a/src/appscale_tools_thread.py +++ b/src/appscale_tools_thread.py @@ -7,13 +7,12 @@ import sys import threading -sys.path.append(os.path.join(os.path.dirname(__file__),"../appscale-tools/lib")) - # Since AppScake doesn't run the tools on the main thread, use a fake -# implementation of the signal class. +# implementation of the signal class. import fake_signal sys.modules['signal'] = __import__('fake_signal').FakeSignal +sys.path.append(os.path.join(os.path.dirname(__file__),"../appscale-tools/lib")) from appscale_tools import AppScaleTools from custom_exceptions import BadConfigurationException import parse_args diff --git a/src/fake_signal.py b/src/fake_signal.py new file mode 100644 index 0000000..e9d93b1 --- /dev/null +++ b/src/fake_signal.py @@ -0,0 +1,21 @@ +class FakeSignal(): + """ + FakeSignal implements the methods of the signal class that + AppScale uses in the AppControllerClient class. The reason we + have a FakeSignal class is because signal can only run on the + main thread, and AppsCake does not run the AppScale tools on + the main thread. + """ + + # Class variable that AppScale uses, needs to be mocked out. + SIGALRM = 1 + + + @staticmethod + def alarm(arg1): + pass + + + @staticmethod + def signal(arg1, arg2): + pass From af8b221dff49e0977e5c1a0e022f361ef2a5359c Mon Sep 17 00:00:00 2001 From: Jovan Chohan Date: Wed, 4 Sep 2013 11:37:10 -0700 Subject: [PATCH 36/42] bug fix and build script fix --- debian/appscake_dependencies_install.sh | 21 ++++++++++++++++++--- src/appscale_tools_thread.py | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/debian/appscake_dependencies_install.sh b/debian/appscake_dependencies_install.sh index 054139e..3c0c4f8 100644 --- a/debian/appscake_dependencies_install.sh +++ b/debian/appscake_dependencies_install.sh @@ -1,9 +1,24 @@ -easy_install termcolor M2Crypto SOAPpy pyyaml boto==2.6 argparse django +easy_install termcolor +easy_install M2Crypto +easy_install SOAPpy +easy_install pyyaml +easy_install boto==2.6 +easy_install argparse +easy_install django apt-get -y install expect -curl https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz > setuptools-0.6c11.tar.gz +wget https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz tar zxvf setuptools-0.6c11.tar.gz cd setuptools-0.6c11 python setup.py install -rm -fdr setuptools-0.6c11 +cd .. +rm -r setuptools-0.6c11 +rm setuptools-0.6c11.tar.gz + +apt-get -y install mercurial +hg clone https://code.google.com/p/google-api-python-client/ +cd google-api-python-client +python setup.py install +cd .. +rm -r google-api-python-client diff --git a/src/appscale_tools_thread.py b/src/appscale_tools_thread.py index ba93fe0..cbb9f61 100644 --- a/src/appscale_tools_thread.py +++ b/src/appscale_tools_thread.py @@ -7,6 +7,7 @@ import sys import threading +sys.path.append(os.path.join(os.path.dirname(__file__),".")) # Since AppScake doesn't run the tools on the main thread, use a fake # implementation of the signal class. import fake_signal From 3c2d6fefe30fef78ad2bf64e9aff821147d665de Mon Sep 17 00:00:00 2001 From: Jovan Chohan Date: Wed, 4 Sep 2013 12:49:32 -0700 Subject: [PATCH 37/42] Updating instructions --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c8ca246..78f3b5d 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,9 @@ AppsCake has been developed using the Python programming language and uses Djang - Expect (http://downloads.sourceforge.net/project/expect/Expect/5.45/expect5.45.tar.gz or ```apt-get install expect```) -## Tools Install Process ## +## Install Process ## Run ```bash get_tools.sh```, which downloads the AppScale Tools and puts them in the -appscake directory. Next, install the AppScale Tools. - -Install the tools by going into appscale-tools/debian directory and running -```bash appscale_build.sh``` +appscake directory. Next, install the tools dependencies by going into the appscake/debian directory and running From d343893e305d6e9c316badd4dcc77d9e091571f7 Mon Sep 17 00:00:00 2001 From: Jovan Chohan Date: Wed, 4 Sep 2013 15:57:25 -0700 Subject: [PATCH 38/42] setting force flag for cloud deployments --- src/appscale_tools_thread.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/appscale_tools_thread.py b/src/appscale_tools_thread.py index cbb9f61..14cea88 100644 --- a/src/appscale_tools_thread.py +++ b/src/appscale_tools_thread.py @@ -366,6 +366,7 @@ def run_advance_cloud_deploy(self): "--machine", self.machine, "--ips_layout", self.ips_yaml_b64, "--group", self.keyname, + "--force", "--EC2_SECRET_KEY", self.ec2_secret, "--EC2_ACCESS_KEY", self.ec2_access, "--EC2_URL", self.ec2_url]) @@ -382,6 +383,7 @@ def run_simple_cloud_deploy(self): "--machine", self.machine, "--max", self.max_nodes, "--group", self.keyname, + "--force", "--EC2_SECRET_KEY", self.ec2_secret, "--EC2_ACCESS_KEY", self.ec2_access, "--EC2_URL", self.ec2_url]) From ca3af4f9e207a3f778dd01a30f6ac557bfd3f1a4 Mon Sep 17 00:00:00 2001 From: Jovan Chohan Date: Thu, 5 Sep 2013 09:49:32 -0700 Subject: [PATCH 39/42] fixing build script order --- debian/appscake_dependencies_install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/debian/appscake_dependencies_install.sh b/debian/appscake_dependencies_install.sh index 3c0c4f8..6e157f3 100644 --- a/debian/appscake_dependencies_install.sh +++ b/debian/appscake_dependencies_install.sh @@ -1,3 +1,12 @@ +wget https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz +tar zxvf setuptools-0.6c11.tar.gz +cd setuptools-0.6c11 +python setup.py install + +cd .. +rm -r setuptools-0.6c11 +rm setuptools-0.6c11.tar.gz + easy_install termcolor easy_install M2Crypto easy_install SOAPpy @@ -7,15 +16,6 @@ easy_install argparse easy_install django apt-get -y install expect -wget https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz -tar zxvf setuptools-0.6c11.tar.gz -cd setuptools-0.6c11 -python setup.py install - -cd .. -rm -r setuptools-0.6c11 -rm setuptools-0.6c11.tar.gz - apt-get -y install mercurial hg clone https://code.google.com/p/google-api-python-client/ cd google-api-python-client From bc12a41d2b3387b23c8a0490c97ba150f32058f9 Mon Sep 17 00:00:00 2001 From: Jovan Chohan Date: Thu, 5 Sep 2013 10:40:16 -0700 Subject: [PATCH 40/42] adding test flag to bypass terminate prompt --- src/appscale_tools_thread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/appscale_tools_thread.py b/src/appscale_tools_thread.py index 14cea88..2c1e284 100644 --- a/src/appscale_tools_thread.py +++ b/src/appscale_tools_thread.py @@ -112,7 +112,8 @@ def appscale_down(self): if self.deployment_type == CLOUD: terminate_args.extend(["--EC2_SECRET_KEY", self.ec2_secret, "--EC2_ACCESS_KEY", self.ec2_access, - "--EC2_URL", self.ec2_url]) + "--EC2_URL", self.ec2_url, + "--test"]) try: logging.info("Starting terminate instances.") From da52511548a20a4cd5016bfa6a327f258723ab11 Mon Sep 17 00:00:00 2001 From: Jovan Chohan Date: Thu, 5 Sep 2013 11:09:42 -0700 Subject: [PATCH 41/42] making build script more robust --- debian/appscake_dependencies_install.sh | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/debian/appscake_dependencies_install.sh b/debian/appscake_dependencies_install.sh index 6e157f3..d1a2cee 100644 --- a/debian/appscake_dependencies_install.sh +++ b/debian/appscake_dependencies_install.sh @@ -1,24 +1,26 @@ -wget https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz -tar zxvf setuptools-0.6c11.tar.gz -cd setuptools-0.6c11 -python setup.py install - -cd .. -rm -r setuptools-0.6c11 -rm setuptools-0.6c11.tar.gz +echo "Installing setuptools if needed." +set +e +hash easy_install > /dev/null 2>&1 +if [ $? -ne 0 ]; then + set -e + echo "setuptools not found - installing." + mkdir -pv downloads + cd downloads + wget https://s3.amazonaws.com/appscale-build/setuptools-0.6c11.tar.gz + tar zxvf setuptools-0.6c11.tar.gz + pushd setuptools-0.6c11 + python setup.py install + popd + rm -fr setuptools-0.6c11* +fi +set -e easy_install termcolor -easy_install M2Crypto easy_install SOAPpy easy_install pyyaml easy_install boto==2.6 easy_install argparse easy_install django +easy_install google-api-python-client apt-get -y install expect -apt-get -y install mercurial -hg clone https://code.google.com/p/google-api-python-client/ -cd google-api-python-client -python setup.py install -cd .. -rm -r google-api-python-client From 615597765e835015c1e8d8bc70921a655f8aa86a Mon Sep 17 00:00:00 2001 From: Tyler Krebs Date: Wed, 9 Oct 2013 09:25:19 -0700 Subject: [PATCH 42/42] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78f3b5d..b0be47d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![AppScale Logo](http://www.appscale.com/img/appscale-logo.png) +![AppScale Logo](http://www.appscale.com/img/logos/appscale-logo-349x83.jpg) # Appscake - Web Frontend for AppScale Tools #