Skip to content

Vagrant simple environment for testing Puppet module biemond/wildfly

Notifications You must be signed in to change notification settings

EmersonPrado/vagrant-puppet-wildfly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmersonPrado/vagrant-puppet-wildfly

Index

  1. Description
  2. Usage
  3. Validation
    1. Standalone mode
    2. Domain mode
  4. Limitations

Description

This project contains a Vagrant configuration which configures a set of VMs aimed at testing Puppet wildfly module. It can be used to confirm both functionality and bugs and test specific implementations and bug solutions.

Usage

  1. Clone as usual

  2. Go to cloned directory

  3. Edit files to suit your needs

    1. General VM settings in Vagrantfile

    2. VM list and per-VM IPs in vms.yaml

      Vagrant private network - VirtualBox host-only network - On top of Vagrant's mandatory NAT interface

      IPs are optional - In their abscence, VMs get only NAT interface

      Use IPs in range 192.168.56.2 - 192.168.56.255

    3. Puppet provisioning in manifests/default.pp

    4. Needed modules and their dependencies in Puppetfile

    5. Hiera data in data/

      Follow (or edit) hierarchy defined in hiera.yaml

  4. Install Puppet modules with r10k puppetfile install -v

  5. Manage VMs

    • Create and provision or start existing VMs with vagrant up
    • Provision (again) with vagrant provision
    • Shut down with vagrant halt
    • Erase wih vagrant destroy
  6. Enjoy the installations

    Access the JBoss web console at <IP>:9990

Validation

Standalone mode

# In your station
vagrant up standalone
vagrant ssh standalone

# Inside VM:
systemctl status wildfly
# Answer should contain "Active: active (running)"

sudo netstat -ptln | sed -n '1,2p;/java/p'
# Answer should be:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 192.168.56.4:9990       :::*                    LISTEN      <PID>/java
tcp6       0      0 127.0.0.1:8080          :::*                    LISTEN      <PID>/java

# Remember to close VM SSH session
exit

Access the web console in your browser

  • User: admin
  • Pass: pass

Enter "Runtime" tab

There should be server "Standalone Server"

Remember to close the session: Admin -> Logout -> Confirm

Domain mode

# In your station
vagrant up controller managed
vagrant ssh controller

# Inside VM:
systemctl status wildfly
# Answer should contain "Active: active (running)"

sudo netstat -ptln | sed -n '1,2p;/java/p'
# Answer should be:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 192.168.56.5:9990       :::*                    LISTEN      <PID>/java
tcp6       0      0 192.168.56.5:9999       :::*                    LISTEN      <PID>/java
tcp6       0      0 127.0.0.1:<Port>        :::*                    LISTEN      <PID>/java

# Remember to close VM SSH session
exit

# In your station
vagrant ssh managed

# Inside VM:
systemctl status wildfly
# Answer should contain "Active: active (running)"

nmap -p9990,9999 192.168.56.5
# Answer should contain:
PORT     STATE SERVICE
9990/tcp open  osm-appsrvr
9999/tcp open  abyss

# Remember to close VM SSH session
exit

Access the web console in your browser

  • User: admin
  • Pass: pass

Enter "Runtime" tab

  • Hosts: there should be "managed" and "master"
  • Server Groups: there should be "app-server-group", with server "app"

Remember to close the session: Admin -> Logout -> Confirm

Limitations

  • Only tested with CentOS (Vagrant box bento/centos-7), Puppet 6 and Java JDK 9.0.1

  • JGroups still not implemented

  • Not much configurable (so far, aims very specific tests)

  • Might get some network domain and include in the VMs FQDNs

  • Issues a warning - apparently harmless - after resource /Stage[main]/Wildfly::Install/File[/tmp/wildfly/wildfly-<Version>.tar.gz]/ensure:

    ==> <MV name>: Warning: Private key for '<MV FQDN>' does not exist
    ==> <MV name>: Warning: Client certificate for '<MV FQDN>' does not exist
    
  • Issues an error - apparently harmless - in managed VM:

    ==> managed: Notice: /Stage[main]/Main/Node[__node_regexp__managed]/Wildfly::Host::Server_config[app]/Wildfly_resource[/host=managed/server-config=app]/ensure: created
    ==> managed: Error: Net::ReadTimeout
    ==> managed: Error: /Stage[main]/Main/Node[__node_regexp__managed]/Wildfly::Host::Server_config[app]/Wildfly_cli[/host=managed/server-config=app:start(blocking=true)]/executed: change from false to true failed: Net::ReadTimeout
    

About

Vagrant simple environment for testing Puppet module biemond/wildfly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published