Skip to main content

Blingtron is a simple CLI tool aimed at helping developers run their II projects.

Project description

# Blingtron

[![Build Status](https://travis-ci.org/ImageIntelligence/blingtron.svg?branch=master)](https://travis-ci.org/ImageIntelligence/blingtron)
[![PyPI version](https://badge.fury.io/py/blingtron.svg)](https://badge.fury.io/py/blingtron)

**Welcome to Blingtron!**

> Assembles the upgraded [Blingtron 5000](http://www.wowhead.com/item=111821/blingtron-5000), a savage, yet generous, robot. While he will give out gifts to players once per day, he will also fight other Blingtron units to the death. (4 Hrs Cooldown)

Blingtron is a simple command line too (CLI) aimed at helping developers run their Image Intelligence projects.

## Installation

```
$ pip install blingtron
```

Projects that use Blingtron are expected to have a `.bling.json` file at the root of the project directory structure. For example:

```json
{
"name": "scala-project",
"image": "imageintelligence/scala",
"run": "sbt run",
"packer": "./packer/template.json",
"env": {
"CUSTOM_ENV_1": "a",
"CUSTOM_ENV_2": 1,
"CUSTOM_ENV_3": "abc123"
},
"start": [
"-v ./:/app",
"-v ~/.ivy2:/root/.ivy2",
"-v ~/.sbt:/root/.sbt",
"-p 127.0.0.1:8080:8080",
"-i -t",
"--rm",
"--workdir /app",
"--name", "$NAME",
"$IMAGE", "/bin/bash"
]
}
```

* `name`: The name of your project
* `run`: The command that's executed when a Docker container runs your image
* `start`: Runs your image locally and within bash
* `image`: The name of your Docker image
* `packer`: The location of your Packer JSON config template
* `env`: An object of custom environ variables you can pass into all bling commands`

See [imageintelligence/skeleton-python](https://github.com/ImageIntelligence/skeleton-python) and [imageintelligence/skeleton-scala](https://github.com/ImageIntelligence/skeleton-scala) for more examples.

## Usage

```
$ bling --help
```

**Note:** Invoking `bling` without any arguments will execute `start` with the default arguments.

## Development

Clone the project:

```
$ git clone git@github.com:ImageIntelligence/blingtron.git
```

Setup your virtualenv:

```
$ mkvirtualenv blingtron
```

Attach `bling` to your shell:

```
$ python setup.py develop
```

## Deployment

Create a `~/.pypirc` and replace the username and password with real credentials:

```
[distutils]
index-servers =
blingtron

[blingtron]
repository=https://pypi.python.org/pypi
username=xxx
password=yyy
```

Register this package to the Cheeseshop:

```
$ python setup.py register -r blingtron
```

Build a distributable and upload:

```
$ python setup.py sdist upload -r blingtron
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blingtron-0.0.3.tar.gz (5.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page