Skip to content

Commit

Permalink
feat:iLogtail renamed to LoongCollector and directory layout changes (#…
Browse files Browse the repository at this point in the history
…1791)

```plaintext
/
└── /opt/loongcollector/
                       ├── loongcollector
                       ├── libPluginAdapter.so
                       ├── libPluginBase.so
                       ├── ca-bundle.crt
                       ├── plugins
                       │      └── custom plugins
                       ├── dump (used exclusively by the service_http_server input plugin)
                       ├── thirdparty
                       │      ├── jvm
                       │      └── telegraf
                       ├── conf/
                       │      ├── scripts
                       │      ├── apsara_log_conf.json
                       │      ├── plugin_logger.xml
                       │      ├── user_defined_id
                       │      ├── authorization.json
                       │      ├── pipelineconfig/
                       │      │                 ├── local/
                       │      │                 │         └── collect_stdout.json
                       │      │                 └── remote/
                       │      │                           └── collect_file.json
                       │      └── instanceconfig/
                       │                        ├── local/
                       │                        │         ├── ebpf.json
                       │                        │         └── loongcollector_config.json
                       │                        └── remote/
                       │                                  ├── region.json
                       │                                  └── resource.json
                       ├── data/
                       │       ├── file_check_point
                       │       ├── exactly_once_checkpoint/
                       │       ├── go_plugin_checkpoint/
                       │       ├── docker_path_config.json
                       │       ├── send_buffer_file_xxxxxxxxxxxx
                       │       └── backtrace.dat
                       ├── log/
                       │       ├── loongcollector.log
                       │       ├── loongcollector.log.1
                       │       ├── go_plugin.log
                       │       ├── go_plugin.log.1
                       │       ├── logger_initialization.log
                       │       └── snapshot/
                       └── run/
                               ├── loongcollector.pid
                               ├── inotify_watcher_dirs
                               └── app_info.json
```
  • Loading branch information
quzard authored Oct 12, 2024
1 parent 5326492 commit 6f032ab
Show file tree
Hide file tree
Showing 105 changed files with 810 additions and 436 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ RUN wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.18.tar.gz && \
rm -fr glibc-2.18*

# install python3.8
RUN cd /opt && curl -O https://cdn.npmmirror.com/binaries/python/3.8.12/Python-3.8.12.tgz && \
RUN cd /opt && curl -O https://mirrors.aliyun.com/python-release/source/Python-3.8.12.tgz && \
tar -zxvf Python-3.8.12.tgz && cd Python-3.8.12 && \
mkdir /usr/local/python3 && \
./configure --prefix=/usr/local/python3 && \
make clean && make && make install && \
cp /usr/local/python3/bin/python3.8 /usr/bin/python3
# install gcovr
RUN python3 -m pip install --upgrade pip
RUN cp /usr/local/python3/bin/pip3 /usr/bin/pip3 && pip3 install gcovr==7.0
RUN cp /usr/local/python3/bin/pip3 /usr/bin/pip3 && pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && pip3 install gcovr==7.0
RUN cp /usr/local/python3/bin/gcovr /usr/bin/gcovr

# Create the user
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

- name: Copy Lib
if: matrix.runner == 'ubuntu'
run: sudo cp ./pkg/logtail/libPluginAdapter.so /usr/lib/
run: sudo cp ./pkg/logtail/libGoPluginAdapter.so /usr/lib/

- name: Check License Header
if: matrix.runner == 'ubuntu'
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# limitations under the License.

.DEFAULT_GOAL := all
VERSION ?= 2.0.0
VERSION ?= 0.0.1
DOCKER_PUSH ?= false
DOCKER_REPOSITORY ?= aliyun/ilogtail
BUILD_REPOSITORY ?= aliyun/ilogtail_build
DOCKER_REPOSITORY ?= aliyun/loongcollector
BUILD_REPOSITORY ?= aliyun/loongcollector_build
GENERATED_HOME ?= generated_files
PLUGINS_CONFIG_FILE ?= plugins.yml,external_plugins.yml
GO_MOD_FILE ?= go.mod
Expand Down Expand Up @@ -68,9 +68,9 @@ GO_BUILD_FLAGS = -v
LICENSE_COVERAGE_FILE=license_coverage.txt
OUT_DIR = output
DIST_DIR = dist
PACKAGE_DIR = ilogtail-$(VERSION)
PACKAGE_DIR = loongcollector-$(VERSION)
EXTERNAL_DIR = external
DIST_FILE = $(DIST_DIR)/ilogtail-$(VERSION).linux-$(ARCH).tar.gz
DIST_FILE = $(DIST_DIR)/loongcollector-$(VERSION).linux-$(ARCH).tar.gz

.PHONY: tools
tools:
Expand Down Expand Up @@ -137,8 +137,8 @@ upgrade_adapter_lib:
.PHONY: plugin_main
plugin_main: clean
./scripts/plugin_build.sh mod default $(OUT_DIR) $(VERSION) $(PLUGINS_CONFIG_FILE) $(GO_MOD_FILE)
cp pkg/logtail/libPluginAdapter.so $(OUT_DIR)/libPluginAdapter.so
cp pkg/logtail/PluginAdapter.dll $(OUT_DIR)/PluginAdapter.dll
cp pkg/logtail/libGoPluginAdapter.so $(OUT_DIR)/libGoPluginAdapter.so
cp pkg/logtail/GoPluginAdapter.dll $(OUT_DIR)/GoPluginAdapter.dll

.PHONY: plugin_local
plugin_local:
Expand Down Expand Up @@ -190,8 +190,8 @@ unittest_e2e_engine: clean gocdocker

.PHONY: unittest_plugin
unittest_plugin: clean import_plugins
cp pkg/logtail/libPluginAdapter.so ./plugin_main
cp pkg/logtail/PluginAdapter.dll ./plugin_main
cp pkg/logtail/libGoPluginAdapter.so ./plugin_main
cp pkg/logtail/GoPluginAdapter.dll ./plugin_main
mv ./plugins/input/prometheus/input_prometheus.go ./plugins/input/prometheus/input_prometheus.go.bak
go test $$(go list ./...|grep -Ev "telegraf|external|envconfig|(input\/prometheus)|(input\/syslog)"| grep -Ev "plugin_main|pluginmanager") -coverprofile .testCoverage.txt
mv ./plugins/input/prometheus/input_prometheus.go.bak ./plugins/input/prometheus/input_prometheus.go
Expand All @@ -203,9 +203,9 @@ unittest_core:

.PHONY: unittest_pluginmanager
unittest_pluginmanager: clean import_plugins
cp pkg/logtail/libPluginAdapter.so ./plugin_main
cp pkg/logtail/PluginAdapter.dll ./plugin_main
cp pkg/logtail/libPluginAdapter.so ./pluginmanager
cp pkg/logtail/libGoPluginAdapter.so ./plugin_main
cp pkg/logtail/GoPluginAdapter.dll ./plugin_main
cp pkg/logtail/libGoPluginAdapter.so ./pluginmanager
mv ./plugins/input/prometheus/input_prometheus.go ./plugins/input/prometheus/input_prometheus.go.bak
go test $$(go list ./...|grep -Ev "telegraf|external|envconfig"| grep -E "plugin_main|pluginmanager") -coverprofile .coretestCoverage.txt
mv ./plugins/input/prometheus/input_prometheus.go.bak ./plugins/input/prometheus/input_prometheus.go
Expand All @@ -221,7 +221,7 @@ dist: all
./scripts/dist.sh "$(OUT_DIR)" "$(DIST_DIR)" "$(PACKAGE_DIR)"

$(DIST_FILE):
@echo 'ilogtail-$(VERSION) dist does not exist! Please download or run `make dist` first!'
@echo 'loongcollector-$(VERSION) dist does not exist! Please download or run `make dist` first!'
@false

.PHONY: docker
Expand Down
2 changes: 1 addition & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

cmake_minimum_required(VERSION 3.22)
project(logtail)
project(loongcollector)

include(CMakeDependentOption)

Expand Down
Loading

0 comments on commit 6f032ab

Please sign in to comment.