pallet-aws, setting subnet and security group

35 views
Skip to first unread message

Stefano Pugnetti

unread,
Aug 25, 2014, 11:22:30 AM8/25/14
to palle...@googlegroups.com
Hi,

I'm trying to use pallet-aws to create an EC2 instance inside an existing subnet; I thought I was following closely the instructions in the README, but the instances I got are always in a subnet which is not the one I want. My code:

(node-spec
  :image {:image-id "ami-25865252"
  :os-family :ubuntu
  :os-version "12.04"
  :login-user "ubuntu"}
  :location {:location-id "eu-west-1c"}
  :hardware {:hardware-id "t1.micro"}
  :provider {:pallet-ec2
    {:network-interface [{:subnet-id "subnet-b24e93d7"
       :description "Standard secure configuration from Pallet..."
       :private-ip-address "172.16.0.1"
       :security-group-id "sg-8c63bae9"
       :delete-on-termination "true"}]}})

I've checked that the subnet is in the correct availability zone, i.e. the same as specified with :location-id, but the result completely ignores the code in :network-interface. What's wrong? Anyone succeeded in using this feature? With the aws-ec2 provider I can get my instance in the right subnet, however I need the pallet-ec2 provider because I want to be able to set the IAM role as well...

Thanks!

Hugo Duncan

unread,
Aug 26, 2014, 12:35:33 PM8/26/14
to palle...@googlegroups.com

stefano....@gmail.com writes:

> I'm trying to use pallet-aws to create an EC2 instance inside an existing
> subnet; I thought I was following closely the instructions in the README,
> but the instances I got are always in a subnet which is not the one I want.
> My code:
>
> (node-spec
> :image {:image-id "ami-25865252"
> :os-family :ubuntu
> :os-version "12.04"
> :login-user "ubuntu"}
> :location {:location-id "eu-west-1c"}
> :hardware {:hardware-id "t1.micro"}
> :provider {:pallet-ec2
> {:network-interface [{:subnet-id "subnet-b24e93d7"
> :description "Standard secure configuration from Pallet..."
> :private-ip-address "172.16.0.1"
> :security-group-id "sg-8c63bae9"
> :delete-on-termination "true"}]}})
>

Checking the AWS docs, it looks like the readme might be wrong. I think
it should be `:network-interfaces` rather than `::network-interface`.

Hugo
signature.asc
Reply all
Reply to author
Forward
0 new messages