Skip to content

Commit 19f0dac

Browse files
author
gau1991
committed
Merge branch 'hotfix/v3.2.1'
2 parents e524e8e + d4262e6 commit 19f0dac

File tree

11 files changed

+185
-85
lines changed

11 files changed

+185
-85
lines changed

CHANGELOG.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
v 3.2.1 - Jun 19, 205
2+
- Improved experimental HHVM and Pagespeed handling, fixes #564, #562
3+
- Fixed missing link for Proxy sites #571
4+
- Added hhvm.server.ip for HHVM config #567
5+
16
v 3.2.0 - May 28, 2015
27
- Now using openSuse builder to build Nginx package for both Ubuntu and Debian
38
- Minor fixes and improvements

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ EasyEngine (ee) is a python tool, which makes it easy to manage your wordpress s
1111
- Debian 7 & 8
1212

1313
**Port Requirements:**
14-
- 22/TCP (Inbound/Outbound) : Standerd SSH port
15-
- 80/TCP (Inbound/Outbound) : Standerd HTTP port
16-
- 443/TCP(Inbound/Outbound) : Standerd HTTPS port
14+
- 22/TCP (Inbound/Outbound) : Standard SSH port
15+
- 80/TCP (Inbound/Outbound) : Standard HTTP port
16+
- 443/TCP(Inbound/Outbound) : Standard HTTPS port
1717
- 22222/TCP (Inbound) : To access EasyEngine admin tools
1818
- 11371/TCP (Outbound) : To connect to GPG Key Server
1919

config/bash_completion.d/ee_auto.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ _ee_complete()
7474
# HANDLE EVERYTHING AFTER THE THIRD LEVEL NAMESPACE
7575
"install" | "purge" | "remove" )
7676
COMPREPLY=( $(compgen \
77-
-W "--web --admin --mail --nginx --php --mysql --postfix --wpcli --phpmyadmin --adminer --utils --all --mailscanner --hhvm" \
77+
-W "--pagespeed --web --admin --mail --nginx --php --mysql --postfix --wpcli --phpmyadmin --adminer --utils --all --mailscanner --hhvm" \
7878
-- $cur) )
7979
;;
8080
"upgrade" )
@@ -235,9 +235,9 @@ _ee_complete()
235235

236236
"--pagespeed" | "--hhvm")
237237
if [ ${COMP_WORDS[2]} == "create" ]; then
238-
retlist="--user --pass --email --html --php --mysql --wp --wpsubdir --wpsubdomain --w3tc --wpfc --wpsc --hhvm --pagespeed"
238+
retlist="--user --pass --email --html --php --mysql --wp --wpsubdir --wpsubdomain --w3tc --wpfc --wpsc --hhvm --pagespeed --experimenal"
239239
elif [ ${COMP_WORDS[2]} == "update" ]; then
240-
retlist="--password --php --mysql --wp --wpsubdir --wpsubdomain --w3tc --wpfc --wpsc --hhvm --hhvm=off --pagespeed --pagespeed=off"
240+
retlist="--password --php --mysql --wp --wpsubdir --wpsubdomain --w3tc --wpfc --wpsc --hhvm --hhvm=off --pagespeed --pagespeed=off --experimenal"
241241
else
242242
retlist=""
243243
fi

ee/cli/plugins/debug.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,16 @@ def debug_php(self):
171171
"{/,/}/p \" /etc/nginx/"
172172
"conf.d/upstream.conf "
173173
"| grep 9001")):
174+
174175
Log.info(self, "Enabling PHP debug")
175-
data = dict(php="9001", debug="9001", hhvm="9001")
176+
# Check HHVM is installed if not instlled then dont not enable
177+
# it in upstream config
178+
if os.path.isfile("/etc/nginx/common/wpfc-hhvm.conf"):
179+
hhvmconf=True
180+
else:
181+
hhvmconf=False
182+
data = dict(php="9001", debug="9001", hhvm="9001",
183+
hhvmconf=hhvmconf)
176184
Log.debug(self, 'Writting the Nginx debug configration to file'
177185
' /etc/nginx/conf.d/upstream.conf ')
178186
ee_nginx = open('/etc/nginx/conf.d/upstream.conf',
@@ -209,6 +217,16 @@ def debug_php(self):
209217
"/etc/nginx/conf.d/upstream.conf "
210218
"| grep 9001"):
211219
Log.info(self, "Disabling PHP debug")
220+
221+
# Check HHVM is installed if not instlled then dont not enable
222+
# it in upstream config
223+
if os.path.isfile("/etc/nginx/common/wpfc-hhvm.conf"):
224+
hhvmconf=True
225+
else:
226+
hhvmconf=False
227+
data = dict(php="9001", debug="9001", hhvm="9001",
228+
hhvmconf=hhvmcof)
229+
212230
data = dict(php="9000", debug="9001", hhvm="8000")
213231
Log.debug(self, 'Writting the Nginx debug configration to file'
214232
' /etc/nginx/conf.d/upstream.conf ')

ee/cli/plugins/site.py

Lines changed: 95 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,10 @@ class Meta:
359359
dict(help="provide password for wordpress user",
360360
dest='wppass')),
361361
(['--proxy'],
362-
dict(help="create proxy for site", nargs='+'))
362+
dict(help="create proxy for site", nargs='+')),
363+
(['--experimental'],
364+
dict(help="Enable Experimenal packages without prompt",
365+
action='store_true')),
363366
]
364367

365368
@expose(hide=True)
@@ -461,21 +464,56 @@ def default(self):
461464
Log.error(self, "Can not create HTML site with HHVM")
462465

463466
if data and self.app.pargs.hhvm:
464-
data['hhvm'] = True
465-
hhvm = 1
467+
if (not self.app.pargs.experimental):
468+
Log.info(self, "HHVM is experimental feature and it may not"
469+
"work with all plugins of your site.\nYou can "
470+
"disable it by passing --hhvm=off later.\nDo you wish"
471+
" to enable HHVM now for {0}?".format(ee_domain))
472+
473+
# Check prompt
474+
check_prompt = input("Type \"y\" to continue [n]:")
475+
if check_prompt != "Y" and check_prompt != "y":
476+
Log.info(self, "Not using HHVM for site.")
477+
data['hhvm'] = False
478+
hhvm = 0
479+
self.app.pargs.hhvm = False
480+
else:
481+
data['hhvm'] = True
482+
hhvm = 1
483+
else:
484+
data['hhvm'] = True
485+
hhvm = 1
486+
466487
elif data:
467488
data['hhvm'] = False
468489
hhvm = 0
469490

470491
if data and self.app.pargs.pagespeed:
471-
data['pagespeed'] = True
472-
pagespeed = 1
492+
if (not self.app.pargs.experimental):
493+
Log.info(self, "PageSpeed is experimental feature and it may not"
494+
"work with all CSS/JS/Cache of your site.\nYou can "
495+
"disable it by passing --pagespeed=off later.\nDo you wish"
496+
" to enable PageSpeed now for {0}?".format(ee_domain))
497+
498+
# Check prompt
499+
check_prompt = input("Type \"y\" to continue [n]:")
500+
if check_prompt != "Y" and check_prompt != "y":
501+
Log.info(self, "Not using PageSpeed for site.")
502+
data['pagespeed'] = False
503+
pagespeed = 0
504+
self.app.pargs.pagespeed = False
505+
else:
506+
data['pagespeed'] = True
507+
pagespeed = 1
508+
else:
509+
data['pagespeed'] = True
510+
pagespeed = 1
473511
elif data:
474512
data['pagespeed'] = False
475513
pagespeed = 0
476514

477-
# if not data:
478515
# self.app.args.print_help()
516+
# if not data:
479517
# self.app.close(1)
480518

481519
# Check rerequired packages are installed or not
@@ -704,7 +742,10 @@ class Meta:
704742
action='store' or 'store_const',
705743
choices=('on', 'off'), const='on', nargs='?')),
706744
(['--proxy'],
707-
dict(help="update to prxy site", nargs='+')),
745+
dict(help="update to proxy site", nargs='+')),
746+
(['--experimental'],
747+
dict(help="Enable Experimenal packages without prompt",
748+
action='store_true')),
708749
(['--all'],
709750
dict(help="update all sites", action='store_true')),
710751
]
@@ -939,6 +980,7 @@ def doupdatesite(self, pargs):
939980
elif pagespeed is True:
940981
Log.info(self, "Pagespeed is allready enabled for given "
941982
"site")
983+
pargs.pagespeed = False
942984

943985
if pargs.hhvm:
944986
if hhvm is old_hhvm:
@@ -949,6 +991,8 @@ def doupdatesite(self, pargs):
949991
Log.info(self, "HHVM is allready enabled for given "
950992
"site")
951993

994+
pargs.hhvm = False
995+
952996
if data and (not pargs.hhvm):
953997
if old_hhvm is True:
954998
data['hhvm'] = True
@@ -965,10 +1009,50 @@ def doupdatesite(self, pargs):
9651009
data['pagespeed'] = False
9661010
pagespeed = False
9671011

968-
if pargs.pagespeed or pargs.hhvm:
969-
if ((hhvm is old_hhvm) and (pagespeed is old_pagespeed) and
970-
(stype == oldsitetype and cache == oldcachetype)):
971-
return 1
1012+
if pargs.pagespeed=="on" or pargs.hhvm=="on":
1013+
if pargs.hhvm == "on":
1014+
if (not pargs.experimental):
1015+
Log.info(self, "HHVM is experimental feature and it may not"
1016+
" work with all plugins of your site.\nYou can "
1017+
"disable it by passing --hhvm=off later.\nDo you wish"
1018+
" to enable HHVM now for {0}?".format(ee_domain))
1019+
1020+
# Check prompt
1021+
check_prompt = input("Type \"y\" to continue [n]:")
1022+
if check_prompt != "Y" and check_prompt != "y":
1023+
Log.info(self, "Not using HHVM for site")
1024+
data['hhvm'] = False
1025+
hhvm = False
1026+
else:
1027+
data['hhvm'] = True
1028+
hhvm = True
1029+
else:
1030+
data['hhvm'] = True
1031+
hhvm = True
1032+
1033+
if pargs.pagespeed=="on":
1034+
if (not pargs.experimental):
1035+
Log.info(self, "PageSpeed is experimental feature and it may not"
1036+
" work with all CSS/JS/Cache of your site.\nYou can "
1037+
"disable it by passing --pagespeed=off later.\nDo you wish"
1038+
" to enable PageSpeed now for {0}?".format(ee_domain))
1039+
1040+
# Check prompt
1041+
check_prompt = input("Type \"y\" to continue [n]:")
1042+
if check_prompt != "Y" and check_prompt != "y":
1043+
Log.info(self, "Not using Pagespeed for given site")
1044+
data['pagespeed'] = False
1045+
pagespeed = False
1046+
else:
1047+
data['pagespeed'] = True
1048+
pagespeed = True
1049+
else:
1050+
data['pagespeed'] = True
1051+
pagespeed = True
1052+
1053+
if ((hhvm is old_hhvm) and (pagespeed is old_pagespeed) and
1054+
(stype == oldsitetype and cache == oldcachetype)):
1055+
return 1
9721056

9731057
if not data:
9741058
Log.error(self, "Cannot update {0}, Invalid Options"

ee/cli/plugins/site_functions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,16 @@ def setupdomain(self, data):
9191
raise SiteError("created nginx configuration failed for site."
9292
" check with `nginx -t`")
9393

94-
if 'proxy' in data.keys() and data['proxy']:
95-
return
9694

9795
# create symbolic link for
9896
EEFileUtils.create_symlink(self, ['/etc/nginx/sites-available/{0}'
9997
.format(ee_domain_name),
10098
'/etc/nginx/sites-enabled/{0}'
10199
.format(ee_domain_name)])
102100

101+
if 'proxy' in data.keys() and data['proxy']:
102+
return
103+
103104
# Creating htdocs & logs directory
104105
Log.info(self, "Setting up webroot \t\t", end='')
105106
try:

0 commit comments

Comments
 (0)