Skip to content

Commit 2096c28

Browse files
committed
New MesosEC2 functions for dealing with andy's new image.
1 parent af3001d commit 2096c28

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/scala/mesos/MesosEC2.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import java.io.File
88
import java.net.InetAddress
99

1010
object MesosEC2 extends ConfigurationActions {
11-
val rootDir = new File("/root/mesos/frameworks/deploylib")
11+
val rootDir = new File("/usr/local/mesos/frameworks/deploylib")
1212
val masterAddress = InetAddress.getByName("mesos-ec2.knowsql.org")
1313

1414
def updateDeploylib: Unit = {
1515
val executorScript = Util.readFile(new File("src/main/resources/java_executor"))
16-
EC2Instance.activeInstances.pforeach(inst => {
16+
slaves.pforeach(inst => {
1717
createDirectory(inst, rootDir)
1818
uploadFile(inst, new File("target/deploy-2.1-SNAPSHOT-jar-with-dependencies.jar"), rootDir)
1919
createFile(inst, new File(rootDir, "java_executor"), executorScript, "755")
@@ -44,6 +44,11 @@ object MesosEC2 extends ConfigurationActions {
4444
createFile(master, location, contents, "644")
4545
}
4646

47+
def restartSlaves: Unit = {
48+
slaves.pforeach(_ ! "service mesos-slave stop")
49+
slaves.pforeach(_ ! "service mesos-slave start")
50+
}
51+
4752
def restart: Unit = {
4853
updateSlavesFile
4954
updateMasterFile

0 commit comments

Comments
 (0)