chage: revorked README
This commit is contained in:
		| @@ -4,8 +4,7 @@ Automated Alpine Linux package builder for Zabbix Agent and Proxy with CI/CD pip | |||||||
|  |  | ||||||
| ## Features | ## Features | ||||||
|  |  | ||||||
| - 🔄 **Automatic Version Detection**: Monitors Zabbix releases using official Bitbucket API | - 🔄 **Automatic Version Detection**: Monitors Zabbix releases using Bitbucket API | ||||||
| - 🏗️ **Docker-based Building**: Consistent, reproducible builds in isolated environment |  | ||||||
| - 🚀 **CI/CD Pipeline**: Full automation from version detection to package deployment | - 🚀 **CI/CD Pipeline**: Full automation from version detection to package deployment | ||||||
| - 📦 **Multi-package Support**: Builds agent and proxy packages | - 📦 **Multi-package Support**: Builds agent and proxy packages | ||||||
| - 🧪 **Automated Testing**: Tests package installation in Alpine containers | - 🧪 **Automated Testing**: Tests package installation in Alpine containers | ||||||
| @@ -13,34 +12,24 @@ Automated Alpine Linux package builder for Zabbix Agent and Proxy with CI/CD pip | |||||||
|  |  | ||||||
| ## Quick Start | ## Quick Start | ||||||
|  |  | ||||||
| ### 1. Repository Setup | ### Prerequisites | ||||||
|  |  | ||||||
|  | - Docker installed | ||||||
|  | - Gitea repository with Actions enabled | ||||||
|  |  | ||||||
|  | ### Manual Build | ||||||
|  |  | ||||||
| ```bash | ```bash | ||||||
| # Clone this repository | # Clone the repository | ||||||
| git clone https://git.mbuz.uk/mbuz/Zabbix.git | git clone <your-gitea-repo> | ||||||
| cd zabbix-apk-builder | cd zabbix-apk-builder | ||||||
|  |  | ||||||
| # Make build script executable |  | ||||||
| chmod +x build.sh |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ### 2. Manual Build |  | ||||||
|  |  | ||||||
| ```bash |  | ||||||
| # Build packages locally | # Build packages locally | ||||||
|  | chmod +x build.sh | ||||||
| ./build.sh | ./build.sh | ||||||
|  |  | ||||||
| # Packages will be in ./packages/ | # Check built packages | ||||||
| ls -la packages/ | ls -la packages/builder/x86_64/ | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ### 3. CI/CD Setup |  | ||||||
|  |  | ||||||
| ```bash |  | ||||||
| # Run the setup script |  | ||||||
| ./setup-cicd.sh |  | ||||||
|  |  | ||||||
| # Follow the prompts to configure GitHub secrets |  | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ## Package Information | ## Package Information | ||||||
| @@ -51,19 +40,12 @@ ls -la packages/ | |||||||
| 2. **zabbix-proxy** - Zabbix Proxy | 2. **zabbix-proxy** - Zabbix Proxy | ||||||
| 3. **zabbix** - Meta package | 3. **zabbix** - Meta package | ||||||
|  |  | ||||||
| ### Current Version |  | ||||||
|  |  | ||||||
| - **Zabbix Version**: 7.4.2 |  | ||||||
| - **Alpine Base**: latest |  | ||||||
| - **Architecture**: all |  | ||||||
|  |  | ||||||
| ## CI/CD Pipeline | ## CI/CD Pipeline | ||||||
|  |  | ||||||
| ### Automatic Triggers | ### Automatic Triggers | ||||||
|  |  | ||||||
| - **Daily**: Checks for new Zabbix versions at 6 AM UTC | - **Daily**: Checks for new Zabbix versions at 6 AM UTC | ||||||
| - **Push**: Builds when code changes in main/test branches | - **Push**: Builds when code changes in main/test branches | ||||||
| - **Manual**: Force builds via Gitea Actions |  | ||||||
|  |  | ||||||
| ### Version Detection | ### Version Detection | ||||||
|  |  | ||||||
| @@ -91,48 +73,22 @@ GITEA_SSH_KEY  # SSH private key for Gitea access | |||||||
| ### File Structure | ### File Structure | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
| . | zabbix-git/ | ||||||
| └── zabbix-git | └── zabbix-apk-builder/ | ||||||
|     └── zabbix-apk-builder |     ├── .gitea/ | ||||||
|         ├── .gitea/workflows   # Workflows for Gitea actions |     │   └── workflows/ | ||||||
|         ├── .gitignore         # Ignore files  |     │       └── build.yaml         # Main CI/CD pipeline | ||||||
|         ├── APKBUILD           # APKBUILD file for Zabbix |     ├── APKBUILD                   # Alpine package definition | ||||||
|         ├── Dockerfile         # Dockerfile for building packages |     ├── Dockerfile                 # Build environment container | ||||||
|         ├── README.md          # Project description |     ├── README.md                  # This file | ||||||
|         ├── build.sh           # Script for manual builds |     ├── build.sh                   # Local build script | ||||||
|         ├── packages/          # Directory for built packages |     ├── packages/                  # Generated packages (gitignored) | ||||||
|         ├── zabbix-agent.*     # Agent configuration files |     ├── zabbix-agent.confd         # Agent configuration | ||||||
|         └── zabbix-proxy.*     # Proxy configuration files |     ├── zabbix-agent.initd         # Agent init script | ||||||
| ``` |     ├── zabbix-agent.pre-install   # Agent pre-install script | ||||||
|  |     ├── zabbix-proxy.confd         # Proxy configuration   | ||||||
| ## Usage |     ├── zabbix-proxy.initd         # Proxy init script | ||||||
|  |     └── zabbix-proxy.pre-install   # Proxy pre-install script | ||||||
| ### Install Packages |  | ||||||
|  |  | ||||||
| ```bash |  | ||||||
| # Add repository |  | ||||||
| echo "http://gitea-repo/mbuz/Zabbix/raw/branch/main/alpine/v3.18/main" >> /etc/apk/repositories |  | ||||||
|  |  | ||||||
| # Update and install |  | ||||||
| apk update |  | ||||||
| apk add zabbix-agent |  | ||||||
|  |  | ||||||
| # Enable and start |  | ||||||
| rc-update add zabbix-agent default |  | ||||||
| rc-service zabbix-agent start |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ### Configuration |  | ||||||
|  |  | ||||||
| ```bash |  | ||||||
| # Configure agent |  | ||||||
| vim /etc/zabbix/zabbix_agentd.conf |  | ||||||
|  |  | ||||||
| # Set server IP |  | ||||||
| Server=your.zabbix.server |  | ||||||
|  |  | ||||||
| # Restart service |  | ||||||
| rc-service zabbix-agent restart |  | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ## Development | ## Development | ||||||
| @@ -154,28 +110,16 @@ docker run --rm -it \ | |||||||
|  |  | ||||||
| ### Branch Strategy | ### Branch Strategy | ||||||
|  |  | ||||||
| - **main**: Production releases, auto-deployed | - **main**: Production releases, merge only | ||||||
| - **test**: Testing and validation, no auto-deploy | - **test**: Testing and validation | ||||||
|  |  | ||||||
| ### Making Changes | ### Making Changes | ||||||
|  |  | ||||||
| 1. Create feature branch from `test` | 1. Create feature branch from `main` | ||||||
| 2. Test changes thoroughly | 2. Test changes thoroughly | ||||||
| 3. Merge to `test` for CI validation | 3. Validate CI | ||||||
| 4. Merge to `main` for production release | 4. Merge to `main` | ||||||
|  |  | ||||||
| ## Troubleshooting |  | ||||||
|  |  | ||||||
| ### Build Issues |  | ||||||
|  |  | ||||||
| ```bash |  | ||||||
| # Check build logs |  | ||||||
| docker logs $(docker ps -l -q) |  | ||||||
|  |  | ||||||
| # Manual build debug |  | ||||||
| docker run -it --rm -v $(pwd):/build alpine:3.18 sh |  | ||||||
| cd /build && ./build.sh |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ### Version Detection | ### Version Detection | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user