Skip to content

Commit b41c50e

Browse files
committed
Switch to andy's new mesos image.
1 parent cf3364c commit b41c50e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/scala/ec2/ec2.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,15 @@ object EC2Instance extends AWSConnection {
9797
/**
9898
* Launches a set of instances with the given parameters
9999
*/
100-
def runInstances(imageId: String, min: Int, max: Int, keyName: String, instanceType: String, location: String): Seq[EC2Instance] = {
100+
def runInstances(imageId: String, min: Int, max: Int, keyName: String, instanceType: String, location: String, userData: Option[String] = None): Seq[EC2Instance] = {
101+
val encoder = new sun.misc.BASE64Encoder
101102
val request = new RunInstancesRequest(
102103
imageId, // imageID
103104
min, // minCount
104105
max, // maxCount
105106
keyName, // keyName
106107
null, // securityGroup
107-
null, // userData
108+
userData.map(s => encoder.encode(s.getBytes)).orNull, // userData
108109
instanceType, // instanceType
109110
new Placement(location), // placement
110111
null, // kernelId

0 commit comments

Comments
 (0)