Skip to content

Commit

Permalink
Merge pull request #33 from newrelic/fryckbosch/executable-rename
Browse files Browse the repository at this point in the history
Update executable prefix from nr- to nri-.
  • Loading branch information
fryckbos committed Nov 15, 2019
2 parents 8324c9c + cf3817c commit 95c71ba
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.4.0 (2019-11-15)
### Changed
- Renamed the integration executable from nr-apache to nri-apache in order to be consistent with the package naming. **Important Note:** if you have any security module rules (eg. SELinux), alerts or automation that depends on the name of this binary, these will have to be updated.

## 1.3.0 (2019-04-29)
### Added
- Upgraded to SDK v3.1.5. This version implements [the aget/integrations
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM golang:1.10 as builder-apache
RUN go get -d github.com/newrelic/nri-apache/... && \
cd /go/src/github.com/newrelic/nri-apache && \
COPY . /go/src/github.com/newrelic/nri-apache/
RUN cd /go/src/github.com/newrelic/nri-apache && \
make && \
strip ./bin/nr-apache
strip ./bin/nri-apache

FROM newrelic/infrastructure:latest
ENV NRIA_IS_FORWARD_ONLY true
ENV NRIA_K8S_INTEGRATION true
COPY --from=builder-apache /go/src/github.com/newrelic/nri-apache/bin/nr-apache /nri-sidecar/newrelic-infra/newrelic-integrations/bin/nr-apache
COPY --from=builder-apache /go/src/github.com/newrelic/nri-apache/bin/nri-apache /nri-sidecar/newrelic-infra/newrelic-integrations/bin/nri-apache
COPY --from=builder-apache /go/src/github.com/newrelic/nri-apache/apache-definition.yml /nri-sidecar/newrelic-infra/newrelic-integrations/definition.yaml
USER 1000
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR := $(shell pwd)
TARGET := target
TARGET_DIR = $(WORKDIR)/$(TARGET)
INTEGRATION := apache
BINARY_NAME = nr-$(INTEGRATION)
BINARY_NAME = nri-$(INTEGRATION)
GO_FILES := ./src/
VALIDATE_DEPS = golang.org/x/lint/golint
TEST_DEPS = github.com/axw/gocov/gocov github.com/AlekSi/gocov-xml
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ Assuming that you have the source code and Go tool installed you can build and r
```bash
$ make
```
* The command above will execute the tests for the Apache Integration and build an executable file called `nr-apache` under `bin` directory. Run `nr-apache`:
* The command above will execute the tests for the Apache Integration and build an executable file called `nri-apache` under `bin` directory. Run `nri-apache`:
```bash
$ ./bin/nr-apache
$ ./bin/nri-apache
```
* If you want to know more about usage of `./bin/nr-apache` check
* If you want to know more about usage of `./bin/nri-apache` check
```bash
$ ./bin/nr-apache -help
$ ./bin/nri-apache -help
```

For managing external dependencies [govendor tool](https://github.com/kardianos/govendor) is used. It is required to lock all external dependencies to specific version (if possible) into vendor directory.
Expand Down
4 changes: 2 additions & 2 deletions apache-definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ os: linux
commands:
metrics:
command:
- ./bin/nr-apache
- ./bin/nri-apache
- --metrics
interval: 15
inventory:
command:
- ./bin/nr-apache
- ./bin/nri-apache
- --inventory
prefix: config/apache
interval: 60
2 changes: 1 addition & 1 deletion src/apache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type argumentList struct {

const (
integrationName = "com.newrelic.apache"
integrationVersion = "1.2.0"
integrationVersion = "1.4.0"

defaultHTTPTimeout = time.Second * 1

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/apache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
var (
defaultContainer = "integration_nri-apache_1"

defaultBinPath = "/nr-apache"
defaultBinPath = "/nri-apache"
defaultStatusURL = "http://127.0.0.1/server-status?auto"

// cli flags
Expand Down
1 change: 1 addition & 0 deletions tests/integration/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: '3.1'

services:
nri-apache:
container_name: integration_nri-apache_1
build:
context: ../../
dockerfile: tests/integration/Dockerfile
Expand Down

0 comments on commit 95c71ba

Please sign in to comment.