opencompose

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 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

Binary installation

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

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

# macOS
curl -L https://github.com/redhat-developer/opencompose/releases/download/v0.2.0/opencompose-darwin-amd64 -o opencompose

# Windows
curl -L https://github.com/redhat-developer/opencompose/releases/download/v0.2.0/opencompose-windows-amd64.exe -o opencompose.exe

chmod +x ./opencompose
sudo mv ./opencompose /usr/local/bin/opencompose
Go (from source)

A simple go get is all you need in order to develop OpenCompose from source.

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

However, in order to file an issue, you may have to build it the supported way:

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

In order to have a properly signed build (as denoted by ./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