Coder Social home page Coder Social logo

cocaine-vagrant's Introduction

Overview

This project provides a mechanism to set up a Vagrant VM with the following Cocaine Cloud components:

  • Cocaine Core
  • Cocaine Runtime
  • Cocaine Framework Python (with embedded cocaine proxy)

Requirements

  • VirtualBox

  • Vagrant

    • Download it from http://www.vagrantup.com (version 1.5.4 or higher)
    • Install required plugins:
      vagrant plugin install vagrant-omnibus
      vagrant plugin install vagrant-berkshelf --plugin-version '>= 2.0.1'
  • Ruby 1.9.3

Installation

git clone https://github.com/cocaine/cocaine-vagrant.git
cd cocaine-vagrant
vagrant up

Running Cocaine Cloud

  • shell into the VM if you are not already there
vagrant ssh

Test Your Cocaine Cloud Instance

At this point, there is one application running - QR-code generator. To be sure, that it is running, type:

cocaine-tool info

The answer will be (approximately):

{
    "apps": {
        "qr": {
            "load-median": 0, 
            "profile": "default", 
            "sessions": {
                "pending": 0
            }, 
            "queue": {
                "depth": 0, 
                "capacity": 100
            }, 
            "state": "running", 
            "slaves": {
                "active": 0, 
                "idle": 1, 
                "capacity": 4
            }
        }
    }
}

In this example we provide embedded http proxy for Cocaine applications. Check if it is running:

sudo cocaine-tool proxy status

If the answer is something like Running: 4893 (pid number may vary) that's ok.

Finally, open your browser at your wish and type:

http://localhost:48080/qr/generate/?message=Hello,%20cocaine%20world!

The cloud application shows answer to you.

cocaine-vagrant's People

Contributors

3hren avatar femueller avatar ilyar avatar noxiouz 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.