|
| 1 | +# MiNiFi Java Agent |
| 2 | + |
| 3 | +This role streamlines the deployment and configuration of Cloudera MiNiFi Java Agent on designated hosts. |
| 4 | + |
| 5 | +The role will: |
| 6 | +- Retrieve the MiNiFi Java tarball from a user-defined or default source |
| 7 | +- Install MiNiFi Java into a configurable directory |
| 8 | +- Apply configuration using a Jinja2 template for `minifi.properties` |
| 9 | +- Configure C2 protocol for communication with EFM server |
| 10 | +- Support TLS/SSL configuration for secure communication |
| 11 | +- Install and start the MiNiFi Java agent service |
| 12 | +- Support authentication for protected download sources |
| 13 | + |
| 14 | +## Requirements |
| 15 | + |
| 16 | +- Network access from the target host to the URL specified in `minifi_java_tarball_url` |
| 17 | +- Access to EFM server for C2 communication (specified in `efm_host_url`) |
| 18 | +- For TLS configuration: Valid certificates and private keys on target host |
| 19 | + |
| 20 | +## Variables |
| 21 | + |
| 22 | +| Name | Purpose | Default (see `defaults/main.yml`) | |
| 23 | +|----------------------------------|--------------------------------------------------------------|---------------------------------------------| |
| 24 | +| `minifi_java_tarball_url` | Download link for the MiNiFi Java tarball | (default provided in role) | |
| 25 | +| `minifi_java_directory` | Installation directory for MiNiFi Java | `/opt/cloudera/cem/minifi-java` | |
| 26 | +| `minifi_java_properties_path` | Path to the MiNiFi Java properties file | `/opt/cloudera/cem/minifi-java/conf/minifi.properties` | |
| 27 | +| `minifi_java_agent_class_name` | Agent class name for MiNiFi Java agent | `minifi-agent-java` | |
| 28 | +| `efm_host_url` | URL for the EFM server for C2 communication | `http://localhost:10090` | |
| 29 | +| `minifi_java_repo_username` | Username for protected repositories (optional) | | |
| 30 | +| `minifi_java_repo_password` | Password for protected repositories (optional) | | |
| 31 | +| `minifi_tls_enabled` | Enable/disable TLS for MiNiFi Java agent | `false` | |
| 32 | +| `minifi_tls_client_certificate` | Path to client certificate file for TLS authentication | `/etc/pki/tls/certs/host.crt` | |
| 33 | +| `minifi_tls_client_private_key` | Path to client private key file for TLS authentication | `/etc/pki/tls/private/host.key` | |
| 34 | +| `minifi_tls_client_ca_certificate` | Path to CA certificate file for TLS authentication | `/etc/ipa/ca.crt` | |
| 35 | +| `minifi_java_service_path` | Path to the systemd service file for MiNiFi Java. | `/etc/systemd/system/minifi-java.service` | |
| 36 | +| `minifi_tls_keystore_path` | Path to the keystore file for TLS configuration. | | |
| 37 | +| `minifi_tls_keystore_type` | Type of the keystore (e.g., JKS, PKCS12). | | |
| 38 | +| `minifi_tls_keystore_password` | Password for the keystore file. | | |
| 39 | +| `minifi_tls_key_password` | Password for the private key in the keystore. | | |
| 40 | +| `minifi_tls_truststore_path` | Path to the truststore file for TLS configuration. | | |
| 41 | +| `minifi_tls_truststore_type` | Type of the truststore (e.g., JKS, PKCS12). | | |
| 42 | +| `minifi_tls_truststore_password` | Password for the truststore file. | | |
| 43 | +| `minifi_tls_ssl_protocol` | SSL protocol to use for TLS communication (e.g., TLSv1.2). | | |
| 44 | + |
| 45 | +## Example usage |
| 46 | + |
| 47 | +```yaml |
| 48 | +# Basic MiNiFi Java installation |
| 49 | +- hosts: minifi_nodes |
| 50 | + become: true |
| 51 | + tasks: |
| 52 | + - name: Install MiNiFi Java with basic configuration |
| 53 | + ansible.builtin.import_role: |
| 54 | + name: cloudera.exe.minifi_agent_java |
| 55 | + vars: |
| 56 | + minifi_java_repo_username: "repo_user" |
| 57 | + minifi_java_repo_password: "repo_pass" |
| 58 | + efm_host_url: "http://efm-server:10090" |
| 59 | + minifi_java_agent_class_name: "java-agent" |
| 60 | +# MiNiFi Java installation with TLS configuration |
| 61 | +- hosts: minifi_nodes |
| 62 | + become: true |
| 63 | + tasks: |
| 64 | + - name: Install MiNiFi Java with TLS enabled |
| 65 | + ansible.builtin.import_role: |
| 66 | + name: cloudera.exe.minifi_agent_java |
| 67 | + vars: |
| 68 | + efm_host_url: "https://efm-server:10090" |
| 69 | + minifi_tls_enabled: true |
| 70 | + minifi_tls_keystore_path: "/etc/pki/tls/keystore.jks" |
| 71 | + minifi_tls_keystore_password: "keystore_password" |
| 72 | + minifi_tls_truststore_path: "/etc/pki/tls/truststore.jks" |
| 73 | + minifi_tls_truststore_password: "truststore_password" |
| 74 | + minifi_tls_ssl_protocol: "TLSv1.2" |
| 75 | +``` |
| 76 | +
|
| 77 | +## License |
| 78 | +
|
| 79 | +``` |
| 80 | +Copyright 2025 Cloudera, Inc. |
| 81 | + |
| 82 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 83 | +you may not use this file except in compliance with the License. |
| 84 | +You may obtain a copy of the License at |
| 85 | + |
| 86 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 87 | + |
| 88 | +Unless required by applicable law or agreed to in writing, software |
| 89 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 90 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 91 | +See the License for the specific language governing permissions and |
| 92 | +limitations under the License. |
| 93 | +``` |
0 commit comments