Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap tagging options #21

Closed
wrightp opened this issue Nov 7, 2014 · 7 comments
Closed

bootstrap tagging options #21

wrightp opened this issue Nov 7, 2014 · 7 comments
Assignees
Labels
Type: Enhancement Adds new functionality.

Comments

@wrightp
Copy link
Contributor

wrightp commented Nov 7, 2014

this driver needs to the ability to tag ec2 instances. fog adds a few default tags, perhaps we should do that too

@jtimberman
Copy link

We definitely should, this is essential functionality for our own internal project tracking.

@tyler-ball
Copy link
Contributor

kitchen-ec2 handles this by having a config[:tags] element that is auto populated with {:created_by => 'Test Kitchen'} but can be expanded with user supplied tags.

I think we could do something similar. @fnichol suggested having users supply this to the with_driver block because these tags will apply to more than just machines. They apply to most AWS objects.

@danieljimenez
Copy link

+1, we use this for elastic search's EC2 discovery.

@lantrix
Copy link

lantrix commented May 19, 2015

I see there is now tagging being implemented in #190. I'd expect the next version of the gem would include this.

However, in the meantime I've just built chef-provisioning-1.2.0.dev.0.gem and the provisioning of EC2 instances successfully tagged them.

machine node['my_cookbook']['fqdn'] do
  machine_options({
    :aws_tags => {:MyKey => 'MyValue', :AnotherKey => 'AnotherValue'},
    :use_private_ip_for_ssh => true,
    :associate_public_ip_address => false,
    :source_key => node['my_cookbook']['aws_ssh_key_path'],
    :bootstrap_options => {
      :availability_zone => node['my_cookbook']['AZ'],
      :subnet_id => node['my_cookbook']['subnet'],
      :security_group_ids => [
        node['my_cookbook']['secgroups']['default']
      ],
      :private_ip_address => node['my_cookbook']['ip_address'],
      :key_name => node['my_cookbook']['aws_ssh_key_id'],
      :instance_type => node['my_cookbook']['instance_type']
    },
    :image_id => node['my_cookbook']['ami']
  })
end

@wrightp
Copy link
Contributor Author

wrightp commented May 19, 2015

Glad it worked! I've added several specs to cover multiple cases. I merged #190 sometime last week, so it will be included in the next release.

@tyler-ball
Copy link
Contributor

I'm looking to get a release out this week, but I keep putting it off because there are some conflicting dependencies in the ChefDK that I'll have to do the sacred Conflicting Dependency Dance to solve

@tyler-ball tyler-ball removed this from the Later milestone Sep 3, 2015
@tyler-ball tyler-ball self-assigned this Sep 3, 2015
@tyler-ball
Copy link
Contributor

This fix was released and is currently in 1.3.x branch of CPA

@tas50 tas50 added Type: Enhancement Adds new functionality. and removed Improvement labels Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Development

No branches or pull requests

7 participants