Giter Site home page Giter Site logo

ovh-cli's Introduction

  • Don't have any browser to manage your domains, servers and so on?
  • Want to automate/script some tasks?
  • Want to quickly make some administrative jobs on a domain/server?

Disclaimer

  • Never ever install this tool on servers (dedicated as VPS) you rent to OVH
  • I decline all responsabilities of the usage made of this tool, there is no warranty
  • I'm not affiliated in any way to the OVH company

Prerequisites

Build dependencies

  • cmake >= 2.8.8
  • (a C compiler)

Run dependencies

  • openssl
  • libcurl
  • libxml2
  • libedit (autocompletion)
  • libiconv
  • gettext (optional)
  • sqlite3

Install

Clone/compile/install ovh-cli

git clone ...
cd <path/to/build/directory>
cmake <path/to/sources/directory> (-DCMAKE_INSTALL_PREFIX=/usr/local)
make
(sudo) make install

First usage

  1. Create and register your application(s):
ovh application <endpoint (one of: kimsufi-ca, kimsufi-eu, ovh-ca, ovh-eu, runabove-ca, soyoustart-ca, soyoustart-eu)> add <application key> <application secret>
  1. Register your account(s):
    • with your password instead of a valid consumer key: ovh account <nic-handle> add password <password> endpoint <endpoint (one of: kimsufi-ca, kimsufi-eu, ovh-ca, ovh-eu, runabove-ca, soyoustart-ca, soyoustart-eu)>
    • with a valid consumer key instead of a password (use link "Create all keys at once" above): ovh account <nic-handle> add password "" key <consumer key> expires in illimited endpoint <endpoint (one of: kimsufi-ca, kimsufi-eu, ovh-ca, ovh-eu, runabove-ca, soyoustart-ca, soyoustart-eu)> (if your consumer key is not unlimited, replace illimited by "X days")
    • without password or consumer key: ovh account <nic-handle> add password "" endpoint <endpoint (one of: kimsufi-ca, kimsufi-eu, ovh-ca, ovh-eu, runabove-ca, soyoustart-ca, soyoustart-eu)> and follow instructions to acquire a consumer key

Commands

Available commands:
     account
         list => list registered accounts
         <account>
             add
                 endpoint <endpoint>
                     key <consumer key> expires <in/at> <expiration>
                         password <password>
             default => set the default account
             delete => remove an OVH account
             invalidate => drop consumer key associated to given OVH account
             switch => switch to another OVH account
             update
     application
         list => list registered applications
         <endpoint>
             add <key> <secret>
             delete => remove an application
     cloud
         list => display projects list
         <project>
             image list => list available images
             instance list => list active instances
     complete => show completion command(s) for current shell
     credentials
         flush => revoke all credentials
         list => list all credentials
     dedicated
         check => display servers about to expire
         list => list your dedicated servers
             nocache
         <server>
             boot
                 list => list available boots
                 show => display active boot
                 <boot> => set active boot
             mrtg <types> <period>
             reboot => hard reboot
             reverse
                 delete => remove reverse DNS
                 set <reverse> => define reverse DNS
             task list => list tasks
     domain
         check => display domains about to expire
         list => list your domains
             nocache
         <domain>
             dnssec
                 status => show DNSSEC status (enabled or disabled)
                 <enable/disable>
             export => export zone in DNS format
             record
                 list => display DNS records of *domain*
                     nocache
                         type <type>
                 <record>
                     add <value> => create a DNS record
                         name <name>
                             target <value>
                                 ttl <ttl>
                                 type <type>
                     delete => delete a DNS record
                     update
             refresh => generate a new serial to reflect any change on a DNS zone
     export => export OVH accounts and applications in ovh-cli commands format
     help => show help
     hosting
         list => list hosted website
         <hosting>
             cron list => list cron jobs for hosting
             database
                 list => list databases associated to *hosting*
                 <database>
                     delete => drop database associated to *hosting*
                     dump <date> => dump a database
             domain
                 list => list domains associated to *hosting*
                 <domain>
                     add <path> => link domain to *hosting* through *path*
                     delete => unlink domain to hosting
             user
                 list => list (FTP & SSH) users of *hosting*
                 <user> delete => delete a user from *hosting*
     key
         list => list global SSH keys
         <name>
             add <value> => upload a new global SSH key to OVH
             default <on/off> => (un)define the global SSH key used in rescue mode
             delete => delete a global SSH key
     log <on/off> => enable/disable logging of HTTP requests and responses to OVH API
     me => display your personal informations
         application
             list => list applications you have created
                 nocache
             <application> delete => delete one of your own applications
         contract
             list => list contracts
                 <status>
             <contract>
                 accept => accept a contract
                 show => show a contract
     quit => exit program
     tickets
         create <subject> => open a new support ticket
         list => list support ticket
         <ticket id>
             close => close a support ticket
             read => display an entire support ticket
             reopen => reopen a support ticket
             reply => reply to a support ticket
     vps list => list your VPS

For partial bash completion (in current shell), run: source <(ovh complete)

Examples

Hard reboot a dedicated server in rescue mode:

ovh dedicated <server name> boot <name of rescue boot>
ovh dedicated <server name> reboot

(press tab for list and/or completion of server and boot names)

ovh-cli's People

Contributors

julp avatar

Stargazers

Eddie Wang avatar Walter Gomez avatar YukiNoKumo avatar PK avatar  avatar Luiz Souza avatar Alex Negulescu avatar d0gkiller87 avatar archimedix avatar Alexandre Storelli avatar Stefan Hojer avatar Pawel Cyrta avatar Todor Todorov avatar Michal Gebauer avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.