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

How to set root volume size with bootstrap method? #417

Closed
grossjo opened this issue Dec 1, 2017 · 2 comments
Closed

How to set root volume size with bootstrap method? #417

grossjo opened this issue Dec 1, 2017 · 2 comments

Comments

@grossjo
Copy link

grossjo commented Dec 1, 2017

Hi,

Seems the default volume size of a new ubuntu EBS ami image is ~8GB. Which on a typical installation fills up pretty fast with log files.

Can anyone point me in the right direction on how to set a root volume size using the bootstrap method? This is relatively easy using the web UI.

Here is my current code, that does not change the volume size in its current state:

 fog_connection.servers.bootstrap(flavor_id: 't2.medium', image_id:'ami-308b3054',
                                             username: 'ubuntu',
                                             private_key_path: '*',
                                             public_key_path: '.*',
                                             availability_zone: 'ca-central-1',
                                             groups: 'default',
                                             block_device_mapping: [
                                              'Ebs.VolumeSize': 30
                                             ]
                                             )
@grossjo
Copy link
Author

grossjo commented Dec 1, 2017

never mind. for posterity I was missing a few settings:
Here is a working example for the future:

connection.servers.bootstrap(flavor_id: server_size, image_id: ami,
                                             username: 'ubuntu,
                                             private_key_path: 'private',
                                             public_key_path: 'public',
                                             availability_zone:'ca-central-1',
                                             groups: 'default',
                                             # will configure the root volume.
                                             block_device_mapping: [
                                              {
                                                'DeviceName' => '/dev/sda1',
                                                'Ebs.VolumeSize'=> '30',
                                                'Ebs.DeleteOnTermination'=> true,
                                             }
                                             ]

@grossjo grossjo closed this as completed Dec 1, 2017
@geemus
Copy link
Member

geemus commented Dec 1, 2017 via email

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

No branches or pull requests

2 participants