Skip to content

Commit

Permalink
docs: update instructions for helm install to use GHCR (#142)
Browse files Browse the repository at this point in the history
Updates installation guide in docs and README to reflect that the Helm
Chart is now published on GHCR and may be installed directly without
cloning the repo or running the Make commands.

Follow up to the fix to #107 (#127) and documents it as requested
[here].(#127 (comment))

Signed-off-by: Evan Baker <[email protected]>
  • Loading branch information
rbtr authored Mar 28, 2024
1 parent cb197d8 commit 12f4f89
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 36 deletions.
File renamed without changes.
5 changes: 4 additions & 1 deletion .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: azure/[email protected]
id: install
Expand All @@ -29,5 +31,6 @@ jobs:
run: |
set -euo pipefail
export TAG=$(make version)
echo $TAG
helm package ./deploy/manifests/controller/helm/retina --version $TAG
helm push retina-*.tgz oci://ghcr.io/${{ github.repository }}/charts
helm push retina-$TAG.tgz oci://ghcr.io/${{ github.repository }}/charts
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ coverage: # Code coverage.
manifests:
cd crd && make manifests && make generate

HELM_IMAGE_TAG ?= v0.0.1
HELM_IMAGE_TAG ?= v0.0.2

# basic/node-level mode
helm-install: manifests
Expand Down
49 changes: 31 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,20 @@ Retina has two major features:

### Metrics Quick Install Guide

Prerequisites: Go, Helm

1. Clone the repo, then install Retina on your Kubernetes cluster
Retina can be installed using the Helm chart from GHCR:

```bash
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
--version v0.0.2 \
--set image.tag=v0.0.2 \
--set operator.tag=v0.0.2 \
--set logLevel=info \
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\]"
```

```bash
make helm-install
```
Set the `version` and image `tag` arguments to the desired version, if different.

2. Follow steps in [Using Prometheus and Grafana](https://retina.sh/docs/installation/prometheus-unmanaged) to set up metrics collection and visualization.
After Helm install, follow steps in [Using Prometheus and Grafana](https://retina.sh/docs/installation/prometheus-unmanaged) to set up metrics collection and visualization.

### Captures Quick Start Guide

Expand Down Expand Up @@ -82,15 +87,23 @@ For further CLI documentation, see [Capture with Retina CLI](https://retina.sh/d

#### Captures via CRD

Prerequisites: Go, Helm

1. Clone the repo, then install Retina with Capture operator support on your Kubernetes cluster

```bash
make helm-install-with-operator
```
Install Retina using Helm:

```bash
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
--version v0.0.2 \
--set image.tag=v0.0.2 \
--set operator.tag=v0.0.2 \
--set image.pullPolicy=Always \
--set logLevel=info \
--set os.windows=true \
--set operator.enabled=true \
--set operator.enableRetinaEndpoint=true \
--skip-crds \
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\,packetparser\]"
```

2. Follow steps in [Capture CRD](https://retina.sh/docs/captures/#option-2-capture-crd-custom-resource-definition) for documentation of the CRD and examples for setting up Captures.
Then follow steps in [Capture CRD](https://retina.sh/docs/captures/#option-2-capture-crd-custom-resource-definition) for documentation of the CRD and examples for setting up Captures.

## Contributing

Expand Down Expand Up @@ -129,9 +142,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope

## Contact

For bugs or feature requests, open an [issue](https://github.com/microsoft/retina/issues).
For security or vulnerability concerns, see [SECURITY.md](SECURITY.md).
For other communication, contact the maintainers at <[email protected]>
For bugs or feature requests, open an [issue](https://github.com/microsoft/retina/issues).
For security or vulnerability concerns, see [SECURITY.md](SECURITY.md).
For other communication, contact the maintainers at <[email protected]>.

[goreport-img]: https://goreportcard.com/badge/github.com/microsoft/retina
[goreport]: https://goreportcard.com/report/github.com/microsoft/retina
Expand Down
4 changes: 2 additions & 2 deletions deploy/manifests/controller/helm/retina/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ os:
operator:
enabled: false
repository: ghcr.io/microsoft/retina/retina-operator
tag: "v0.0.1"
tag: "v0.0.2"
installCRDs: true
enableRetinaEndpoint: false
capture:
Expand All @@ -22,7 +22,7 @@ image:
initRepository: ghcr.io/microsoft/retina/retina-init
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.0.1"
tag: "v0.0.2"

enablePodLevel: false
remoteContext: false
Expand Down
29 changes: 19 additions & 10 deletions docs/contributing/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit [https://cla.opensource.microsoft.com](https://cla.opensource.microsoft.com).

Expand All @@ -19,13 +19,13 @@ contact [[email protected]](mailto:[email protected]) with any additio
[Meeting Link](https://teams.microsoft.com/l/meetup-join/19%3ameeting_OGE5ZTljM2ItNmNmMC00ZmMzLThjMjktNmNjZGE3ODAyZDVj%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%22e430e8c5-dd91-4c3c-88c2-6e258812501b%22%7d)

```shell
Meeting ID: 212 979 978 795
Passcode: YjWUEA
Meeting ID: 212 979 978 795
Passcode: YjWUEA
________________________________________
Dial-in by phone
+1 323-849-4874,,951863362# United States, Los Angeles
Find a local number
Phone conference ID: 951 863 362#
Dial-in by phone
+1 323-849-4874,,951863362# United States, Los Angeles
Find a local number
Phone conference ID: 951 863 362#
```

## Development
Expand Down Expand Up @@ -83,15 +83,15 @@ To build a `retina-agent` container image with specific tag:

```bash
make retina-image # also pushes to image registy
make retina-operator-image
make retina-operator-image
```

To build binary of a plugin and test it

```bash
# Test packetforward.
$ cd <Retina_repository>/test/plugin/packetforward
$
$
$ go build . && sudo ./packetforward
info metrics Metrics initialized
info packetforward Packet forwarding metric initialized
Expand All @@ -107,7 +107,16 @@ debug packetforward Received PacketForward data {"Data": "IngressBytes:8
### Deploying on Kubernetes Cluster

1. Create Kubernetes cluster.
2. Install Retina: `make helm-install`
2. Install Retina using Helm:

```bash
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
--version v0.0.2 \
--set image.tag=v0.0.2 \
--set operator.tag=v0.0.2 \
--set logLevel=info \
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\]"
```

### Verify Deployment

Expand Down
57 changes: 53 additions & 4 deletions docs/installation/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,81 @@ Note: you can also run captures with just the [CLI](./cli.md).

## Installation

When installing with helm, substitute the `version` and image `tag` arguments to the desired version, if different.

### Basic Mode

```shell
make helm-install
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
--version v0.0.2 \
--namespace kube-system \
--set image.tag=v0.0.2 \
--set operator.tag=v0.0.2 \
--set logLevel=info \
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\]"
```

### Basic Mode (with Capture support)

```shell
make helm-install-with-operator
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
--version v0.0.2 \
--namespace kube-system \
--set image.tag=v0.0.2 \
--set operator.tag=v0.0.2 \
--set logLevel=info \
--set image.pullPolicy=Always \
--set logLevel=info \
--set os.windows=true \
--set operator.enabled=true \
--set operator.enableRetinaEndpoint=true \
--set operator.repository=$(IMAGE_REGISTRY)/$(RETINA_OPERATOR_IMAGE) \
--skip-crds \
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\,packetparser\]"
```

### Advanced Mode with Remote Context (with Capture support)

See [Metric Modes](../metrics/modes.md).

```shell
make helm-install-advanced-remote-context
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
--version v0.0.2 \
--namespace kube-system \
--set image.tag=v0.0.2 \
--set operator.tag=v0.0.2 \
--set image.pullPolicy=Always \
--set logLevel=info \
--set os.windows=true \
--set operator.enabled=true \
--set operator.enableRetinaEndpoint=true \
--set operator.repository=$(IMAGE_REGISTRY)/$(RETINA_OPERATOR_IMAGE) \
--skip-crds \
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\,packetparser\]" \
--set enablePodLevel=true \
--set remoteContext=true
```

### Advanced Mode with Local Context (with Capture support)

See [Metric Modes](../metrics/modes.md).

```shell
make helm-install-advanced-local-context
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
--version v0.0.2 \
--namespace kube-system \
--set image.tag=v0.0.2 \
--set operator.tag=v0.0.2 \
--set image.pullPolicy=Always \
--set logLevel=info \
--set os.windows=true \
--set operator.enabled=true \
--set operator.enableRetinaEndpoint=true \
--set operator.repository=$(IMAGE_REGISTRY)/$(RETINA_OPERATOR_IMAGE) \
--skip-crds \
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\,packetparser\]" \
--set enablePodLevel=true \
--set enableAnnotations=true
```

## Next Steps: Configuring Prometheus/Grafana
Expand Down

0 comments on commit 12f4f89

Please sign in to comment.