Skip to content

Commit

Permalink
[#1041] Replace Vagrant with Minikube provider (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismatix authored Mar 19, 2021
1 parent 64e96c5 commit 636e3ae
Show file tree
Hide file tree
Showing 88 changed files with 907 additions and 1,051 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# Airy Bazel tools
git_repository(
name = "com_github_airyhq_bazel_tools",
commit = "b34a57be44e3cdf739e074dde1c3db5b5347cc35",
commit = "26b09cbd5091d9cb2904abc0c5b2a50c4b76fb3a",
remote = "https://github.com/airyhq/bazel-tools.git",
shallow_since = "1615392891 +0100",
shallow_since = "1615818859 +0100",
)

load("@com_github_airyhq_bazel_tools//:repositories.bzl", "airy_bazel_tools_dependencies", "airy_jvm_deps")
Expand Down Expand Up @@ -137,7 +137,7 @@ go_embed_data_dependencies()
go_register_toolchains(
nogo = "@//:airy_nogo",
version = "1.16",
) # my_nogo is in the top-level BUILD file of this workspace
) # airy_nogo is in the top-level BUILD file of this workspace

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

Expand Down
7 changes: 3 additions & 4 deletions docs/docs/apps/ui/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ in to the UI**

## Introduction

The easiest way to see the Airy Core UI in action is to launch the [Vagrant
Box](getting-started/installation/vagrant.md) and then follow these three simple
The easiest way to see the Airy Core UI in action is to launch the [minikube
provider](getting-started/installation/minikube.md) and then follow these three
steps.

## Step 1: Registration
Expand All @@ -48,8 +48,7 @@ airy api signup

## Step 2: Open the UI

Either go to [airy.core/ui/login](http://airy.core/ui/login) in your browser or execute
this [CLI command](cli/reference.md#api-login):
Run this [CLI command](cli/reference.md#ui):

```bash
airy ui
Expand Down
47 changes: 35 additions & 12 deletions docs/docs/cli/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ title: Command Reference
sidebar_label: Reference
---

## Api Endpoint

Get the endpoint of the Airy Core API

```
airy api endpoint [flags]
```

#### Options

```
-h, --help help for endpoint
```

#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```


***

## Api Login

Login into an Airy Core instance
Expand All @@ -22,7 +46,7 @@ airy api login [flags]
#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```

Expand Down Expand Up @@ -50,7 +74,7 @@ airy api signup [flags]
#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```

Expand All @@ -74,10 +98,9 @@ airy config apply [flags]
#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--cli-config string config file (default is $HOME/.airy/cli.yaml)
--config string Configuration file for an Airy Core instance (default "./airy.yaml")
--kube-config string Kubernetes config file for the cluster of an Airy Core instance (default "~/.airy/kube.conf")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
--config string Configuration file for an Airy Core instance (default "./airy.yaml")
```


Expand All @@ -96,13 +119,13 @@ airy create [flags]
```
-h, --help help for create
--namespace string (optional) Kubernetes namespace that Airy should be installed to. (default "default")
--provider string One of the supported providers (aws|local|minikube). (default "local")
--provider string One of the supported providers (aws|minikube). (default "local")
```

#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```

Expand All @@ -126,7 +149,7 @@ airy init [flags]
#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```

Expand All @@ -150,7 +173,7 @@ airy status [flags]
#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```

Expand All @@ -174,7 +197,7 @@ airy ui [flags]
#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```

Expand All @@ -198,7 +221,7 @@ airy version [flags]
#### Options inherited from parent commands

```
--apihost string Airy Core HTTP API host (default "http://airy.core")
--apihost string Airy Core HTTP API endpoint
--cli-config string config file (default is $HOME/.airy/cli.yaml)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/concepts/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Here's an outline of the process:
- We clean up the draft release and name it `x.y.z`
- We run `./scripts/release.sh start x.y.z`
- Once release days comes, we execute the following steps:
- We test our release (`./scripts/bootstrap.sh`) and any
- We test our release (`airy create --provider=minikube`) and any
additional hot-fix is committed directly to the release branch
- Once we're satisfied with the release, we finish the release by running `./scripts/release.sh finish x.y.z`
- We update the version string and the sha in the [Homebrew Formula](https://github.com/airyhq/homebrew-airy/blob/main/Formula/cli.rb) for the CLI.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/getting-started/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ These settings are used to connect the **Airy Components** to your Kafka cluster
- `endpoint` in `<HOSTNAME>:<PORT>` format
- `dbName` name of the database in the PostgreSQL server
- `username` these credentials will be passed to the **API Auth Component**
- `password` and they will be used to create the Postgres if you are deploying with **Vagrant**
- `password` and they will be used to create the Postgres database

### Components

Expand Down Expand Up @@ -82,5 +82,5 @@ These settings are used to enable or disable some external tools, used to monito
If you made changes in `airy.yaml` and want to apply it to your instance you can use the [airy config apply](/cli/reference.md#config-apply) by running the following [Airy CLI](/cli/installation.md) command.

```bash
airy config apply --config ./airy.yaml --kube-config /path/to/your/kube.conf
airy config apply --config ./airy.yaml
```
8 changes: 4 additions & 4 deletions docs/docs/getting-started/installation/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import useBaseUrl from "@docusaurus/useBaseUrl";
import TLDR from "@site/src/components/TLDR";
import ButtonBoxList from "@site/src/components/ButtonBoxList";
import ButtonBox from "@site/src/components/ButtonBox";
import VagrantSVG from "@site/static/icons/vagrant.svg";
import KafkaSVG from "@site/static/icons/kafka.svg";
import Minikube from "@site/static/icons/minikube.svg";
import RocketSVG from "@site/static/icons/rocket.svg";

<TLDR>
Expand All @@ -32,10 +32,10 @@ description='Install the Airy Core CLI application'
link='/cli/installation'
/>
<ButtonBox
icon={() => <VagrantSVG />}
title='Local test environment with Vagrant'
icon={() => <Minikube />}
title='Local test environment with Minikube'
description='Step by step guide to run Airy Core on your local machine'
link='getting-started/installation/vagrant'
link='getting-started/installation/minikube'
/>
<ButtonBox
icon={() => <KafkaSVG />}
Expand Down
81 changes: 81 additions & 0 deletions docs/docs/getting-started/installation/minikube.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: Minikube
sidebar_label: Minikube
---

import useBaseUrl from '@docusaurus/useBaseUrl';

The goal of this document is to provide an overview of how to run Airy Core on
your local machine using [minikube](https://minikube.sigs.k8s.io/).

## Creating a cluster

First download and install minikube from their [release page](https://github.com/kubernetes/minikube/releases) and the [Airy CLI](cli/installation.md).
Now you can run this command, which will create a new minikube cluster on your system and install Airy core on it:

```bash
airy create --provider=minikube
```

This will print URLs for accessing the UIs and APIs as seen in this recording:

import Script from "@site/src/components/Script";

<Script data-cols="90" id="asciicast-KHz6yTASgqwnKT5FB7Gt7jF1k" src="https://asciinema.org/a/KHz6yTASgqwnKT5FB7Gt7jF1k.js"></Script>

If you want to customize your `Airy Core` instance please see our [Configuration Section](configuration.md).

## Public webhooks

In order to integrate with the webhook of most sources on your local machine,
we include a [ngrok](https://ngrok.com/) as a deployment to tunnel the traffic to the ingress controller.
ngrok is an open source reverse proxy which
creates a secure tunnel from a public endpoint to a local service. The ngrok
client connects to a ngrok server which has public access to the internet and
then provides a reversed proxy connectivity back to the webhook services,
running inside the Kubernetes cluster.

To get the ngrok URL of your local Airy Core installation you can run:

```sh
echo "https://$(minikube -p airy-core kubectl -- get cm core-config -o jsonpath='{.data.CORE_ID}').tunnel.airy.co"
```

By default, the ngrok client is configured to use the ngrok server created by
Airy and runs on https://tunnel.airy.co. This configuration is specified in
the `ngrok-client-config` ConfigMap.

```
apiVersion: v1
kind: ConfigMap
metadata:
name: ngrok-client-config
namespace: default
data:
config.yml: |
server_addr: proxy.tunnel.airy.co:4443
trust_host_root_certs: true
```

If you prefer to use your own ngrok implementation or point the ngrok client to
connect to the service provided by the ngrok company at `https://ngrok.io`,
change the setting for `server_addr` in the ConfigMap.

## Where to go from here

Now that you have a running local installation of Minikube you can connect it to messaging sources. Check out the
[source documentation](/sources/introduction.md) to learn more.

## Third party tools

Third party tools can be activated in the `airy.yaml` configuration file, under the `tools` section.
For more details please see our [Configuration Section](configuration.md).

## Uninstall Airy Core

You can remove the Airy Core minikube node from your machine completely running
the following command:

```sh
minikube -p airy-core destroy
```
Loading

0 comments on commit 636e3ae

Please sign in to comment.