Instructions for Virtual machine based Hyperglance:


1. Convert the PEM key to DER using the below command (where a.key is the key file and a_key is the result key file)
                     openssl pkcs8 -topk8 -inform PEM -outform DER -in "a.key"  -nocrypt > a_key

2. Convert the CA & Client into DER format

                     openssl x509 -outform der -in ca.crt -out ca.der

                     openssl x509 -outform der -in client0001.crt -out client0001.der

3. copy the der formatted ca.crt, client.crt and key to /opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/

If you have the Hyperglance Docker image see instructions below

4. Change ownership of the certs to the wildfly user

                     chown wildfly:wildfly /opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/* 

5. Decide the alias name you will provide for the docker URL. Use the alias to add the below 3 properties in the runtime.properties file found in the same location.

6. Tell Hyperglance what certs to use for what docker swarm

vi /opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/runtime.properties

  

docker.<alias>.client-crt=client.crt

docker.<alias>.ca-crt=ca.crt

docker.<alias>.client-key=a_key

 

 7. Restart Hyperglance

sudo service wildfly restart 



Instructions for container based Hyperglance:

1. Convert the PEM key to DER using the below command (where a.key is the key file and a_key is the result key file)
                     openssl pkcs8 -topk8 -inform PEM -outform DER -in "a.key"  -nocrypt > a_key

2. Convert the CA & Client into DER format

                     openssl x509 -outform der -in ca.crt -out ca.crt.der

                     openssl x509 -outform der -in client0001.key -out client0001.key.der

3. Copy over certs   
docker cp ca.crt.der hyperglance:/opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/ 
docker cp client0001.key.der hyperglance:/opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/ 
docker cp a_key hyperglance:/opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/ 
  
4. Connect into the Hyperglance container 
docker exec -i -t hyperglance bash 
  
5. Change cert ownership so Hyperglance can read them, 
chown wildfly:wildfly /opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/* 
  
6. Install vi (will have this installed by default in next week) 
yum install vi -y 
  
7. Tell Hyperglance what certs to use for what docker swarm 
vi /opt/wildfly/standalone/deployments/collector-plugins/DockerCollector.ear/lib/config.jar/runtime.properties 
  
docker.<alias>.client-crt=client.crt 
docker.<alias>.ca-crt=ca.crt 
docker.<alias>.client-key=a_key 
  
8. Restart wildfly 
kill 77 
  
9. Add Docker swarm details to Hyperglance 
go to https://IP_address:8443/#/admin. Select the 'Docker' Collector and enter in Docker alias & URL