pallet-aws : creating an instance in a vpc

174 views
Skip to first unread message

mccraig mccraig

unread,
Sep 9, 2014, 11:21:13 AM9/9/14
to palle...@googlegroups.com
hi,

i'm using :

[com.palletops/pallet "0.8.0-SNAPSHOT"] : 988a36cafe63dbc2af382f85cac58de5351bf241
[com.palletops/pallet-aws "0.2.3"]
[com.palletops/awaze "0.1.2-SNAPSHOT"] : cb1efe5e3e08d9b6e2b3973ae361c7cce1912292

and i'm trying to create an instance in an AWS VPC with a node-spec :

(def ubuntu-1404-pv-ebs-200-node
  (node-spec
   :image {:image-id "ami-aec41cd9"  ;; alestic eu-west-1 ubuntu 14.04 PV EBS-SSD
           :os-family :ubuntu
           :os-version "14.04"
           :os-64-bit true
           :login-user "ubuntu"
           :key-name "mccraigkey"}
   :location {:location-id "eu-west-1b"}
   :hardware {:hardware-id "m3.large"}
   :provider {:pallet-ec2
              {
               :network-interfaces [{:subnet-id "subnet-c9ece28f"
                                     :device-index 0
                                     ;; :private-ip-address "192.168.0.90"
                                     :security-group-id "sg-a249e4c7"
                                     :delete-on-termination "true"}]
               }
              }))

which is giving me an Exception like :

com.amazonaws.AmazonServiceException: Network interfaces and an instance-level security groups may not be specified on the same request (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 39e4abbe-3fab-416f-9497-21740a461726)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:820)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:439)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:245)
at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:8798)
at com.amazonaws.services.ec2.AmazonEC2Client.runInstances(AmazonEC2Client.java:3999)
at com.palletops.awaze.ec2$run_instances.doInvoke(ec2.clj:7348)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at pallet.compute.ec2.Ec2Service.run_nodes(ec2.clj:383)
at pallet.core.api$create_nodes.invoke(api.clj:308)

which is presumably because pallet is passing an instance-level security group based on the pallet group name i'm using in the converge op :

# lein pallet converge clustermap-mesos.groups/mesos-slave-es-nodata-group 1
16:18:03.633 [async-dispatch-8] WARN  com.palletops.aws.api - process-aws-request error
com.amazonaws.AmazonServiceException: The security group 'pallet-mesos-slave-es-nodata' does not exist (Service: AmazonEC2; Status Code: 400; Error Code: InvalidGroup.NotFound; Request ID: cf9af988-1c87-45fe-a97d-ccf008b5dbc8)
... stacktrace junk removed ...
16:18:03.635 [operate-14] INFO  pallet.compute.ec2 - Security group 'pallet-mesos-slave-es-nodata' not present. Creating it...
16:18:03.942 [operate-14] INFO  pallet.compute.ec2 - Security group 'pallet-mesos-slave-es-nodata' created. Opening SSH port...
16:18:04.284 [operate-14] INFO  pallet.compute.ec2 - SSH port is open for group 'pallet-mesos-slave-es-nodata'
16:18:04.284 [operate-14] INFO  pallet.compute.ec2 - Creating 1 node(s) in group 'mesos-slave-es-nodata'...
16:18:04.521 [operate-14] WARN  pallet.core.primitives - async-fsm failed
com.amazonaws.AmazonServiceException: Network interfaces and an instance-level security groups may not be specified on the same request (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: dbb075ce-34fd-48b1-867d-c3a651b80b9c)

is there a way of telling pallet not to specify an instance-level security group or otherwise working around this issue ?

thanks

:craig
Reply all
Reply to author
Forward
0 new messages