Service Discover is a service discovery and configuration management solution based on Consul for Zextras services. It provides service registration, health monitoring, and distributed configuration capabilities essential for microservices architecture.
cmd/ # Main applications (agent, server, service-discoverd)
pkg/ # Go packages (encrypter, exec, formatter, parser, etc.)
build/ # Packaging scripts and configs (yap.json, PKGBUILD, etc.)
test/ # Test utilities and mocks
build_packages.sh # Build helper script (Not for production uses)
Jenkinsfile # CI/CD pipeline
- Go 1.20+ (recommended)
- Docker (for integration tests)
- Ubuntu 20.04/22.04 or RHEL 8/9 for packaging
- yap (for building .deb/.rpm packages)
- Make, git, and standard build tools
git clone <repo-url>
cd service-discover# Build packages for Ubuntu 22.04
make build TARGET=ubuntu-jammy
# Build packages for Rocky Linux 9
make build TARGET=rocky-9
# Build packages for Ubuntu 24.04
make build TARGET=ubuntu-nobleubuntu-jammy- Ubuntu 22.04 LTSubuntu-noble- Ubuntu 24.04 LTSrocky-8- Rocky Linux 8rocky-9- Rocky Linux 9
You can customize the build by setting environment variables:
# Use a specific container runtime
make build TARGET=ubuntu-jammy CONTAINER_RUNTIME=docker
# Use a different output directory
make build TARGET=rocky-9 OUTPUT_DIR=./my-packagesIf using an IDE like IntelliJ IDEA:
- Enable Go module support in Go settings
- The IDE should automatically detect modules and download dependencies
This project uses gotestsum for running tests and generating reports.
To run all tests:
go run gotest.tools/gotestsum@latest --format testname --junitfile tests.xml ./...Or run tests for a specific module:
cd pkg/encrypter
go run gotest.tools/gotestsum@latest --format testname --junitfile tests.xmlSome tests require service-discover-base to be installed on the system. See Jenkinsfile for setup steps.
Artifacts are uploaded to Artifactory and promoted via Jenkins pipeline. See Jenkinsfile for details on upload and promotion steps.
Please ensure all tests pass and code is linted before submitting.
See CONTRIBUTING.md for information on how to contribute to this project.
This project is licensed under the GNU Affero General Public License v3.0 - see the COPYING file for details.