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_options need to be clarified #58

Closed
esciara opened this issue Dec 26, 2014 · 11 comments
Closed

bootstrap_options need to be clarified #58

esciara opened this issue Dec 26, 2014 · 11 comments
Milestone

Comments

@esciara
Copy link

esciara commented Dec 26, 2014

Following up on #46:

The bootstrap_options for this driver need documenting as that can are quite different to the documentation of the fog::AWS driver, with which they can be easily confused since there is no clear and complete separation between the two (doc named aws.md, and titled AWS provider with no mention of fog).

For instance:

  • the option :flavor_id in fog is called :instance_type here
  • the option :vpc_id does not exist here
  • the option :subnet_id in fog is called :subnet here
  • etc.

Am I wrong in thinking that this driver is being much close to the aws-sdk-v1?

If so can it be assumed that the aws-sdk-v1 documentation on the Class: AWS::EC2::InstanceCollection create method would give a reliable list of the options available?

Namely (copy/paste):

  • :count (Integer) — How many instances to request. By default one instance is requested. You can specify this either as an integer or as a Range, to indicate the minimum and maximum number of instances to run. Note that for a new account you can request at most 20 instances at once.
  • :iam_instance_profile (String) — The name or ARN of an IAM instance profile. This provides credentials to the EC2 instance(s) via the instance metadata service.
  • :block_device_mappings (Array) — Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.
    • :virtual_name - (String) Specifies the virtual device name.
    • :device_name - (String) Specifies the device name (e.g., /dev/sdh).
    • :ebs - (Hash) Specifies parameters used to automatically setup Amazon EBS volumes when the instance is launched.
      • :snapshot_id - (String) The ID of the snapshot from which the volume will be created.
      • :volume_size - (Integer) The size of the volume, in gigabytes.
      • :delete_on_termination - (Boolean) Specifies whether the Amazon EBS volume is deleted on instance termination.
      • :volume_type - (String) Valid values include:
        • standard
        • io1
        • gp2
      • :iops - (Integer)
    • :no_device - (String) Specifies the device name to suppress during instance launch.
  • :monitoring_enabled (Boolean) — Setting this to true enables CloudWatch monitoring on the instances once they are started.
  • :availability_zone (String) — Specifies the availability zone where the instance should run. Without this option, EC2 will choose an availability zone for you.
  • :placement_group (String) — Specifies the cluster placement group where the instance should run.
  • :image_id (String) — ID of the AMI you want to launch.
  • :key_name (String) — The name of the key pair to use. Note: Launching public images without a key pair ID will leave them inaccessible.
  • :key_pair (KeyPair) — A KeyPair that should be used when launching an instance.
  • :security_groups (Array) — Security groups are used to determine network access rules for the instances. :security_groups can be a single value or an array of values. Values should be group name strings or SecurityGroup objects.
  • :security_group_ids (Array) — Security groups are used to determine network access rules for the instances. :security_group_ids accepts a single ID or an array of security group IDs.
  • :user_data (String) — Arbitrary user data. You do not need to encode this value.
  • :instance_type (String) — The type of instance to launch, for example "m1.small".
  • :kernel_id (String) — The ID of the kernel with which to launch the instance.
  • :ramdisk_id (String) — The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, refer to the Resource Center and search for the kernel ID.
  • :disable_api_termination (Boolean) — Specifies whether you can terminate the instance using the EC2 API. A value of true means you can't terminate the instance using the API (i.e., the instance is "locked"); a value of false means you can. If you set this to true, and you later want to terminate the instance, you must first enable API termination. For example:
i = ec2.instances.create(:image_id => "ami-8c1fece5",
                         :disable_api_termination => true)
i.api_termination_disabled?        # => true
i.terminate                        # raises an exception
i.api_termination_disabled = false
i.terminate                        # terminates the instance
  • :instance_initiated_shutdown_behavior (String) — Determines whether the instance stops or terminates on instance-initiated shutdown.
  • :subnet (Subnet, String) — default: nil — The VPC Subnet (or subnet id string) to launch the instance in.
  • :private_ip_address (String) — default: nil — If you're using VPC, you can optionally use this option to assign the instance a specific available IP address from the subnet (e.g., '10.0.0.25'). This option is not valid for instances launched outside a VPC (i.e. those launched without the :subnet option).
  • :dedicated_tenancy (Boolean) — default: false — Instances with dedicated tenancy will not share physical hardware with instances outside their VPC. NOTE: Dedicated tenancy incurs an additional service charge. This option is not valid for instances launched outside a VPC (e.g. those launched without the :subnet option).
  • :ebs_optimized (Boolean) — default: false — EBS-Optimized instances enable Amazon EC2 instances to fully utilize the IOPS provisioned on an EBS volume. EBS-optimized instances deliver dedicated throughput between Amazon EC2 and Amazon EBS, with options between 500 Mbps and 1000 Mbps depending on the instance type used. When attached to EBS-Optimized instances, Provisioned IOPS volumes are designed to deliver within 10% of their provisioned performance 99.9% of the time. NOTE: EBS Optimized instances incur an additional service charge. This optional is only valid for certain instance types.
  • :associate_public_ip_address (Boolean) — default: false
@miguelcnf
Copy link
Contributor

Definitely 👍 on this.

I've found myself looking at the code to understand what options I could use on recipes since the docs referred to the fog:AWS driver - that's going to be a show stopper for a "normal" user IMO.

There's also the issue of machine vs bootstrap options which is not clear - I think it should be something in the lines of:

  • bootstrap_options should match the aws sdk options and always have precedence over the stored machine_options
  • machine_optionsshould be created/updated according to bootstrap_options and success of the operation

@Joseph-R
Copy link

Joseph-R commented Mar 9, 2015

👍 on this.

I'm coming at this fresh to chef provisioning, and am fishing around through issues and code trying to figure out what the resource options are for this and other cases not covered in the docs/examples or the README. aws_security_group could also use better documentation and examples.

I'm happy to submit a pull request and doc some of this stuff up, if it helps. Just have to figure it out myself, first!

@danieljimenez
Copy link

+1

1 similar comment
@georgecook-cbt
Copy link

+1

@tyler-ball
Copy link
Contributor

Created #230 to cover this documentation issue

@danieljimenez
Copy link

Has anyone figured out how to use the private DNS features?

@vasuram
Copy link

vasuram commented Feb 2, 2016

We're using AWS Route53 to provide private DNS featuer

@vasuram
Copy link

vasuram commented Feb 3, 2016

Has anyone figured out how to code 'delete-on-termination' for root volume in Chef Provisioning

@shortdudey123
Copy link

@vasuram

'bootstrap_options' => {
  {
    'device_name' => '/dev/sda1',
    'ebs' => {
      'volume_size' => 50,
      'delete_on_termination' => true
    }
  }
}

@vasuram
Copy link

vasuram commented Feb 15, 2016

I tries this , didn't work

@shortdudey123
Copy link

Not sure how you have all your stuff setup, but thats what i use and it works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants