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

Add Tunnelmole as an open source tunneling option #3665

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
43 changes: 35 additions & 8 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,23 +168,50 @@ If you need to access local anchore server, uncomment the related services in `d
and restart the environment with `make start`.
You can specify your own default Anchore policy bundle by adding a `json` file to the `config/anchore/policies` directory.

#### Accessing Pipeline API from the cluster
### Accessing Pipeline API from the cluster using Tunnelmole

If you want to launch PKE clusters, you will need to ensure that the pke-tool running on the cluster will access the Pipeline API.
In a development environment you can do this for example with the following
[ngrok](https://ngrok.com/) command: `ngrok http https://localhost:9090` (HTTPS
requires free registration).
Tunnelmole is an open source tunneling tool that will generate a Public URL pointing to Pipeline API running on your local machine. You can find its source code on its [GitHub Page](https://github.com/robbie-cahill/tunnelmole-client).

You will also need to adjust the `pipeline.external.url` configuration value.
In the `pipeline` section of `config/config.yaml` you can add the value like below:
#### Tunnelmole Installation

You can install Tunnelmole using one of the following options:

- Using NPM: `npm install -g tunnelmole`
- On Linux: `curl -s https://tunnelmole.com/sh/install-linux.sh | sudo bash`
- On Mac: `curl -s https://tunnelmole.com/sh/install-mac.sh --output install-mac.sh && sudo bash install-mac.sh`
- On Windows: If you don't have NodeJS installed, download the `exe` file for Windows [here](https://tunnelmole.com/downloads/tmole.exe) and put it somewhere in your PATH. If you have NodeJS installed, use NPM to install Tunnelmole.

#### Using Tunnelmole

Assuming Pipeline API is running on port 8000, Run `tmole 8000` (If not, change that number to the port number). You should get an output similar to the one below:

```shell
➜ ~ tmole 8000
http://bvdo5f-ip-49-183-170-144.tunnelmole.net is forwarding to localhost:8000
https://bvdo5f-ip-49-183-170-144.tunnelmole.net is forwarding to localhost:8000
```

After launching Tunnelmole, make sure to adjust the `pipeline.external.url` configuration value in the `pipeline` section of `config/config.yaml` accordingly:

```yaml
pipeline:
external:
# Base URL where the end users can reach this pipeline instance
url: "http://<YOUR_NGROK_NUMBER>.ngrok.io/pipeline"
url: "https://bvdo5f-ip-49-183-170-144.tunnelmole.net/pipeline"
```

### Accessing Pipeline API from the Cluster Using ngrok

ngrok is a popular closed source tunneling tool that can be used to give the pke-tool running on your cluster access to the Pipeline API. You can use ngrok with the following command: `ngrok http https://localhost:9090` (HTTPS requires free registration).

After launching ngrok, you will need to adjust the `pipeline.external.url` configuration value in the `pipeline` section of `config/config.yaml` accordingly:

```yaml
pipeline:
external:
# Base URL where the end users can reach this pipeline instance
url: "http://<YOUR_NGROK_NUMBER>.ngrok.io/pipeline"

#### Helm S3 repositories

To be able to handle S3 repositories with Pipeline helm-s3 need to be installed in case you have helm installed on your machine:
Expand Down