opencompose

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

README

OpenCompose

Build Status

The goal of OpenCompose is to make it easier for developers to on-board to Kubernetes. OpenCompose is a declarative higher level abstraction for specific Kubernetes resources.

Very simple idea, isn't it? A developer shouldn't have to learn various Kubernetes concepts just to test and deploy their applications. Focus on the application that is being developed.

We are at a very evolving stage of this project and we have listed some of our ideas as issues and examples. We are open to suggestions and contributions from the Kubernetes community as our project grows. Please send any PRs, issues or RFCs to improve this project.

Installation
Binaries

You can retrieve binaries for Linux, macOS and Windows on our GitHub release page.

Linux

If you prefer to do it straight from CLI here's a one-liner for you:

curl -L https://github.com/redhat-developer/opencompose/releases/download/v0.1.0/opencompose-linux-amd64 -o opencompose

and if you want it installed system-wide:

sudo mv ./opencompose /usr/local/bin/
From source

You can easily build OpenCompose tool from source. All you need is Go:

go get -u github.com/redhat-developer/opencompose

Although go get installation works for just trying it out, if you want to submit bug reports you have to build it the supported way:

go get -u -d github.com/redhat-developer/opencompose
make install -C $GOPATH/src/github.com/redhat-developer/opencompose/

This will ensure proper output of opencompose version.

Example
  1. Create or download hello-nginx.yaml.
version: 0.1-dev
services:
- name: helloworld
  containers:
  - image: tomaskral/nonroot-nginx
    ports:
    - port: 8080
  1. Convert OpenCompose file to Kubernetes objects
opencompose convert -f hello-nginx.yaml

Alternatively, you could also simply pass the URL of the remote file to OpenCompose, like -

opencompose convert -f https://raw.githubusercontent.com/redhat-developer/opencompose/master/examples/hello-nginx.yaml

This will create two Kubernetes files in current directory - helloworld-deployment.yaml and helloworld-service.yaml.

To deploy your application to Kubernetes run:

kubectl create -f helloworld-service.yaml -f helloworld-deployment.yaml
Command-line Completions
Bash

For Bash auto completion run the following command:

source <(opencompose completion bash)

To make it permanent add this line to your ~/.bashrc.

Zsh

For Zsh auto completion run the following command:

source <(opencompose completion zsh)

To make it permanent add this line to your ~/.zshrc.

Documentation
Community

We always welcome your feedback and thoughts on the project! Come and join our mailing list - opencompose [at] googlegroups.com. We also hangout on slack.k8s.io (#sig-apps).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL