Wednesday, October 26, 2016

Wildfly and JSF




Checking existing JSF subsystem and default module
[jboss@69c9222702f3 bin]$ ./jboss-cli.sh 
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect 10.80.1.209:9990
Authenticating against security realm: ManagementRealm
Username: admin
Password: 
[standalone@10.80.1.209:9990 /] /subsystem=jsf/:list-active-jsf-impls
{
    "outcome" => "success",
    "result" => ["main"]
}
[standalone@10.80.1.209:9990 /] /subsystem=jsf/:read-attribute(name=default-jsf-impl-slot)
{
    "outcome" => "success",
    "result" => "main"
}
[standalone@10.80.1.209:9990 /] 
* That show you only one module installed names "main"

Deploy new one v1.2 and restart Wildfly
[standalone@10.80.1.209:9990 /] deploy /install-mojarra-1.2_15.cli
* This cli file, need to build with Maven follow steps in this site
-or- Download files from github


Verify installed module ,change default to new added and restart Wildfly

[jboss@69c9222702f3 bin]$ ./jboss-cli.sh 
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect 10.80.1.209:9990
Authenticating against security realm: ManagementRealm
Username: admin
Password: 
[standalone@10.80.1.209:9990 /] /subsystem=jsf/:list-active-jsf-impls
{
    "outcome" => "success",
    "result" => [
        "mojarra-1.2_15",
        "main"
    ]
}
[standalone@10.80.1.209:9990 /] /subsystem=jsf/:read-attribute(name=default-jsf-impl-slot)
{
    "outcome" => "success",
    "result" => "main"
}
[standalone@10.80.1.209:9990 /] /subsystem=jsf/:write-attribute(name=default-jsf-impl-slot,value=mojarra-1.2_15)
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}
[standalone@10.80.1.209:9990 /] 

Confirm default to JSF 1.2

[jboss@69c9222702f3 bin]$ ./jboss-cli.sh 
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect 10.80.1.209:9990
Authenticating against security realm: ManagementRealm
Username: admin
Password: 
[standalone@10.80.1.209:9990 /] /subsystem=jsf/:read-attribute(name=default-jsf-impl-slot)
{
    "outcome" => "success",
    "result" => "mojarra-1.2_15"
}


Test JSF 1.2 Web Application


Reference Site : Steps to add any new JSF implementation or version to WildFly





Tuesday, October 11, 2016

JMeter on containers





nutt@nutt-pc:~$ docker network create --driver=bridge --subnet=172.27.0.0/16 \
> --ip-range=172.27.5.0/24 \
> --gateway=172.27.5.254 \
> my-net
1721e834110c184f92ce2ae1008bf5f5dcd735f38a7d35f6bbcc9eebc4d5de8e
nutt@nutt-pc:~$ docker network inspect my-net
[
    {
        "Name": "my-net",
        "Id": "1721e834110c184f92ce2ae1008bf5f5dcd735f38a7d35f6bbcc9eebc4d5de8e",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.27.0.0/16",
                    "IPRange": "172.27.5.0/24",
                    "Gateway": "172.27.5.254"
                }
            ]
        },
        "Internal": false,
        "Containers": {},
        "Options": {},
        "Labels": {}
    }
]


nutt@nutt-pc:~$ docker run -it --net="my-net" --add-host="jmeter-server:172.27.5.1" --mac-address="9a:17:a0:c7:b4:cb" --ip="172.27.5.1" --name jmeter-server1 ubuntu bash
root@c07696364171:/# 
root@c07696364171:/# 
root@c07696364171:/# 
root@c07696364171:/# 
root@c07696364171:/# apt-get update
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main Sources [1103 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/restricted Sources [5179 B]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [244 kB]   
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [124 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [506 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [418 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-security/main Sources [51.4 kB] 
Get:15 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources [11.1 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [191 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [52.5 kB]
Fetched 24.3 MB in 11s (2109 kB/s)                                             
Reading package lists... Done


Create DOCKERFILE