|
| 1 | +# Edge Flow Manager |
| 2 | + |
| 3 | +## Requirements |
| 4 | + |
| 5 | +- Network access from the target host to the URL specified in `efm_tarball_url` |
| 6 | +- When `efm_tls_enabled: true`, all TLS-related variables must be defined in your playbook |
| 7 | +- When `efm_ldap_enabled: true`, all LDAP-related variables must be defined in your playbookr |
| 8 | + |
| 9 | +This role streamlines the deployment and configuration of Cloudera Edge Flow Manager (EFM) on designeted host. It covers the full installation workflow, from fetching the EFM package to setting up the service and applying configuration templates. |
| 10 | + |
| 11 | +## What this role does |
| 12 | + |
| 13 | +- Validates required configuration variables based on enabled features (TLS, LDAP) |
| 14 | +- Retrieves the EFM tarball from a user-defined or default source |
| 15 | +- Installs EFM into a configurable directory |
| 16 | +- Sets up the required system user and group for EFM |
| 17 | +- Applies configuration using a Jinja2 template for `efm.properties` |
| 18 | +- Installs and manages the EFM systemd service unit |
| 19 | +- Adjusts permissions for all relevant files and directories |
| 20 | +- Supports authentication for protected download sources |
| 21 | + |
| 22 | +# Requirements |
| 23 | + |
| 24 | +- Network access from the target host to the URL specified in `efm_tarball_url`. |
| 25 | + |
| 26 | +## Variables |
| 27 | + |
| 28 | +| Name | Purpose | Default (see `defaults/main.yml`) | |
| 29 | +|----------------------------------|--------------------------------------------------------------|---------------------------------------------| |
| 30 | +| `efm_tarball_url` | Download link for the EFM tarball | (default provided in role) | |
| 31 | +| `efm_directory` | Installation directory for EFM | `/opt/cloudera/cem` | |
| 32 | +| `efm_properties_directory` | Path to the EFM properties file | `/opt/cloudera/cem/efm/conf/efm.properties` | |
| 33 | +| `efm_service_directory` | Location for the systemd service file | `/etc/systemd/system/efm.service` | |
| 34 | +| `efm_user` | System user for EFM | `efm` | |
| 35 | +| `efm_group` | System group for EFM | `efm` | |
| 36 | +| `efm_repo_username` | Username for protected repositories (optional) | | |
| 37 | +| `efm_repo_password` | Password for protected repositories (optional) | | |
| 38 | +| `efm_tls_enabled` | Enable/disable TLS for EFM server | `false` | |
| 39 | +| `efm_ssl_client_auth` | SSL client authentication mode | `WANT` | |
| 40 | +| `efm_ssl_keystore_type` | Type of keystore (jks, pkcs12) | `jks` | |
| 41 | +| `efm_ssl_truststore_type` | Type of truststore (jks, pkcs12) | `jks` | |
| 42 | +| `efm_ssl_keystore_path` | Path to SSL keystore (must be defined when TLS enabled) | |
| 43 | +| `efm_ssl_keystore_password` | SSL keystore password (must be defined when TLS enabled) | |
| 44 | +| `efm_ssl_key_password` | SSL private key password (must be defined when TLS enabled) | |
| 45 | +| `efm_ssl_truststore_path` | Path to SSL truststore (must be defined when TLS enabled) | |
| 46 | +| `efm_ssl_truststore_password` | SSL truststore password (must be defined when TLS enabled) | |
| 47 | +| `efm_ldap_enabled` | Enable/disable LDAP authentication | `false` | |
| 48 | +| `efm_ldap_url` | LDAP server URL (must be defined when LDAP enabled) | |
| 49 | +| `efm_ldap_authentication_strategy` | LDAP authentication strategy (must be defined when LDAP enabled) | |
| 50 | +| `efm_ldap_user_auth_groups_manager` | Authentication groups manager (must be defined when LDAP enabled) | |
| 51 | +| `efm_ldap_auth_enabled` | Enable LDAP authentication (must be defined when LDAP enabled) | |
| 52 | +| `efm_ldap_auth_search_filter` | LDAP search filter for users (must be defined when LDAP enabled) | |
| 53 | +| `efm_ldap_user_search_base` | LDAP search base for users (must be defined when LDAP enabled) | |
| 54 | +| `efm_ldap_user_object_class` | LDAP object class for users (must be defined when LDAP enabled) | |
| 55 | +| `efm_ldap_tls_protocol` | TLS protocol for LDAP connections (must be defined when LDAP enabled) | |
| 56 | +| `efm_ldap_user_search_scope` | LDAP search scope (must be defined when LDAP enabled) | |
| 57 | +| `efm_ldap_user_identity_attribute` | LDAP identity attribute (must be defined when LDAP enabled) | |
| 58 | +| `efm_db_url` | Database connection URL | `jdbc:postgresql://localhost:5432/efm` | |
| 59 | +| `efm_db_driver_class` | Database driver class | `org.postgresql.Driver` | |
| 60 | +| `efm_db_username` | Database username | `efm` | |
| 61 | +| `efm_db_password` | Database password | `efmPassword` | |
| 62 | + |
| 63 | +## Example usage |
| 64 | + |
| 65 | +```yaml |
| 66 | +# Basic EFM installation |
| 67 | +- hosts: efm_nodes |
| 68 | + become: true |
| 69 | + tasks: |
| 70 | + - name: Install EFM with basic configuration |
| 71 | + ansible.builtin.import_role: |
| 72 | + name: cloudera.exe.efm |
| 73 | + vars: |
| 74 | + efm_tarball_url: "https://archive.cloudera.com/p/CEM/redhat9/2.x/updates/2.2.0.0/tars/efm/efm-2.2.0.0-1-bin.tar.gz" |
| 75 | + efm_repo_username: "repo_user" |
| 76 | + efm_repo_password: "repo_pass" |
| 77 | + efm_encryption_password: "MySecurePassword123" |
| 78 | + |
| 79 | + - name: Install EFM with TLS and LDAP enabled |
| 80 | + ansible.builtin.import_role: |
| 81 | + name: cloudera.exe.efm |
| 82 | + vars: |
| 83 | + efm_encryption_password: "MySecurePassword123" |
| 84 | + # TLS Configuration (ALL variables required when efm_tls_enabled: true) |
| 85 | + efm_tls_enabled: true |
| 86 | + efm_ssl_client_auth: "WANT" |
| 87 | + efm_ssl_keystore_type: "jks" |
| 88 | + efm_ssl_truststore_type: "jks" |
| 89 | + efm_ssl_keystore_path: "/opt/cloudera/cem/certs/keystore.jks" |
| 90 | + efm_ssl_keystore_password: "MyKeystorePass" |
| 91 | + efm_ssl_key_password: "MyKeyPass" |
| 92 | + efm_ssl_truststore_path: "/opt/cloudera/cem/certs/truststore.jks" |
| 93 | + efm_ssl_truststore_password: "MyTruststorePass" |
| 94 | + # LDAP Configuration (ALL variables required when efm_ldap_enabled: true) |
| 95 | + efm_ldap_enabled: true |
| 96 | + efm_ldap_url: "ldaps://your-ldap-server.example.com:636" |
| 97 | + efm_ldap_authentication_strategy: "LDAPS" |
| 98 | + efm_ldap_user_auth_groups_manager: "LDAP" |
| 99 | + efm_ldap_auth_enabled: true |
| 100 | + efm_ldap_auth_search_filter: "(uid={0})" |
| 101 | + efm_ldap_user_search_base: "cn=users,cn=accounts,dc=example,dc=com" |
| 102 | + efm_ldap_user_object_class: "person" |
| 103 | + efm_ldap_tls_protocol: "TLSv1.2" |
| 104 | + efm_ldap_user_search_scope: "ONE_LEVEL" |
| 105 | + efm_ldap_user_identity_attribute: "uid" |
| 106 | + # Database Configuration (if not using defaults) |
| 107 | + efm_db_url: "jdbc:postgresql://db-server:5432/efm_prod" |
| 108 | + efm_db_username: "efm_user" |
| 109 | + efm_db_password: "SecureDbPassword" |
| 110 | +``` |
| 111 | +
|
| 112 | +## License |
| 113 | +
|
| 114 | +``` |
| 115 | +Copyright 2025 Cloudera, Inc. |
| 116 | + |
| 117 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 118 | + you may not use this file except in compliance with the License. |
| 119 | + You may obtain a copy of the License at |
| 120 | + |
| 121 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 122 | + |
| 123 | + Unless required by applicable law or agreed to in writing, software |
| 124 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 125 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 126 | + See the License for the specific language governing permissions and |
| 127 | + limitations under the License. |
| 128 | +``` |
0 commit comments