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.
-
Clone as usual
-
Go to cloned directory
-
Edit files to suit your needs
-
General VM settings in
Vagrantfile
-
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
-
Puppet provisioning in
manifests/default.pp
-
Needed modules and their dependencies in
Puppetfile
-
Hiera data in
data/
Follow (or edit) hierarchy defined in
hiera.yaml
-
-
Install Puppet modules with
r10k puppetfile install -v
-
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
- Create and provision or start existing VMs with
-
Enjoy the installations
Access the JBoss web console at <IP>:9990
# 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
# 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
-
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