[chef] Re: Re: How to format a volume and mount after using aws_ebs_volume


Chronological Thread 
  • From: Morgan Blackthorne < >
  • To: " " < >
  • Subject: [chef] Re: Re: How to format a volume and mount after using aws_ebs_volume
  • Date: Sat, 22 Jun 2013 19:14:56 -0700

In regards to this... does the aws_ebs_volume resource work with IAM roles? I know that I for one don't want to be committing AWS keys into my SCM if at all possible, and IAM roles allow you to set permissions on a host basis instead of a client basis.

--
~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS


On Sat, Jun 22, 2013 at 6:57 PM, Julian C. Dunn < " target="_blank"> > wrote:
On Sat, Jun 22, 2013 at 12:24 AM, David Montgomery < " target="_blank"> > wrote:
Hi,
I used the below to attach a volume to an ec2 isntances.


aws_ebs_volume "db_ebs_volume" do
  aws_access_key aws['aws_access_key_id']
  aws_secret_access_key aws['aws_secret_access_key']
  size 50
  device "/dev/sdi"
  action [ :create, :attach ]
end

I need to now format the volume
create a directory called /data
then mount the the volume with the /data directory.

What is the best chefonic method to achive this is a recipe?

I have tried this before, and I called out to shell to do invoke mkfs. Problem arises when you want ext3/ext4 -- the ext3utils don't give you a way to test whether a volume is formatted before you reformat it :-/ mkfs.xfs will, however, return a non-zero exit code that you can use.

For mounting, you can use the built-in mount resource.

http://docs.opscode.com/resource_mount.html
 
- Julian

--
[ Julian C. Dunn < " target="_blank"> >          * Sorry, I'm    ]
[ WWW: http://www.aquezada.com/staff/julian    * only Web 1.0  ]
[ gopher://sdf.org/1/users/keymaker/           * compliant!    ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9       ]




Archive powered by MHonArc 2.6.16.

§