Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Providers with APIs that allow VM reinstall (or snapshot restore)?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Providers with APIs that allow VM reinstall (or snapshot restore)?

raindog308raindog308 Administrator, Veteran

I'd like to do something like this:

  1. Make an API call in a script to a provider's panel and have it reinit a VM to a minimal CentOS 7 image, just like one would do by clicking reinstall in the Solus panel.

  2. I run my ansible/etc. test scripts and validate they work on CentOS 7

  3. I make another API call and reinit the VM to Ubuntu 14

  4. validate/test

  5. Lather, rinse, repeat for Ubuntu 16, Debian 8, etc. Nice if I can include OpenBSD in the mix but not strictly necessary.

This would be for completely automated testing against a set of OSes. I can script any password inputs with expect (which I typically do to setup initial authorized_keys).

Places where I think I can do this but haven't checked:

  • DO
  • Vultr
  • Linode
  • big public cloud places like Amazon, Azure, etc.

Places where I don't think I can do this:

  • Solus providers (the vast majority here). According to the API docs, this isn't in the client section.

  • BuyVM (Unless I'm reading the docs wrong @Francisco)

  • SecureDragon (no API for Wyvern, is there @KuJoe ?)

Comments

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    Not yet :)

    A full flesh out of our API is due at some point. The goal is to allow API access to (almost?) every feature that can be done inside the panel.

    Francisco

    Thanked by 2raindog308 yomero
  • perennateperennate Member, Host Rep
    edited June 2016

    We support this on Luna Node -- https://wiki.lunanode.com/index.php/API

    No OpenBSD template, but you can upload your own, or you can install a VM from ISO and set it up with cloud-init and then snapshot it.

    Thanked by 2gustavargas yomero
  • matteobmatteob Barred
    edited June 2016

    We have API for all, customer management, dedicated server management and vms:

    VMs management: https://docs.onapp.com/display/43API/OnApp+4.3+API+Guide

    Dedicated and customers: https://manage.seflow.it/index.php?/userapi/

    Thanked by 1yomero
  • timnboystimnboys Member
    edited June 2016

    You could do this on opennebula I was thinking of replacing solus with but you know I don't think I could fully move from solus unless opennebula supports xen which I heard it has a plugin for but haven't tested it yet

  • quadhostquadhost Member
    edited June 2016

    Hosts with Virtualizor that allow API access should work, and we do on bundle/reseller accounts.

    http://www.virtualizor.com/wiki/API_Rebuild_VPS

  • SolusVM has an API. I wrote a PHP wrapper that logs in and generates acquires the API key via the UI. Use something like Firebug and you can see the simple requests required to build a wrapper.

  • raindog308raindog308 Administrator, Veteran

    ricardo said: SolusVM has an API.

    Alas...reinstall isn't in the API for the client (I'm not the admin).

    https://documentation.solusvm.com/display/DOCS/API

  • If you can read PHP and be bothered to reverse engineer my code, feel free to message me your email address and I'll send it over. You will need to edit it quite a bit but if you're proficient in PHP it won't take an hour.

    It does all the stuff you can do in the SolusVM client area as a user, including reinstalling. It'll just provide a list of the ISOs the provider offers and lets you submit your one of choice.

    It's ~150 lines of code.

    Thanked by 1yomero
  • noamannoaman Member

    @raindog308 said:

    ricardo said: SolusVM has an API.

    Alas...reinstall isn't in the API for the client (I'm not the admin).

    https://documentation.solusvm.com/display/DOCS/API

    All the cool things are allowed only to admin....

    :-(

    The only way would be login using curl php save the cookie submit reinstall form.....but their are better options

  • It is less than ideal but it works, I have about ~150 containers using it, though indeed it's basic. 1. Login and acquire API key 2. reinstalls 3. anything that hits command.php, like reboot, boot, shutdown etc. 4. Change root password.

    Like WHM/cpanel, the end-user 'API' capabilities are a bit of an afterthought, but you can utilise the commands you have access to.

  • KuJoeKuJoe Member, Host Rep

    @raindog308 said:

    • SecureDragon (no API for Wyvern, is there @KuJoe ?)

    I can add something similar to this in the current API. I'll need to work on a way to limit API calls to prevent overloading Wyvern but that shouldn't be an issue.

    Thanked by 1yomero
  • amhoabamhoab Member

    Does this have to run at a third party? This sounds like a perfect use case for Vagrant or Test Kitchen.

  • pbgbenpbgben Member, Host Rep
    edited June 2016

    Pretty sure Scaleway can do this, https://developer.scaleway.com/ and its hourly

  • Thanked by 1dediserve
  • rds100rds100 Member

    Don't you have a dedi somewhere? Install OpenVZ kernel, install vzctl and script it all. Doesn't look hard.

    Or you could even do this inside a KVM VPS. OpenVZ inside KVM.

  • charliecharlie Member, Host Rep

    Hi,

    We providing a full API for our clients: https://my.mikrovps.hu/knowledgebase/10/VPS

  • IkoulaIkoula Member, Host Rep
    edited June 2016

    Hello,

    As mentionned on our page https://express.ikoula.com/en/public-cloud we provide API in our Cloud.

    edit : And you can easily do what you've described.

  • vfusevfuse Member, Host Rep

    You can do this with OVH public cloud as well. With hourly billing you do pay double the price tho.

  • vpsgetvpsget Member

    We do support this at vpsget.com. Actually any hosting company which is using SolusVM supports api calls to VPS control panel :)

  • rds100rds100 Member
    edited June 2016

    vpsget said: We do support this at vpsget.com. Actually any hosting company which is using SolusVM supports api calls to VPS control panel :)

    Have you read the whole thread? Or even the first post?

    SolusVM's client API does not have a reinstall function. In fact it supports only 5 basic functions (boot server / stop server / reboot server / Virtual server status / Virtual server information). Unless you want to give him access to your SolusVM admin API (i.e. control over all servers of all clients).

    https://documentation.solusvm.com/display/DOCS/Functions

  • terrahostterrahost Member, Patron Provider

    Should you be interested in our location in Norway, we have a custom API which includes reinstalls based on PXE and preseed/kickstart.

  • Lunanode x2, excellent service!

  • MaouniqueMaounique Host Rep, Veteran

    Cloudstack allows this. We allow full api access for domain admins.

  • vpsgetvpsget Member
    edited June 2016

    @rds100 said:
    Have you read the whole thread? Or even the first post?

    Yes, sorry I missed that . [I'm just sales representative]. In this case I think the only one way is to use some KVM vps and purchase solusvm main+node licenses.

Sign In or Register to comment.