Configurando o Servidor de Aplicação
As configurações do servidor de aplicação podem ser feitas de duas formas: via jboss-cli ou editando o arquivo xml. Não existe diferença técnica em nenhuma das opções, e a escolha vai de cada administrador. Abaixo ambos exemplos de configuração.
Atenção: Fique atento às variáveis para alterá-las de acordo com as configurações do seu ambiente.
Configurando servidor via jboss-cli
Conecte-se ao jboss-cli (considerando-se que o servidor esteja rodando) executando o comando abaixo:
[root@server /tmp]# /opt/wildfly/bin/jboss-cli.sh --connect
[standalone@localhost:9990 /]Em seguida execute os seguintes comandos substituindo o conteúdo das variáveis pela configuração do seu ambiente.
[standalone@localhost:9990 /] /system-property=mongodb.host:add(value="citmongo")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=mongodb.port:add(value="27017")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=mongodb.user:add(value="admin")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=mongodb.password:add(value="admin")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.protocol:add(value="http")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.host:add(value="my.citsmart.com")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.port:add(value="8080")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.context:add(value="citsmart")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.login:add(value="citsmart.local\\\consultor")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.password:add(value="senhaConsultor")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.inventory.id:add(value="citsmartinventory")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.evm.id:add(value="citsmartevm")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.evm.enable:add(value=true)
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.inventory.enable:add(value=true)
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.port.updateparameters:add(value="9000")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=citsmart.inventory.pagelength:add(value="100")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=rhino.scripts.directory:add(value="")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=jboss.as.management.blocking.timeout:add(value="600")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=org.quartz.properties:add(value="$\{jboss.server.config.dir\}/quartz.properties")
{"outcome" => "success"}
[standalone@localhost:9990 /]/system-property=snmp.oid.repository.directory:add(value="/opt/templates")
{"outcome" => "success"}Após as configurações, para sair do CLI digite quit
[standalone@localhost:9990 /] quit
[root@server /tmp]#Configurando o servidor via XML
Para editar o arquivo XML utilizado pelo wildfly na mão, entre no diretório:
[root@server /tmp]# /opt/wildfly/standalone/configurationE edite o arquivo stantalone-full.xml e inclua a configuração XML do CITSmart logo após a clausula abaixo:
<server xmlns="urn:jboss:domain:6.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
...
</extensions>Após o fechamento da configuração </extensions> inclua o trecho a seguir:
<system-properties>
<property name="mongodb.host" value="citmongo"/>
<property name="mongodb.port" value="27017"/>
<property name="mongodb.user" value="admin"/>
<property name="mongodb.password" value="admin"/>
<property name="citsmart.protocol" value="http"/>
<property name="citsmart.host" value="my.citsmartcloud.com"/>
<property name="citsmart.port" value="8080"/>
<property name="citsmart.context" value="citsmart"/>
<property name="citsmart.login" value="citsmart.local\\\consultor"/>
<property name="citsmart.password" value="senhaConsultor"/>
<property name="citsmart.inventory.id" value="citsmartinventory"/>
<property name="citsmart.evm.id" value="citsmartevm"/>
<property name="citsmart.evm.enable" value="false"/>
<property name="citsmart.inventory.enable" value="false"/>
<property name="rhino.scripts.directory" value=""/>
<property name="jboss.as.management.blocking.timeout" value="600"/>
<property name="citsmart.port.updateparameters" value="9000"/>
<property name="citsmart.inventory.pagelength" value="100"/>
<property name="org.quartz.properties" value="${jboss.server.config.dir}/quartz.properties"/>
<property name="snmp.oid.repository.directory" value="/opt/templates"/>
</system-properties>Após realizada as configurações, reinicie o serviço para efetivar as mudanças:
[root@server /tmp]# systemctl status wildflyConfigurando Firebase
- O arquivo a seguir tem a função de permitir a comunicação da aplicação com o aplicativo com mensageria via Push sempre que um novo ticket for criado/suspenso/reativo/reclassificado/encerrado;
- Para isso deverá ser colocado em uma das pastas do repositório do Citsmart.
- Após subir o pacote salve o caminho para utilizá-lo conforme orientado em: Configurando o servidor de aplicação