GithubHelp home page GithubHelp logo

zak-hassan / oshinko-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from radanalyticsio/oshinko-cli

0.0 2.0 0.0 40.97 MB

Command line interface for spark cluster management app

License: Apache License 2.0

Makefile 0.14% Go 61.25% Shell 38.10% Awk 0.15% Python 0.36%

oshinko-cli's Introduction

Build Status

Oshinko Cli

Command line interface for spark cluster management app

Usage

You will need to login using the oc command and then perform the following commands to get a list of running spark clusters

make build
./_output/oshinko-cli get --insecure-skip-tls-verify=true --token=$(oc whoami -t) -o json

Oshinko Application

The oshinko application manages Apache Spark clusters on OpenShift. The application consists of a REST server (oshinko-rest) and a web UI and is designed to run in an OpenShift project.

This repository contains tools to launch the oshinko application along with the source code for the oshinko REST server in the rest subdirectory. The source code for the web UI is located in a different repository.

Deploying the oshinko application in the current project

For the most complete usage of oshinko-rest, we recommend installing the entire oshinko suite using the tools/oshinko-deploy.sh script. It will pull the latest upstream images from the radanalyticsio organization.

First log into an OpenShift installation as your user, then use this command to deploy the oshinko application into the current project:

$ ./tools/oshinko-deploy.sh -u $(oc whoami) -p $(oc project --short)

For more information on what you can do with the oshinko-deploy.sh script, see the rest/HACKING doc.

Building and running the oshinko-rest binary

To build the oshinko-rest binary simply run the build or install target in the makefile in the rest subdirectory

Example

$ cd rest
$ make build

Assuming a successful build, the output will be stored in the _output directory. For an install target, the binary will be placed in your $GOPATH/bin.

Running oshinko-rest

For most functionality an OpenShift cluster will be needed, but the application can be tested for basic operation without one.

Example

After building the binary a basic test can be performed as follows:

  • start the server in a terminal
    $ _output/oshinko-rest-server --port 42000 --scheme http
    2016/07/14 16:41:00 Serving oshinko rest at http://127.0.0.1:42000
  • in a second terminal run a small curl command against the server
    $ curl http://localhost:42000/
    {"application":{"name":"oshinko-rest-server","version":"0.1.0"}}

The return value may be different depending on the version of the server you have built

TLS

To start the server with TLS enabled, you will need to supply a certificate file and a key file for the server to use. Once these files are created you can start the server as follows to enable HTTPS access:

    $ _output/oshinko-rest-server --port 42000 --tls-port 42443 --tls-key keyfile.key --tls-certificate certificatefile.cert
    2016/09/28 12:10:47 Serving oshinko rest at http://127.0.0.1:42000
    2016/09/28 12:10:47 Serving oshinko rest at https://127.0.0.1:42443

At this point the server is ready to accept both HTTP and HTTPS requests. If you would like to restrict access to only use TLS, add the --scheme https flag to the command line as follows:

    $ _output/oshinko-rest-server --scheme https --tls-port 42443 --tls-key keyfile.key --tls-certificate certificatefile.cert
    2016/09/28 12:10:47 Serving oshinko rest at https://127.0.0.1:42443

Further reading

Please see the rest/CONTRIBUTING and rest/HACKING docs for more information about working with this codebase and the docs directory for more general information on usage.

oshinko-cli's People

Contributors

tmckayus avatar elmiko avatar sub-mod avatar mattf avatar nicolaferraro avatar robgeada avatar

Watchers

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