Skip to content

Commit

Permalink
update initial molecule tests to recent role changes and add publishe…
Browse files Browse the repository at this point in the history
…d_ports (CM UI, HDFS, Yarn)
  • Loading branch information
lhoss committed Nov 29, 2019
1 parent a2ac177 commit 9e39b37
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 29 deletions.
50 changes: 26 additions & 24 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

Expand All @@ -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:
Expand Down
7 changes: 2 additions & 5 deletions molecule/default/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 9e39b37

Please # to comment.