Skip to content

Commit

Permalink
Add getting started guide
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro authored and lburgazzoli committed Sep 11, 2018
1 parent 9851138 commit ac3008c
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,74 @@

Apache Camel K (a.k.a. Kamel) is a lightweight integration framework built from Apache Camel that runs natively on Kubernetes and is specifically designed for serverless and microservice architectures.

## Build
## Getting Started

You can run Camel K integrations on a Kubernetes or Openshift cluster, so you can choose to create a development cluster or use a cloud instance
for Camel K.

### Creating a Development Cluster
There are various options for creating a development cluster:

**Minishift**

You can run Camel K integrations on Openshift using the Minishift cluster creation tool.
Follow the instructions in the [getting started guide](https://github.com/minishift/minishift#getting-started) for the installation.

After installing the `minishift` binary, you need to enable the `admin-user` addon:

```
minishift addons enable admin-user
```

Then you can start the cluster with:

```
minishift start
```

**Minikube**

Minikube and Kubernetes are not yet supported (but support is coming soon).

### Setting Up the Cluster

To start using Camel K you need the **"kamel"** binary, that can be used to both configure the cluster and run integrations.

There's currently no release channel for the "kamel" binary, so you need to **build it from source!** Refer to the [building section](#building)
for information on how to do it.

Once you have the "kamel" binary, log into your cluster using the "oc" or "kubectl" tool and execute the following command to install Camel K:

```
kamel install
```

This will configure the cluster with the Camel K custom resource definitions and install the operator on the current namespace.

**Note:** Custom Resource Definitions (CRD) are cluster-wide objects and you need admin rights to install them. Fortunately this
operation can be done once per cluster. So, if the `kamel install` operation fails, you'll be asked to repeat it when logged as admin.
For Minishift, this means executing `oc login -u system:admin` before first-time installation only.

### Running a Integration

After the initial setup, you can run a Camel integration on the cluster executing:

```
kamel run Sample.java
```

A "Sample.java" file is included in the root of this repository. You can change the content of the file and execute the command again to see the changes.

### Monitoring the Status

Camel K integrations follow a lifecycle composed of several steps before getting into the `Running` state.
You can check the status of all integrations by executing the following command:

```
kamel get
```

## Building

In order to build the project follow these steps:
- this project is supposed to be cloned in `$GOPATH/src/github.com/apache/camel-k`
Expand Down
1 change: 1 addition & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ clean:
go clean
rm -f camel-k-operator
rm -f kamel
rm -rf tmp/_maven_output

codegen:
./tmp/codegen/update-generated.sh
Expand Down

0 comments on commit ac3008c

Please sign in to comment.