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

Documentation for new drivers #2

Open
gregorybrzeski opened this issue Oct 30, 2018 · 1 comment
Open

Documentation for new drivers #2

gregorybrzeski opened this issue Oct 30, 2018 · 1 comment

Comments

@gregorybrzeski
Copy link

Is there documentation explaining architecture and how to write new drivers.

Would love to contribute however need to have more information instead of just guessing from the existing code.

@tomaszklim
Copy link
Member

All existing documentation is already published. How to write new drivers:

  1. Create account, install command line client for new vendor, make sure it works, learn how to use multiple accounts using that command line client.

  2. Write working install.sh script, that installs all dependencies and can be safely run multiple times, possibly fixing found problems, reinstalling/updating packages etc.

  3. Look at existing drivers and start with setup-account.sh, list-accounts.sh and test-account.sh - as for the start, setup-account.sh should just create configuration profiles without any additional questions, you can add them later when working on creating instances.

  4. When you successfully managed to create many profiles, focus on ssh key management: get-key-path.sh, list-ssh-keys.sh, create-ssh-key.sh

  5. Next implement listing scripts: list regions, list available images, list instance types, list other required resources (except on instances). Also get-configured-region.sh, get-ubuntu-image.sh, get-default-instance-type.sh and possily others related to OS image management. Choose caching strategy at this point (or just look at Azure scripts).

  6. Create some instances manually and focus on list-instances script. Probably you'll have to implement some parser at this point. Look at "internal" subdirectories for each driver.

  7. Next write scripts operating on existing instances: delete-instance.sh and possibly resize/redeploy/open/do-whatever. Verify that you properly operate on instance identifiers returned in 6th column of instance listing script. Really, this part is tricky for some vendors!

  8. create-instance.sh should be the last part, as you need all other auxiliary scripts before (operate on regions, OS images, instance types and other vendor-specific resources).

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