-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Linux Packages for JInsight * Log if the Agent was initialized - fixes #13
- Loading branch information
Showing
13 changed files
with
291 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
*.iml | ||
.idea/ | ||
target/ | ||
dependency-reduced-pom.xml | ||
dependency-reduced-pom.xml | ||
pkg/build | ||
pkg/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apptuit.reporting_mode=XCOLLECTOR | ||
|
||
#apptuit.reporting_mode=API_PUT | ||
#apptuit.access_token=PASTE_ACCESS_TOKEN_HERE | ||
#global_tags=env:prod, data_center:us-east, micro_service:login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/jinsight/jinsight-config.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Package: jinsight | ||
Version: @PACKAGE_VERSION@-@PACKAGE_REVISION@ | ||
License: Apache-2.0 | ||
Architecture: @DEB_TARGET@ | ||
Maintainer: JInsight Maintainers <[email protected]> | ||
Installed-Size: 1108 | ||
Depends: xcollector | ||
Provides: jinsight | ||
Section: utils | ||
Priority: optional | ||
Homepage: https://apptuit.ai/jinsight | ||
Description: Apptuit JInsight - A Java agent to collect metrics from Java applications | ||
Apptuit JInsight is a java agent that instruments byte code in a JVM | ||
to transparently collect performance metrics about various sub-systems | ||
in your application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Copyright 2017 Agilx, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
ifeq ($(PACKAGE_VERSION),) | ||
PACKAGE_VERSION := 1.0.0 | ||
PACKAGE_REVISION := 0.1.SNAPSHOT | ||
JAR_VERSION := 1.0.0-SNAPSHOT | ||
else | ||
JAR_VERSION := $(PACKAGE_VERSION) | ||
PACKAGE_REVISION := 1 | ||
endif | ||
|
||
# Our "source tree" | ||
REPO_ROOT := ../.. | ||
WORK_DIR := $(REPO_ROOT)/pkg/build/deb | ||
DEST_DIR := $(REPO_ROOT)/pkg/dist | ||
|
||
# What / where do we build. | ||
DEB_TARGET := all | ||
BASENAME := jinsight_$(PACKAGE_VERSION)-$(PACKAGE_REVISION) | ||
DEB := $(BASENAME)_$(DEB_TARGET).deb | ||
|
||
all: clean deb | ||
|
||
deb: | ||
mkdir -p $(DEST_DIR)/ | ||
mkdir -p $(WORK_DIR)/DEBIAN/ | ||
mkdir -p $(WORK_DIR)/usr/share/java/ | ||
mkdir -p $(WORK_DIR)/etc/jinsight/ | ||
|
||
chmod -R 755 $(WORK_DIR)/* | ||
|
||
install -m 644 $(REPO_ROOT)/target/jinsight-$(JAR_VERSION).jar $(WORK_DIR)/usr/share/java/ | ||
ln -rs $(WORK_DIR)/usr/share/java/jinsight-$(JAR_VERSION).jar $(WORK_DIR)/usr/share/java/jinsight.jar | ||
install -m 644 $(REPO_ROOT)/pkg/common/jinsight-config.properties $(WORK_DIR)/etc/jinsight | ||
|
||
install -m 644 DEBIAN/conffiles $(WORK_DIR)/DEBIAN/conffiles | ||
set -e; { \ | ||
sed \ | ||
-e 's/@PACKAGE_VERSION@/$(PACKAGE_VERSION)/' \ | ||
-e 's/@DEB_TARGET@/$(DEB_TARGET)/' \ | ||
-e 's/@PACKAGE_REVISION@/$(PACKAGE_REVISION)/' \ | ||
DEBIAN/control; \ | ||
} >$(WORK_DIR)/DEBIAN/control | ||
|
||
cd $(WORK_DIR); find . -type f ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums | ||
chmod 644 $(WORK_DIR)/DEBIAN/md5sums | ||
|
||
sudo chown -R root:root $(WORK_DIR) | ||
dpkg-deb -b $(WORK_DIR) $(DEST_DIR)/$(DEB) | ||
|
||
lint: | ||
lintian --no-tag-display-limit $(DEST_DIR)/$(DEB) | ||
|
||
clean: | ||
sudo rm -rf $(WORK_DIR) $(DEST_DIR)/*.deb | ||
|
||
.PHONY: all deb clean | ||
.SUFFIXES: .deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"package": { | ||
"name": "jinsight", | ||
"repo": "debian", | ||
"subject": "apptuitai" | ||
}, | ||
|
||
"version": { | ||
"name": "@PACKAGE_VERSION@", | ||
"desc": "Version @PACKAGE_VERSION@", | ||
"released": "@PACKAGE_DATE@", | ||
"vcs_tag": "v@PACKAGE_VERSION@" | ||
}, | ||
|
||
"files": | ||
[ | ||
{"includePattern": "pkg/dist/(.*\\.deb)", "uploadPattern": "/pool/j/jinsight/$1", | ||
"matrixParams": { | ||
"deb_distribution": "stable,jessie,stretch,artful,wheezy,xenial,zesty,trusty", | ||
"deb_component": "jinsight,main,jinsight-v0.x", | ||
"deb_architecture": "arm64,armhf,i386,mipsel,mips,ppc64el,s390x,amd64,armel,mips64el" | ||
} | ||
} | ||
], | ||
"publish": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright 2017 Agilx, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
ifeq ($(PACKAGE_VERSION),) | ||
PACKAGE_VERSION := 1.0.0 | ||
PACKAGE_REVISION := 0.1.SNAPSHOT | ||
JAR_VERSION := 1.0.0-SNAPSHOT | ||
else | ||
JAR_VERSION := $(PACKAGE_VERSION) | ||
PACKAGE_REVISION := 1 | ||
endif | ||
|
||
|
||
# Our "source tree" | ||
REPO_ROOT := $(shell pwd)/../.. | ||
WORK_DIR := $(REPO_ROOT)/pkg/build/rpm | ||
DEST_DIR := $(REPO_ROOT)/pkg/dist/ | ||
|
||
# What / where do we build. | ||
RPM_TARGET := noarch | ||
BASENAME := jinsight-$(PACKAGE_VERSION)-$(PACKAGE_REVISION) | ||
RPM := $(BASENAME).$(RPM_TARGET).rpm | ||
|
||
all: clean rpm | ||
|
||
rpm: | ||
mkdir -p $(WORK_DIR) | ||
mkdir -p $(DEST_DIR) | ||
set -e; { \ | ||
echo "# File generated by Makefile, do not edit"; \ | ||
sed \ | ||
-e 's/@PACKAGE_VERSION@/$(PACKAGE_VERSION)/' \ | ||
-e 's/@JAR_VERSION@/$(JAR_VERSION)/' \ | ||
-e 's/@RPM_TARGET@/$(RPM_TARGET)/' \ | ||
-e 's/@PACKAGE_REVISION@/$(PACKAGE_REVISION)/' \ | ||
jinsight.spec; \ | ||
} > $(WORK_DIR)/jinsight-t.spec | ||
rpmbuild --define "_topdir $(WORK_DIR)" -bb $(WORK_DIR)/jinsight-t.spec --target $(RPM_TARGET) | ||
mv $(WORK_DIR)/RPMS/$(RPM_TARGET)/$(RPM) $(DEST_DIR) | ||
|
||
lint: | ||
rpmlint $(DEST_DIR)/$(RPM) | ||
|
||
clean: | ||
rm -rf $(WORK_DIR) $(DEST_DIR)/*.rpm | ||
|
||
.PHONY: all rpm clean distclean | ||
.SUFFIXES: .spec .rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"package": { | ||
"name": "jinsight", | ||
"repo": "rpm", | ||
"subject": "apptuitai" | ||
}, | ||
|
||
"version": { | ||
"name": "@PACKAGE_VERSION@", | ||
"desc": "Version @PACKAGE_VERSION@", | ||
"released": "@PACKAGE_DATE@", | ||
"vcs_tag": "v@PACKAGE_VERSION@" | ||
}, | ||
|
||
"files": | ||
[ | ||
{"includePattern": "pkg/dist/(.*\\.rpm)", "uploadPattern": "/$1"} | ||
], | ||
"publish": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
%global reporoot %{_topdir}/../../.. | ||
|
||
BuildArch: @RPM_TARGET@ | ||
Name: jinsight | ||
Group: System/Monitoring | ||
Version: @PACKAGE_VERSION@ | ||
Release: @PACKAGE_REVISION@ | ||
License: Apache License | ||
Summary: Apptuit JInsight - A Java agent to collect metrics from Java applications | ||
URL: https://apptuit.ai/jinsight | ||
Requires: xcollector | ||
Packager: JInsight Maintainers <[email protected]> | ||
|
||
|
||
%description | ||
Apptuit JInsight is a java agent that instruments byte code in a JVM | ||
to transparently collect performance metrics about various sub-systems | ||
in your application. | ||
|
||
%install | ||
mkdir -p %{buildroot}/usr/share/java/ | ||
mkdir -p %{buildroot}/etc/jinsight/ | ||
chmod -R 755 %{buildroot}/* | ||
|
||
%{__install} -m 644 %{reporoot}/target/jinsight-@[email protected] %{buildroot}/usr/share/java/ | ||
ln -rs %{buildroot}/usr/share/java/jinsight-@[email protected] %{buildroot}/usr/share/java/jinsight.jar | ||
%{__install} -m 644 %{reporoot}/pkg/common/jinsight-config.properties %{buildroot}/etc/jinsight | ||
|
||
|
||
%files | ||
/usr/share/java/ | ||
/etc/jinsight %config(noreplace) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.