Giter Site home page Giter Site logo

ucli's Introduction

ucli

Universal CLI for cloud providers.

Installation

Requirements

  • Ruby >= 1.9.2
  • Bundler

To install the dependencies, run bundle in the root dir:

bundle

Usage

In case of usage with command line arguments for creating vps, you have to create your own profiles file. Default is ~/.ucli. Example contents of the file:

aws:
  provider: 'AWS'
  aws_access_key_id: 'your_access_key_id'
  aws_secret_access_key: 'your_secret_access_key'
digitalocean:
  provider: 'DigitalOcean'
  digitalocean_api_key: 'your_api_key'
  digitalocean_client_id: 'your_client_id'
softlayer:
  provider: 'Softlayer'
  softlayer_username: 'your_username'
  softlayer_api_key: 'your_api_key'
rackspace:
  provider: 'Rackspace'
  rackspace_username: 'your_username'
  rackspace_api_key: 'your_api_key'
  rackspace_region: 'iad'
linode:
  provider: 'Linode'
  linode_api_key: 'your_api_key'

Command line arguments examples

$ ./ucli.rb create vps --provider=softlayer --name=my-vps-name --image=UBUNTU_LATEST --region=dal05 --ram=1024 --cpu=1
$ ./ucli.rb create vps --provider=softlayer --profile profiles.yml --config examples/config_softlayer.yml
$ ./ucli.rb create vps --profile profiles.yml --provider digitalocean -n test44100 -i 9801950 -s 33 -r 3 -f 66 --ssh_key_id 534374
$ ./ucli.rb destroy -n test44100 --profile profiles.yml --provider digitalocean --force
$ ./ucli.rb create vps --profile profiles.yml --provider rackspace -n test31337 -f 2 -i 1a31fdc8-3900-4411-8c08-d8cbf3c9417c -r iad
$ ./ucli.rb create vps --linode_plan_id 1 -r 2 --linode_root_password Your_r00t_PWD -p linode
$ ./ucli.rb create vps -p aws -i ami-d05e75b8 -r us-east-1 -f t2.micro
$ ./ucli.rb start -n my-vps-name -p softlayer --profile profiles.yml
$ ./ucli.rb reboot -n my-vps-name -p linode
$ ./ucli.rb stop -n my-vps-name -p digitalocean
$ ./ucli.rb list vps -p aws

$ ./ucli.rb storage bucket --create -n bucket21228 -p aws
$ ./ucli.rb storage bucket --list
$ ./ucli.rb storage bucket --delete -n bucket21228

$ ./ucli.rb storage upload -p aws --bucket bucket21228 --filepath README.md --remotepath README.md
$ ./ucli.rb storage download --bucket bucket21228 --remotepath README.md --filepath README.txt

$ ./ucli.rb storage snapshot -p aws --create -n my-vps-id
$ ./ucli.rb storage snapshot -p aws --restore snap-95d94813 -n my-vps-id
$ ./ucli.rb storage snapshot -p aws --restore --last -n my-vps-id
$ ./ucli.rb storage snapshot -p aws --copy snap-95d94813
$ ./ucli.rb storage snapshot -p aws --list -n my-vps-id
$ ./ucli.rb storage snapshot -p aws --list --all
$ ./ucli.rb storage snapshot -p aws --delete snap-95d94813

Please note to omit '=' when calling --profile and --config arguments.

Run with --help option or without any arguments for more info.

License

Please refer to LICENSE.md.

ucli's People

Contributors

freeminder avatar

Watchers

 avatar  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.