diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index c7cb9df..92e1be7 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -1,4 +1,10 @@ --- +# Molecule config for a single-node CDH cluster +# +# Notes: +# - Linters are set enabled=false because the roles currently contains many lint warnings +# - The 'destroy' action is commented out to avoid accidentally destroying your molecule cluster +# dependency: name: galaxy driver: @@ -15,24 +21,33 @@ platforms: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" groups: - - cdh_master - - cdh # following groups required by the role's site.yml playbook - cdh_servers - db_server - scm_server # group used during 'scm' role - - master_servers # group used to install mysql-connector + - krb5_server # networks: # - name: molecule_cdh # network_mode: bridge + # Host networking did not work on my Macbook (it hang at task waiting for the Ambari Agents registration) + #network_mode: host + published_ports: + # Cloudera Manager + - 0.0.0.0:7180:7180/tcp + # YARN + - 0.0.0.0:8088:8088/tcp + # HDFS + - 0.0.0.0:50070:50070/tcp + - 0.0.0.0:50075:50075/tcp provisioner: name: ansible config_options: - defaults: - gathering: smart - fact_caching: jsonfile - fact_caching_connection: /tmp/facts_cache + #TODO enable later + # defaults: + # gathering: smart + # fact_caching: jsonfile + # fact_caching_connection: /tmp/facts_cache ssh_connection: pipelining: True @@ -43,23 +58,10 @@ provisioner: group_vars: # Note: 'all' inventory group_vars will be overriden by the 'all' playbook group_vars, but not specific groups cdh_servers: - # we install our own openjdk-8 (as the role only supports JDK7) - cdh_install_java: false - # for molecule tests it's enough to use the builtin Mysql - cdh_install_mysql: true - cdh_install_rngd: false - cdh_install_groups_users: false - cdh_install_cluster: false - - # Ensure that the master node is the first in the list (not guaranteed in 'groups.kdcs') - kerberos_server_kdcs: "{{ groups.cdh_master }}" - kerberos_server_kadmin_host: "{{ groups.cdh_master[0] }}" - kerberos_server_realm_name: EXAMPLE.COM - kerberos_server_domain: "local" - # To make molecule tests work, need to disable keberos reverse DNS, because docker builtin DNS is inconsistent - # Details: Returned PTR were suffixed with the network name, except for the own host (resolved by /etc/hosts) - kerberos_server_rdns: "false" - + java_installation_strategy: package + # assigning templates to our host: + host_template: HostTemplate-Edge + role_ref_names: HDFS-HTTPFS-1 lint: name: ansible-lint scenario: diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml index 734e0e4..e6b16db 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/playbook.yml @@ -2,11 +2,8 @@ - name: Pre-reqs hosts: all tasks: - - name: openjdk8 - package: - name: java-1.8.0-openjdk - #roles: - # - role: cloudera-playbook + - debug: + msg: "Pre-reqs tasks if needed" - name: Converge # Note: To override the repo's "playbook group_vars" it's easier to use a "vars:" block here, as inventory vars have lower precedence!