Giter VIP home page Giter VIP logo

mico's Introduction

Mico: a monkey in the cloud

Mico is a tool-toy to manage a number of hosts deployed in cloud services (currently only support Amazon AWS), and also allows you to deploy new hosts with specified template or create autoscaling groups and manage them easily.

Latest PyPI version Number of PyPI downloads

Installation

As usual, mico is available from pypi, and can be installed using pip:

pip install mico

Mico just need an AWS key ID and AWS secret key to run. By default mico just take this variables from the OS environment:

export AWS_ACCESS_KEY_ID="*foo*"
export AWS_SECRET_ACCESS_KEY="*bar*"

QuickStart

Mico works using the concept of template. A template is just a python code (with steroids which we call libraries), the template can implements a number of actions to perform in the cloud. In this example we just create a new host in AWS and install some packages there.

from mico.lib.aws import *
from mico.lib.core import *

def deploy(*args):
    for host in args:
        instance = ec2_ensure(
            ami = "ami-3d4ff254",
            name = host,
            instance_type = "t1.micro",
            key_name = "root-us-east-virginia",
            security_groups = "sec-test"
        )

        package_ensure("python") # of course :)
        package_ensure("apache")

Once, your template is created, you need to put it into a mico template path (by default uses /etc/mico and ~/.config/mico/, and the current working directory.

Then you can just run mico

$ mico template:deploy myhost1.mydomain.com myhost2.mydomain.com
mico:cloud:deploy:create security group: sec-test
mico:cloud:deploy:create instance: i-4543123
mico:cloud:deploy:use existent security group: sec-test
mico:cloud:deploy:create instance: i-2291281

You can see more complex (and useful!) templates in examples directory.

View template examples

mico's People

Contributors

sp-borja-juncosa avatar sp-guillem-anguera avatar apenav avatar

Watchers

James Cloos avatar Jordi Miró avatar Vicent Soria avatar Annelis Gutiérrez avatar Miguel Ibero 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.