Skip to content

Commit 9e39b37

Browse files
committed
update initial molecule tests to recent role changes and add published_ports (CM UI, HDFS, Yarn)
1 parent a2ac177 commit 9e39b37

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

molecule/default/molecule.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
---
2+
# Molecule config for a single-node CDH cluster
3+
#
4+
# Notes:
5+
# - Linters are set enabled=false because the roles currently contains many lint warnings
6+
# - The 'destroy' action is commented out to avoid accidentally destroying your molecule cluster
7+
#
28
dependency:
39
name: galaxy
410
driver:
@@ -15,24 +21,33 @@ platforms:
1521
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
1622
command: "/usr/sbin/init"
1723
groups:
18-
- cdh_master
19-
- cdh
2024
# following groups required by the role's site.yml playbook
2125
- cdh_servers
2226
- db_server
2327
- scm_server # group used during 'scm' role
24-
- master_servers # group used to install mysql-connector
28+
- krb5_server
2529
# networks:
2630
# - name: molecule_cdh
2731
# network_mode: bridge
32+
# Host networking did not work on my Macbook (it hang at task waiting for the Ambari Agents registration)
33+
#network_mode: host
34+
published_ports:
35+
# Cloudera Manager
36+
- 0.0.0.0:7180:7180/tcp
37+
# YARN
38+
- 0.0.0.0:8088:8088/tcp
39+
# HDFS
40+
- 0.0.0.0:50070:50070/tcp
41+
- 0.0.0.0:50075:50075/tcp
2842

2943
provisioner:
3044
name: ansible
3145
config_options:
32-
defaults:
33-
gathering: smart
34-
fact_caching: jsonfile
35-
fact_caching_connection: /tmp/facts_cache
46+
#TODO enable later
47+
# defaults:
48+
# gathering: smart
49+
# fact_caching: jsonfile
50+
# fact_caching_connection: /tmp/facts_cache
3651
ssh_connection:
3752
pipelining: True
3853

@@ -43,23 +58,10 @@ provisioner:
4358
group_vars:
4459
# Note: 'all' inventory group_vars will be overriden by the 'all' playbook group_vars, but not specific groups
4560
cdh_servers:
46-
# we install our own openjdk-8 (as the role only supports JDK7)
47-
cdh_install_java: false
48-
# for molecule tests it's enough to use the builtin Mysql
49-
cdh_install_mysql: true
50-
cdh_install_rngd: false
51-
cdh_install_groups_users: false
52-
cdh_install_cluster: false
53-
54-
# Ensure that the master node is the first in the list (not guaranteed in 'groups.kdcs')
55-
kerberos_server_kdcs: "{{ groups.cdh_master }}"
56-
kerberos_server_kadmin_host: "{{ groups.cdh_master[0] }}"
57-
kerberos_server_realm_name: EXAMPLE.COM
58-
kerberos_server_domain: "local"
59-
# To make molecule tests work, need to disable keberos reverse DNS, because docker builtin DNS is inconsistent
60-
# Details: Returned PTR were suffixed with the network name, except for the own host (resolved by /etc/hosts)
61-
kerberos_server_rdns: "false"
62-
61+
java_installation_strategy: package
62+
# assigning templates to our host:
63+
host_template: HostTemplate-Edge
64+
role_ref_names: HDFS-HTTPFS-1
6365
lint:
6466
name: ansible-lint
6567
scenario:

molecule/default/playbook.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
- name: Pre-reqs
33
hosts: all
44
tasks:
5-
- name: openjdk8
6-
package:
7-
name: java-1.8.0-openjdk
8-
#roles:
9-
# - role: cloudera-playbook
5+
- debug:
6+
msg: "Pre-reqs tasks if needed"
107

118
- name: Converge
129
# Note: To override the repo's "playbook group_vars" it's easier to use a "vars:" block here, as inventory vars have lower precedence!

0 commit comments

Comments
 (0)