-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified the setup scripts for play1 and play1siena to deploy to resin
- Loading branch information
1 parent
08dc3aa
commit 4ce61db
Showing
8 changed files
with
30 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
precompiled/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,19 @@ | ||
import subprocess | ||
import sys | ||
import setup_util | ||
import os | ||
|
||
def start(args): | ||
setup_util.replace_text("play1/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306") | ||
setup_util.replace_text("play1/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306") | ||
|
||
subprocess.check_call("play war -o ../play1 --zip", shell=True, cwd="play1") | ||
# TODO deploy to resin | ||
|
||
# subprocess.check_call("play dist", shell=True, cwd="play-java") | ||
# subprocess.check_call("unzip play-java-1.0-SNAPSHOT.zip", shell=True, cwd="play-java/dist") | ||
# subprocess.check_call("chmod +x start", shell=True, cwd="play-java/dist/play-java-1.0-SNAPSHOT") | ||
# TODO start resin | ||
|
||
# subprocess.Popen("./start", shell=True, cwd="play-java/dist/play-java-1.0-SNAPSHOT") | ||
subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True) | ||
subprocess.check_call("play1 war -o $RESIN_HOME/webapps/play1 --exclude benchmark_config", shell=True, cwd="play1") | ||
subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True) | ||
|
||
return 0 | ||
def stop(): | ||
p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) | ||
out, err = p.communicate() | ||
for line in out.splitlines(): | ||
if './start' in line or ('play' in line and 'java' in line): | ||
pid = int(line.split(None, 2)[1]) | ||
os.kill(pid, 9) | ||
try: | ||
os.remove("play-java/RUNNING_PID") | ||
except OSError: | ||
pass | ||
return 0 | ||
subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True) | ||
subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True) | ||
return 0 | ||
except subprocess.CalledProcessError: | ||
return 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
precompiled/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../installs/play-1.2.5/modules/siena-2.0.6 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters