Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# Go configuration
GOCMD := go
GOPATH ?= $(shell $(GOCMD) env GOPATH)
GOBUILD := $(GOCMD) build
GOTEST := $(GOCMD) test
GOVET := $(GOCMD) vet
Expand All @@ -16,6 +17,7 @@ PKG_LIST := $(shell $(GOCMD) list ./... | grep -v /vendor/)
# Build output
BUILD_DIR := .
BINARY := $(BUILD_DIR)/$(BINARY_NAME)
INSTALLED_BINARY := $(GOPATH)/bin/$(BINARY_NAME)

# Convention is that the git tags are of the form
# v<major>.<minor>.<patch>-<build-number>-<commit-hash>[-dirty]
Expand Down Expand Up @@ -70,7 +72,10 @@ build-all: fmt vet build ## Format, vet, and build
.PHONY: install
install: ## Install roxie to $GOPATH/bin
@echo "📦 Installing roxie..."
$(GOCMD) install -ldflags "$(LDFLAGS)" $(CMD_PATH)
# We cannot use 'go install', because the installed binary would be named 'cmd', given the
# current source tree layout.
mkdir -p $$(dirname $(INSTALLED_BINARY))
$(GOBUILD) -ldflags "$(LDFLAGS)" -o $(INSTALLED_BINARY) ./cmd

# Development targets
.PHONY: fmt
Expand Down
71 changes: 47 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,50 @@ roxie has been authored with significant AI contributions.

## Installation

### Download from GitHub releases
Look up the latest release from https://github.com/stackrox/roxie/releases.

### Install from GitHub releases into local dev environment

For example, installing into `$HOME/bin`:
```bash
curl -fsSL -o "${HOME}/bin/roxie" \
https://github.com/stackrox/roxie/releases/download/v0.4.0/roxie-linux-amd64
chmod +x "${HOME}/bin/roxie"
```

On macOS you likely also need
```bash
xattr -d com.apple.quarantine "${HOME}/bin/roxie"
```

### Installing from source into local dev environment

Built using:
```bash
git clone git@github.com:stackrox/roxie.git
cd roxie
make install
```

This will install `roxie` into `${GOPATH}/bin`. If that is not desired you can also
build and copy manually:
```bash
make build
cp roxie /your/custom/bin
```

### Install from GitHub releases as part of CI workflow

```bash
curl -fsSL --retry 5 --retry-all-errors -o /usr/local/bin/roxie \
https://github.com/stackrox/roxie/releases/download/v0.4.0/roxie-linux-amd64
chmod +x /usr/local/bin/roxie
```

### Copy from container image in a Dockerfile
### Install in container image

roxie can also be installed by extracting from a published roxie container image, for example
during container building:

```dockerfile
ARG ROXIE_VERSION=0.4.0
Expand Down Expand Up @@ -61,47 +96,35 @@ Example for deploying Central and SecuredCluster to an Infra OpenShift 4 cluster
```bash
podman run --rm -it --privileged \
-v $KUBECONFIG:/kubeconfig:U \
-e MAIN_IMAGE_TAG=4.9.2 \
quay.io/rhacs-eng/roxie:latest deploy --resources=auto
quay.io/rhacs-eng/roxie:latest deploy -t 4.11.0 --resources=auto
Comment thread
mclasmeier marked this conversation as resolved.
```
Specify the `MAIN_IMAGE_TAG` as desired.
Specify the main image tag (`--tag` or `-t`) as desired.

Deploying to a GKE cluster requires passing of some more arguments:
```
podman run --rm -it --privileged \
-v ~/.config/gcloud:/.config/gcloud:U \
-v $KUBECONFIG:/kubeconfig:U \
-e MAIN_IMAGE_TAG=4.9.2 \
-e REGISTRY_USERNAME=$REGISTRY_USERNAME \
-e REGISTRY_PASSWORD=$REGISTRY_PASSWORD \
quay.io/rhacs-eng/roxie:latest deploy --resources=auto
quay.io/rhacs-eng/roxie:latest deploy -t 4.11.0 --resources=auto
```
Note that in this case we also need to pass the gcloud configuration for the authentication towards
the cluster to succeed.

### Option 2: Deploying using local build
### Option 2: Deploying using native executable

Prerequisites:
- `kubectl` configured to point at your target cluster
- The `roxctl` CLI
- The `roxie` branch forked and cloned to your local machine

Built using:
```bash
make build
```

Get help:
```bash
./roxie --help
```
- `roxctl` CLI is installed
- `roxie` CLI is installed

Deploy using:
```bash
MAIN_IMAGE_TAG=4.9.2 ./roxie deploy [ <component> ]
./roxie deploy -t 4.11.0 [ <component> ]
```
where `component` can be `central` or `sensor`. If not specified, both components will be deployed.
Specify the `MAIN_IMAGE_TAG` as desired.
Specify the tag to deploy as desired.

Similarly, the deployment(s) can be torn down using:
```bash
Expand All @@ -114,7 +137,7 @@ roxie supports hub + spoke architectures where Central and SecuredCluster run on

1. Deploy Central on the hub cluster:
```bash
./roxie deploy central -t 4.9.2
./roxie deploy central -t 4.11.0
```

2. Create a config file for the spoke cluster, pointing at the Central endpoint (printed during step 1):
Expand All @@ -129,7 +152,7 @@ securedCluster:
```bash
ROX_ADMIN_PASSWORD=<admin-password> \
ROX_CA_CERT_FILE=<path-to-ca-cert> \
./roxie deploy secured-cluster -t 4.9.2 -c spoke-config.yaml
./roxie deploy secured-cluster -t 4.11.0 -c spoke-config.yaml
```

> **Tip:** If deploying from the roxie subshell, `ROX_ADMIN_PASSWORD` and `ROX_CA_CERT_FILE` are
Expand Down
Loading