Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1041] Minikube provider #1179

Merged
merged 38 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
31cafc1
provider must be installed
Mar 9, 2021
3bd58c9
create cluster
Mar 9, 2021
4b2c091
Add ngrok and docs
Mar 12, 2021
c27ee20
Make ngrok public URL work
Mar 12, 2021
f5ebe6f
Provision and print endpoints
Mar 12, 2021
a1dbd33
Deliver minikube host to frontend apps and dev environment
Mar 15, 2021
74857b5
Add asciinema demo
Mar 15, 2021
ccbc1c8
Remove vagrant scripts
Mar 15, 2021
7281182
Restructure the hosts config to make the ui command work
Mar 16, 2021
190464c
Introduce the endpoint command to more easily use the host in the docs
Mar 16, 2021
d72cdde
clean up command
Mar 16, 2021
10400d7
Remove remaining mentions of airy.core
Mar 16, 2021
317e30c
Merge branch 'develop' into feat/minikube-provider
Mar 16, 2021
0211d03
lint
Mar 16, 2021
d9dfdff
Fix to scripts component
Mar 16, 2021
b945bfb
fix the integration test
Mar 16, 2021
6e17e9f
fix icon
Mar 16, 2021
bc2da29
Apply suggestions from code review
chrismatix Mar 16, 2021
3ec7b1f
clean up error code a bit
Mar 16, 2021
95b06e2
Update infrastructure/cli/pkg/providers/minikube/minikube.go
chrismatix Mar 16, 2021
4af9dc0
Update docs/docs/apps/ui/quickstart.md
chrismatix Mar 16, 2021
8f581d8
integrate ljupco's doc suggestions
Mar 16, 2021
3d4812a
Bring back airy.core using the hosts file
Mar 17, 2021
b57bc68
Doc and code fixes for airy.core
Mar 17, 2021
d118170
fix gazelle
Mar 17, 2021
25f8c64
fix typo
Mar 17, 2021
88aeed6
Config command uses stored kube context
Mar 17, 2021
a8cbf3b
Apply suggestions from code review
chrismatix Mar 17, 2021
af320e6
fixes to the minikube installation
Mar 17, 2021
0cad543
Fix version file
Mar 17, 2021
10003d7
misc. fixes
Mar 18, 2021
17ef1e2
lint
Mar 18, 2021
35fd4c9
Merge remote-tracking branch 'origin/develop' into feat/minikube-prov…
Mar 18, 2021
7667ce8
Add ngrok ingress
Mar 18, 2021
c15ccf1
Fix variable templating and docs
Mar 18, 2021
91a93b6
Add colored and indentend output for providers
Mar 18, 2021
ae6090f
Merge remote-tracking branch 'origin/develop' into feat/minikube-prov…
Mar 19, 2021
4dd3ded
update screencast id
Mar 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0-alpha
christophproschel
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 simple
chrismatix marked this conversation as resolved.
Show resolved Hide resolved
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
3 changes: 2 additions & 1 deletion docs/docs/cli/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ the Airy Core directly from your terminal.
| Command | Effect |
| ------------------- | ---------------------------------------------------------------------------------- |
| `airy init` | Inits your airy configuration |
| `airy create` | Installs Airy Core using an infrastructure provider |
| `airy status` | Reports the status of an Airy Core instance |
| `airy config apply` | Applies configuration values from airy.yaml configuration to an Airy Core instance |
| `airy ui` | Opens the Airy Core UI in your local browser |
| `airy api signup` | Creates a default user |
| `airy api login` | Returns a valid jwt token |
| `airy api login` | Returns a valid jwt token |
| `airy api endpoint` | Returns the endpoint of the Airy API |
| `airy --help` | Prints all available commands with parameters |
42 changes: 33 additions & 9 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,7 +98,7 @@ airy config apply [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)
--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")
Expand All @@ -96,13 +120,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 +150,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 +174,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 +198,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 +222,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
chrismatix marked this conversation as resolved.
Show resolved Hide resolved
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
2 changes: 1 addition & 1 deletion 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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the ### Applying the configuration section, we should also remove the --kube-config flag, for applying the configuration.

Expand Down
7 changes: 3 additions & 4 deletions docs/docs/getting-started/installation/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ 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 RocketSVG from "@site/static/icons/rocket.svg";

Expand All @@ -32,10 +31,10 @@ description='Install the Airy Core CLI application'
link='/cli/installation'
/>
<ButtonBox
icon={() => <VagrantSVG />}
title='Local test environment with Vagrant'
icon={() => <img style={{width:"32px", marginRight:"12px"}} alt="minikube" src={useBaseUrl('img/getting-started/installation/minikube.png')} />}
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
84 changes: 84 additions & 0 deletions docs/docs/getting-started/installation/minikube.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
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:

<div id="asciicast-A9sTPeYDKJ2ky2hauwumzFEwQ" ></div>

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

<Script data-rows="12" id="asciicast-A9sTPeYDKJ2ky2hauwumzFEwQ" src="https://asciinema.org/a/A9sTPeYDKJ2ky2hauwumzFEwQ.js"></Script>
lucapette marked this conversation as resolved.
Show resolved Hide resolved

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/) client as a sidecar 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 to your local Airy Core installation you can run:
chrismatix marked this conversation as resolved.
Show resolved Hide resolved

```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 run on https://tunnel.airy.co. This configuration is specified in
chrismatix marked this conversation as resolved.
Show resolved Hide resolved
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.

## Connect sources

Integrating sources into the `Airy Core` often requires specific configuration
settings, refer to the [source specific docs](/sources/introduction.md) for details.

## External tools

The optional external 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
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also write a note to delete the record from the /etc/hosts file.
Even though it is not actually a problem, as when the new instance starts - it overwrites the existing one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wouldn't bother with this for now. Since it does not break anything. Eventually we should have an airy destroy command where we track this for each provider


Loading