[chef] test-kitchen/ec2 and user_data


Chronological Thread 
  • From: Luis Cosmes < >
  • To:
  • Subject: [chef] test-kitchen/ec2 and user_data
  • Date: Thu, 14 May 2015 15:29:34 -0700

Hi guys,

Anyone has had any luck setting user_data on your .kitchen.yml file when converging a node?  I have tried both specifying a file with the command or putting the actual bash commands, but no luck thus far.  Any suggestions?

Luis

Here is a snapshot of the relevant .kitchen.yml file

---
driver:
  name: ec2
  aws_ssh_key_id: [key_id]
  ssh_key: "[path_to_ssh_key]"
  aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
  aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
  region: us-east-1
  availability_zone: us-east-1b
  security_group_ids: ["sg-9999999"]
  subnet_id: "subnet-aaaaaaa"
  flavor_id: t2.small
  iam_profile_name: "[profile-name]"
  user_data: "../../my_user_data_file"
  associate_public_ip: true

-AND also tried-

---
driver:
  name: ec2
  aws_ssh_key_id: [key_id]
  ssh_key: "[path_to_ssh_key]"
  aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
  aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
  region: us-east-1
  availability_zone: us-east-1b
  security_group_ids: ["sg-9999999"]
  subnet_id: "subnet-aaaaaaa"
  flavor_id: t2.small
  iam_profile_name: "[profile-name]"
  user_data: "mkdir -p /etc/chef/ohai/hints/ && echo \"{}\" > /etc/chef/ohai/hints/ec2.json"
  associate_public_ip: true


Are you creating an ERP FrankenCloud? Watch 2:11 video



  • [chef] test-kitchen/ec2 and user_data, Luis Cosmes, 05/14/2015

Archive powered by MHonArc 2.6.16.

§