Skip to content

Commit

Permalink
Document the various install methods in the README (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyaray committed Jun 7, 2018
1 parent ac0a148 commit 29e2f72
Showing 1 changed file with 66 additions and 7 deletions.
73 changes: 66 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,86 @@

## Install

The CLI has pre-built binaries for mac, linux, and windows, on both i386 and x86_64 architectures.

You can download a tarball or a deb package with the binaries. These are both on Github releases and in S3.

Alternatively, you can install from homebrew or using a `curl | bash` one-liner.

The big gotcha right now is that these all require access to the Github repo which isn't open source yet.
So you have to setup ~/.netrc for `curl | bash`, an env var for homebrew, or `~/.aws/credentials` for s3 packages/deb.

Before we GA the CLI, we'll either need to open source the CLI or rework the tooling to be based on a public S3 bucket
instead of Github releases.

**Be sure to setup permissions following the directions for your chosen installation method.**

### Brew

Setup the Confluent Cloud brew tap:

brew tap confluentinc/ccloud

For now, the CLI is private so you'll need to use your Github token:
For now, you'll need to use your Github token:

HOMEBREW_GITHUB_API_TOKEN=xxx brew install confluent-cli

### S3
The personal access token must have the `repo` permission.

### One Liner

If you don't use a Mac, the simplest way to install is with this one-liner.

Add this to your `~/.netrc`:

machine api.github.com
login yourusername
password yourpassword_or_personalaccesstoken

The personal access token must have the `repo` permission.

Now install the CLI with

curl -sL https://git.io/vhuDX | bash

It'll install in `./bin` by default. **You MUST add `./bin` to your `$PATH`.**

You can also install to a specific directory. For example, install to `/usr/local/bin` by running:

curl -sL https://git.io/vhuDX | sudo bash -s -- -b /usr/local/bin

Note: We'll create a nicer short link before we GA the CLI.
(Most link shorteners don't allow you to the change the underlying URL later. So don't claim it before we're ready.)

### Deb Package from S3

If you run Debian/Ubuntu, you can download a deb package from a private S3 bucket.

This requires your Confluent AWS engineering creds setup in your `[default]` AWS profile locally, like normal.

To download the deb for a particular version, run

VERSION=0.10.0
OS=Linux
ARCH=x86_64
aws s3 cp s3://cloud-confluent-bin/cli/${VERSION}/confluent-cli_${VERSION}_${OS}_${ARCH}.deb .

To install the CLI:

sudo apt install ./confluent-cli_${VERSION}_${OS}_${ARCH}.tar.gz

### Binary Tarball from S3

You can also download a binary tarball from a private S3 bucket.

We're publishing pre-built binaries to a private S3 bucket. Make sure you have your AWS
engineering creds setup in your `[default]` AWS profile locally, like normal.
This requires your Confluent AWS engineering creds setup in your `[default]` AWS profile locally, like normal.

To list all available packages for a version:

VERSION=0.6.0
VERSION=0.10.0
aws s3 ls s3://cloud-confluent-bin/cli/${VERSION}/

To download the CLI for your OS and architecture:
To download a tarball for your OS and architecture:

OS=Darwin
ARCH=x86_64
Expand All @@ -37,7 +96,7 @@ To install the CLI:
tar -xzvf confluent-cli_${VERSION}_${OS}_${ARCH}.tar.gz
sudo mv confluent-cli_${VERSION}_${OS}_${ARCH}/confluent* /usr/local/bin

Note: components must be installed in your `$PATH` for the CLI to pick them up.
**Note: You MUST add the plugin binaries to your `$PATH` for the CLI to work.**

## Developing

Expand Down

0 comments on commit 29e2f72

Please sign in to comment.