Improved README

This commit is contained in:
2025-10-24 19:59:20 +03:00
parent 8c2afbcac9
commit 0527945668

100
README.md
View File

@@ -1,39 +1,83 @@
# PROXY # Rproxy
## Content ## Description
* Reverse proxy
* HTTPS file share
## Installation This job handles Nginx 1.29 installation and includes the following components:
```yml
target_host: Enter FQDN or IP Address of target host
rproxy_install: Install rproxy and https repo if checked
config_add: Will config be created
rproxy_service_name: Server/service name without domain suffix - **Nginx as Reverse Proxy**:
rproxy_service_port: Port to redirect the request to - Acts as a reverse proxy for secure traffic routing
rproxy_service_address: Address to redirect the request to - Supports SSL termination
Example: - **HTTP Repository**:
domain: olsson.ul - Provides a base for hosting and managing web content
jenkins_host: http://10.10.10.1:8080/
rproxy_service_name: jenkins - **Infrastructure**:
rproxy_service_port: 8080 - ✅ Includes Podman installation
rproxy_service_address: 10.10.10.1 - ✅ Contains a management job for proxy configuration
- Allows seamless addition of new services (e.g., enabling SSL access to Jenkins)
# After adding alias jenkins.olsson.ul => rproxy.olsson.ul ### Nginx as Reverse Proxy
result_address: https://jenkins.olsson.ul/
```
## Reverse Proxy **Setup**:
Allows redirecting requests based on fqdn to the required address and ports with ssl certificate substitution - Installs Nginx container in Podman environment
## HTTPS repository **Configuration Structure**:
Would be installed with rproxy service. Hosted on port 9000. \ - **Root directory**: `/opt/rproxy`
Files should be stored in /opt/rproxy/repo/ to be shared. - **Main config**: `/opt/rproxy/nginx.conf`
- **Site-specific configs**: `/opt/rproxy/sites/*.conf`
- **Certificates**: `/opt/rproxy/certs/` (stores unique certificates for each connected site)
Put file in repo **Operation**:
- Listens on `https://$hostname/`
- Maps incoming requests to `/opt/rproxy/sites/$hostname.conf`
- Forwards traffic to `https://$hostname:[port]` with SSL termination
**Entrypoint**:
- Proxy endpoint: `https://$hostname/`
### HTTP Repository
**Configuration**:
- A `repo.conf` file is added to the `/opt/rproxy/sites/` directory
- **DAVFS** functionality is enabled for file management
- **Data storage path**: `/opt/repodata`
**Access Point**:
- Proxy endpoint: `https://localhost:9000/`
#### Example Usage
Upload a file to the repository using `curl`:
```bash ```bash
curl -T kafka_4.1.tar https://rproxy.olsson.ul:9000/podman/kafka/4.1/kafka_4.1.tar -k # Upload example: kafka_4.1.tar to /podman/kafka/4.1/
curl -T kafka_4.1.tar https://rproxy.olsson.ul:9000/podman/kafka/4.1/kafka_4.1.tar
``` ```
## Add configuration via management job
Import management/AddService.groovy to Jenkins
To integrate `http://jenkins-master.olsson.ul:8080` with the SSL proxy, configure these parameters:
- **target_host**: Host with rproxy installed
- **rproxy_service_name**: Service identifier (e.g., `jenkins`)
- **rproxy_service_port**: Port (e.g., `8080`)
- **rproxy_service_address**: Address (e.g., `jenkins-master.olsson.ul` or `10.10.10.1`)
**Result**:
`https://jenkins.olsson.ul/` will securely route to `http://jenkins-master.olsson.ul:8080`.
CNAME configuration (`jenkins.olsson.ul → rproxy`) is automatically handled during deployment in FreeIPA.
## Software Requirements
* OS - AlmaLinux 10
* FreeIPA domain (for certificates request)
## Jenkins credentials
* JENKINS_DEPLOYER_PASS (domain)
* JENKINS_DEPLOYER_KEY (domain)
## Jenkins paramethers
* target_hosts - is basic inventory line for ansible
* images_repo_url - image registry with nginx repository
* update_job - download changes from git and finish job