From e8cadee6801110ce353d83472a24d4cf56ab794a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Jan 2016 09:45:31 -0800 Subject: [PATCH 1/4] ignored eb files --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index c6c4dac..bb45b00 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,11 @@ zips .elasticbeanstalk/* !.elasticbeanstalk/*.cfg.yml !.elasticbeanstalk/*.global.yml +.ebextensions/* +40install_node.sh +50npm.sh +env.vars + .DS_Store ZZZ-sessionController.js From 9bada291434e01a11a8838b2339b6284e2d51467 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Jan 2016 09:48:08 -0800 Subject: [PATCH 2/4] Delete node.config --- .ebextensions/node.config | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .ebextensions/node.config diff --git a/.ebextensions/node.config b/.ebextensions/node.config deleted file mode 100644 index 89bafa2..0000000 --- a/.ebextensions/node.config +++ /dev/null @@ -1,31 +0,0 @@ -files: - "/opt/elasticbeanstalk/env.vars" : - mode: "000775" - owner: root - group: users - source: https://s3-us-west-2.amazonaws.com/elasticbeanstalk-us-west-2-797147549887/env.vars - - "/opt/elasticbeanstalk/hooks/configdeploy/pre/50npm.sh" : - mode: "000666" - owner: root - group: users - content: | - #no need to run npm install during configdeploy - - "/opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh" : - mode: "000775" - owner: root - group: users - source: https://s3-us-west-2.amazonaws.com/elasticbeanstalk-us-west-2-797147549887/50npm.sh - - "/opt/elasticbeanstalk/hooks/configdeploy/pre/40install_node.sh" : - mode: "000775" - owner: root - group: users - source: https://s3-us-west-2.amazonaws.com/elasticbeanstalk-us-west-2-797147549887/40install_node.sh - - "/opt/elasticbeanstalk/hooks/appdeploy/pre/40install_node.sh" : - mode: "000775" - owner: root - group: users - source: https://s3-us-west-2.amazonaws.com/elasticbeanstalk-us-west-2-797147549887/40install_node.sh From be096b1cb6b334672c35d0c838871807ec721b16 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Jan 2016 09:48:38 -0800 Subject: [PATCH 3/4] Delete 40install_node.sh --- 40install_node.sh | 70 ----------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 40install_node.sh diff --git a/40install_node.sh b/40install_node.sh deleted file mode 100644 index 3fc8849..0000000 --- a/40install_node.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -#source env variables including node version -. /opt/elasticbeanstalk/env.vars - -function error_exit -{ - eventHelper.py --msg "$1" --severity ERROR - exit $2 -} - -#redirect all output to cfn-init to capture it by log.io -exec >>/var/log/cfn-init.log 2>&1 -#download and extract desired node.js version -echo "checking node..." -OUT=$( [ ! -d "/opt/elasticbeanstalk/node-install" ] && echo "trying to install node.js $NODE_VER" && mkdir /opt/elasticbeanstalk/node-install ; cd /opt/elasticbeanstalk/node-install/ && \ - wget -nc http://nodejs.org/dist/v$NODE_VER/node-v$NODE_VER-linux-$ARCH.tar.gz && \ - tar --skip-old-files -xzpf node-v$NODE_VER-linux-$ARCH.tar.gz) || error_exit "Failed to UPDATE node version. $OUT" $?. -echo $OUT - - -#UNCOMMENT to update npm, otherwise will be updated on instance init or rebuild -rm -f /opt/elasticbeanstalk/node-install/npm_updated - -#download & make install desired nginx version -echo "checking nginx..." - -#remember to add desired modules to BOTH arch-dependent commands below: -case $( arch ) in -( i686 ) OUT=$([ ! -d "/root/nginx-$NGINX_VER" ] && echo "trying to install nginx $NGINX_VER" &>> /var/log/cfn-init.log && \ - cd /root/ && curl --retry 10 http://nginx.org/download/nginx-$NGINX_VER.tar.gz | tar zx && cd /root/nginx-$NGINX_VER && \ - ./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log \ - --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy \ - --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi \ - --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module \ - --with-http_spdy_module --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module \ - --with-pcre --with-debug --with-ld-opt=' -Wl,-E' \ - --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=pentium4 -fasynchronous-unwind-tables' &>> /var/log/cfn-init.log \ - && make &>> /var/log/cfn-init.log && make install &>> /var/log/cfn-init.log);; - -( x86_64 ) OUT=$([ ! -d "/root/nginx-$NGINX_VER" ] && echo "trying to install nginx $NGINX_VER" && \ - cd /root/ && curl --retry 10 http://nginx.org/download/nginx-$NGINX_VER.tar.gz | tar zx && cd /root/nginx-$NGINX_VER &>> /var/log/cfn-init.log && \ - ./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log \ - --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy \ - --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi \ - --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module \ - --with-http_spdy_module --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module \ - --with-pcre --with-debug \ - --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ld-opt=' -Wl,-E' &>> /var/log/cfn-init.log \ - && make &>> /var/log/cfn-init.log && make install &>> /var/log/cfn-init.log );; -esac - -echo $OUT - -#make sure node binaries can be found globally -if [ ! -L /usr/bin/node ]; then - ln -s /opt/elasticbeanstalk/node-install/node-v$NODE_VER-linux-$ARCH/bin/node /usr/bin/node -fi - -if [ ! -L /usr/bin/npm ]; then -ln -s /opt/elasticbeanstalk/node-install/node-v$NODE_VER-linux-$ARCH/bin/npm /usr/bin/npm -fi - -echo "checking npm..." -if [ ! -f "/opt/elasticbeanstalk/node-install/npm_updated" ]; then -cd /opt/elasticbeanstalk/node-install/node-v$NODE_VER-linux-$ARCH/bin/ && /opt/elasticbeanstalk/node-install/node-v$NODE_VER-linux-$ARCH/bin/npm update npm -g -touch /opt/elasticbeanstalk/node-install/npm_updated -echo "YAY! Updated global NPM version to `npm -v`" -else - echo "Skipping NPM -g version update. To update, please uncomment 40install_node.sh:12" -fi From 47f6e0a489fd38f9dad368324023125ceb521ab6 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Jan 2016 10:06:38 -0800 Subject: [PATCH 4/4] Delete env.vars --- env.vars | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 env.vars diff --git a/env.vars b/env.vars deleted file mode 100644 index 3217343..0000000 --- a/env.vars +++ /dev/null @@ -1,9 +0,0 @@ -export HOME=/root -export NPM_CONFIG_LOGLEVEL=warn -export NPM_CONFIG_COLOR=false -export NPM_CONFIG_PRODUCTION=true -#note node vesion in .elasticbeanstalk/*.jsons -export NODE_VER=4.2.3 -export ARCH=x64 -export NGINX_VER=1.5.12 -export PATH="$PATH:/opt/elasticbeanstalk/node-install/node-v$NODE_VER-linux-$ARCH/bin/:/root/.npm"