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

platform: add support for vultr #451

Merged
merged 1 commit into from
Jul 15, 2020
Merged

platform: add support for vultr #451

merged 1 commit into from
Jul 15, 2020

Conversation

bh7cw
Copy link
Contributor

@bh7cw bh7cw commented Jul 8, 2020

This adds fetching attributes and ssh keys from vultr, and tests via mockito.

Fixes #343

@bh7cw bh7cw force-pushed the master branch 2 times, most recently from 172929a to d05652a Compare July 8, 2020 18:57
@bh7cw bh7cw requested a review from darkmuggle July 8, 2020 19:09
Cargo.toml Outdated Show resolved Hide resolved
docs/usage/attributes.md Outdated Show resolved Hide resolved
src/providers/vultr/mod.rs Outdated Show resolved Hide resolved
src/providers/vultr/mod.rs Outdated Show resolved Hide resolved
@lucab
Copy link
Contributor

lucab commented Jul 9, 2020

@bh7cw thanks for the PR! Did you manually check whether this produces the expected result on a real Vultr instance? If so, can you please paste as a comment here how does the final attributes-metadata content looks like?

Cargo.lock Outdated Show resolved Hide resolved
src/providers/vultr/mock_tests.rs Outdated Show resolved Hide resolved
src/providers/vultr/mod.rs Outdated Show resolved Hide resolved
src/providers/vultr/mod.rs Outdated Show resolved Hide resolved
@bh7cw
Copy link
Contributor Author

bh7cw commented Jul 13, 2020

@bh7cw thanks for the PR! Did you manually check whether this produces the expected result on a real Vultr instance? If so, can you please paste as a comment here how does the final attributes-metadata content looks like?

Test afterburn on vultr:

root@vultr:~/test# ./afterburn multi --provider vultr --attributes attr
Jul 13 18:08:22.652 INFO Fetching http://169.254.169.254/v1/hostname: Attempt #1
Jul 13 18:08:22.777 INFO Fetch successful
Jul 13 18:08:22.777 INFO Fetching http://169.254.169.254/v1/instanceid: Attempt #1
Jul 13 18:08:22.899 INFO Fetch successful
Jul 13 18:08:22.901 INFO Fetching http://169.254.169.254/v1/region/regioncode: Attempt #1
Jul 13 18:08:23.025 INFO Fetch successful

root@vultr:~/test# cat attr
AFTERBURNVULTRREGIONCODE=EWR
AFTERBURNVULTRHOSTNAME=vultr.guest
AFTERBURNVULTRINSTANCEID=39211897

root@vultr:~/test# curl http://169.254.169.254/v1/hostname
vultr.guest
root@vultr:~/test# curl http://169.254.169.254/v1/instanceid
39211897
root@vultr:~/test# curl http://169.254.169.254/v1/region/regioncode
EWR

root@vultr:~/test# **./afterburn multi --provider vultr --hostname hostname**
*Jul 13 18:09:45.675 INFO Fetching http://169.254.169.254/v1/hostname: Attempt #1
Jul 13 18:09:45.816 INFO Fetch successful*

root@vultr:~/test# cat hostname
vultr.guest


root@vultr:~/test# **./afterburn multi --provider vultr --ssh-keys root**
Jul 13 18:10:08.860 INFO Fetching http://169.254.169.254/v1/public-keys: Attempt #1
Jul 13 18:10:09.001 INFO Fetch successful*

@bh7cw
Copy link
Contributor Author

bh7cw commented Jul 13, 2020

Plus, private network, public network, ipv4, ipv6, and bgp are all optional for instances on vultr and user can chose to use or not.

Cargo.lock Outdated Show resolved Hide resolved
@lucab
Copy link
Contributor

lucab commented Jul 14, 2020

Just a minor comment, code looks good otherwise. Thanks for manually testing too!

@lucab
Copy link
Contributor

lucab commented Jul 14, 2020

@bh7cw is this still WIP or ready for the final pass?

this adds fetching attrbites and ssh keys from vultr, and tests via mockito.

Fixes coreos#343
@bh7cw bh7cw reopened this Jul 14, 2020
@bh7cw bh7cw changed the title WIP: platform: add support for vultr platform: add support for vultr Jul 14, 2020
@bh7cw bh7cw requested a review from lucab July 14, 2020 16:10
@bh7cw
Copy link
Contributor Author

bh7cw commented Jul 14, 2020

@lucab Thanks for review. This PR is ready for the final pass.

@lucab
Copy link
Contributor

lucab commented Jul 15, 2020

@bh7cw thanks for the patch, I did a manual test too and I didn't spot any issue. PR looks good to me, I've re-triggered the CI, will merge once green.

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

Successfully merging this pull request may close these issues.

platform: add support for vultr
2 participants