Code Monkey home page Code Monkey logo

yucc's Introduction

YUCC - Your UpCloud CLI

A CLI for the UpCloud API. Still a work in progress.

Installation and configuration

Install from source

Clone the repository and run pip install ., either globally or in a virtual environment.

Install from PyPI

Run pip install yucc. You may need to prepend the command with sudo

Configuration

The CLI makes use of a hidden .yuccrc-file in your home directory. This is an example of what it looks like:

[default]
username = user
password = passw0rd
default_zone = de-fra1

[profile2]
username = other_user
password = passw0rd

This file defines profiles for the CLI to use. If none is specified, it uses default (by default). Make shure this file is accessible only by your user (600 permissions), as it does contain sensitive information.

Run yucc --help or yucc -h to get a glimpse of what the tool offers.

Usage

To list the plans that are available, type: yucc ls plans

To list the zones that are available, type: yucc ls zones

To create a server, do something like this:

yucc server create --hostname server1 --plan 1xCPU-1GB \
    --os "CentOS 7.0" \
    --login-user user --ssh-key ssh_public_key_file.pub \
    --ensure-started

The tool returns the UUID of the created server. The server is created in the default zone specified in the default profile. To override the zone, add the --zone <zone> parameter.

To restart an existing server, type: yucc server restart <uuid>

To stop an existing server, type: yucc server stop <uuid>

To remove an existing server, type: yucc server delete <uuid>. To also delete storage devices associated with the server, add the --delete-storages flag.

To list all servers, run: yucc ls servers.

Todo

  • Add tags on server creation
  • IP address management, including listing IPs, assigning, etc...
  • Storage management, attaching, detaching, etc...

Contributing

If you feel a feature is missing, find a bug or have any suggestions, please feel free to create an issue or open a pull request :)

License

The project is MIT licensed.

yucc's People

Contributors

erikns avatar gwillem avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

gwillem mklatsky

yucc's Issues

--zone is not recognized

Hi,
First of all thanks for this great tool!

based on your description --zone can be specified along yucc server create command. The command i am using

yucc server create --hostname sg002 --plan "1xCPU-1GB" --os "Ubuntu 16.04" --zone "sg-sin1"     --login-user vpn1 --ssh-key /root/.ssh/id_rsa.pub --ensure-started
==> You have not set a default deployment zone. It will need to be provided.
==> Zone is required

I have removed the default zone on purpose because, with it, it also did not recognize --zone option. What do i wrong please?

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.