Skip to content

Commit 6fcaa17

Browse files
authored
Merge pull request #43 from newrelic/fryckbosch/executable-rename
Update executable prefix from nr- to nri-.
2 parents 2ffcc11 + 35d39cb commit 6fcaa17

12 files changed

Lines changed: 21 additions & 17 deletions

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 1.4.0 (2019-11-18)
8+
### Changed
9+
- Renamed the integration executable from nr-mysql to nri-mysql 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.
710
## 1.3.0 (2019-04-29)
811
### Added
912
- Upgraded to SDK v3.1.5. This version implements [the aget/integrations

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
FROM golang:1.9 as builder
2-
RUN go get -d github.com/newrelic/nri-mysql/... && \
3-
cd /go/src/github.com/newrelic/nri-mysql && \
2+
COPY . /go/src/github.com/newrelic/nri-mysql/
3+
RUN cd /go/src/github.com/newrelic/nri-mysql && \
44
make && \
5-
strip ./bin/nr-mysql
5+
strip ./bin/nri-mysql
66

77
FROM newrelic/infrastructure:latest
88
ENV NRIA_IS_FORWARD_ONLY true
99
ENV NRIA_K8S_INTEGRATION true
10-
COPY --from=builder /go/src/github.com/newrelic/nri-mysql/bin/nr-mysql /nri-sidecar/newrelic-infra/newrelic-integrations/bin/nr-mysql
10+
COPY --from=builder /go/src/github.com/newrelic/nri-mysql/bin/nri-mysql /nri-sidecar/newrelic-infra/newrelic-integrations/bin/nri-mysql
1111
COPY --from=builder /go/src/github.com/newrelic/nri-mysql/mysql-definition.yml /nri-sidecar/newrelic-infra/newrelic-integrations/definition.yaml
1212
USER 1000

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
INTEGRATION := mysql
2-
BINARY_NAME = nr-$(INTEGRATION)
2+
BINARY_NAME = nri-$(INTEGRATION)
33
SRC_DIR = ./src/
44
VALIDATE_DEPS = golang.org/x/lint/golint
55
TEST_DEPS = github.com/axw/gocov/gocov github.com/AlekSi/gocov-xml

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $ sudo mysql -e "GRANT REPLICATION CLIENT ON *.* TO 'newrelic'@'localhost' WITH
1919
## Installation
2020
* download an archive file for the MySQL Integration
2121
* extract `mysql-definition.yml` and `/bin` directory into `/var/db/newrelic-infra/newrelic-integrations`
22-
* add execute permissions for the binary file `nr-mysql` (if required)
22+
* add execute permissions for the binary file `nri-mysql` (if required)
2323
* extract `mysql-config.yml.sample` into `/etc/newrelic-infra/integrations.d`
2424

2525
## Usage
@@ -35,13 +35,13 @@ Assuming that you have the source code and Go tool installed you can build and r
3535
```bash
3636
$ make
3737
```
38-
* The command above will execute the tests for the MySQL Integration and build an executable file called `nr-mysql` under `bin` directory. Run `nr-mysql` with parameters specifying username and password
38+
* The command above will execute the tests for the MySQL Integration and build an executable file called `nri-mysql` under `bin` directory. Run `nri-mysql` with parameters specifying username and password
3939
```bash
40-
$ ./bin/nr-mysql -username <username> -password <password>
40+
$ ./bin/nri-mysql -username <username> -password <password>
4141
```
42-
* If you want to know more about usage of `./bin/nr-mysql` check
42+
* If you want to know more about usage of `./bin/nri-mysql` check
4343
```bash
44-
$ ./bin/nr-mysql -help
44+
$ ./bin/nri-mysql -help
4545
```
4646

4747
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.

mysql-definition.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ os: linux
66
commands:
77
status:
88
command:
9-
- ./bin/nr-mysql
9+
- ./bin/nri-mysql
1010
prefix: config/mysql
1111
interval: 30

src/mysql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
const (
1616
integrationName = "com.newrelic.mysql"
17-
integrationVersion = "1.2.0"
17+
integrationVersion = "1.4.0"
1818
nodeEntityType = "node"
1919
)
2020

tests/integration/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
- nri-mysql
1616

1717
nri-mysql:
18+
container_name: integration_nri-mysql_1
1819
build:
1920
context: ../../
2021
dockerfile: tests/integration/Dockerfile

tests/integration/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525

2626
defaultContainer = "integration_nri-mysql_1"
2727
// mysql config
28-
defaultBinPath = "/nr-mysql"
28+
defaultBinPath = "/nri-mysql"
2929
defaultMysqlUser = "root"
3030
defaultMysqlPass = "DBpwd1234!"
3131
defaultMysqlHost = "mysql"

tests/integration/json-schema-files/mysql-schema-inventory-master.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"properties": {
55
"integration_version": {
66
"minLength": 1,
7-
"pattern": "^1.2.0$",
7+
"pattern": "^1.4.0$",
88
"type": "string"
99
},
1010
"data": {

tests/integration/json-schema-files/mysql-schema-master-localentity.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"properties": {
55
"integration_version": {
66
"minLength": 1,
7-
"pattern": "^1.2.0$",
7+
"pattern": "^1.4.0$",
88
"type": "string"
99
},
1010
"data": {

0 commit comments

Comments
 (0)