Commit 420d6af38fa7500db66259aabab844442c2a6405
1 parent
ee1021a4
Exists in
master
Criados templates para o arquivo ConfiguracaoSEI.php e ConfiguracaoSip.php, agor…
…a sao criados dinamicamente
Showing
4 changed files
with
203 additions
and
0 deletions
Show diff stats
manifests/init.pp
| @@ -54,4 +54,16 @@ class seiaio ( | @@ -54,4 +54,16 @@ class seiaio ( | ||
| 54 | 54 | ||
| 55 | include seiaio::jodc | 55 | include seiaio::jodc |
| 56 | 56 | ||
| 57 | + class { 'seiaio::seiconf': | ||
| 58 | + docroot => $docroot, | ||
| 59 | + owner => $owner, | ||
| 60 | + group => $group, | ||
| 61 | + dominio => $dominio, | ||
| 62 | + seidados => $diretorio_seidados, | ||
| 63 | + mysql_ipaddr => $mysql_ipaddr, | ||
| 64 | + sei_mysql_pass => $sei_mysql_pass, | ||
| 65 | + sip_mysql_pass => $sip_mysql_pass, | ||
| 66 | + sigla_organizacao => $sigla_organizacao, | ||
| 67 | + nome_organizacao => $nome_organizacao, | ||
| 68 | + } | ||
| 57 | } | 69 | } |
| @@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
| 1 | +class seiaio::seiconf ( | ||
| 2 | + String $docroot = $::seiaio::params::httpd_sei_docroot, | ||
| 3 | + String $owner = $::seiaio::params::httpd_owner, | ||
| 4 | + String $group = $::seiaio::params::httpd_group, | ||
| 5 | + String $sei_mysql_pass = $::seiaio::params::sei_mysql_pass, | ||
| 6 | + String $sip_mysql_pass = $::seiaio::params::sip_mysql_pass, | ||
| 7 | + String $mysql_ipaddr = $::seiaio::params::mysql_ipaddr, | ||
| 8 | + String $dominio = $::seiaio::params::dominio, | ||
| 9 | + String $sigla_organizacao = $::seiaio::params::sigla_organizacao, | ||
| 10 | + String $nome_organizacao = $::seiaio::params::nome_organizacao, | ||
| 11 | + String $seidados = $::seiaio::params::httpd_sei_dados | ||
| 12 | + ) inherits seiaio::params { | ||
| 13 | + | ||
| 14 | + file { "$docroot/sei/ConfiguracaoSEI.php": | ||
| 15 | + ensure => 'file', | ||
| 16 | + mode => '0664', | ||
| 17 | + owner => $owner, | ||
| 18 | + group => $group, | ||
| 19 | + content => template('seiaio/sei/ConfiguracaoSEI.php.erb'), | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + file { "$docroot/sip/ConfiguracaoSip.php": | ||
| 23 | + ensure => 'file', | ||
| 24 | + mode => '0664', | ||
| 25 | + owner => $owner, | ||
| 26 | + group => $group, | ||
| 27 | + content => template('seiaio/sip/ConfiguracaoSIP.php.erb'), | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | +} |
| @@ -0,0 +1,103 @@ | @@ -0,0 +1,103 @@ | ||
| 1 | +<? | ||
| 2 | + | ||
| 3 | +require_once dirname(__FILE__).'/SEI.php'; | ||
| 4 | + | ||
| 5 | +class ConfiguracaoSEI extends InfraConfiguracao { | ||
| 6 | + | ||
| 7 | + private static $instance = null; | ||
| 8 | + | ||
| 9 | + public static function getInstance(){ | ||
| 10 | + if (ConfiguracaoSEI::$instance == null) { | ||
| 11 | + ConfiguracaoSEI::$instance = new ConfiguracaoSEI(); | ||
| 12 | + } | ||
| 13 | + return ConfiguracaoSEI::$instance; | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | + public function getArrConfiguracoes(){ | ||
| 17 | + return array( | ||
| 18 | + | ||
| 19 | + 'SEI' => array( | ||
| 20 | + 'URL' => 'http://<%= @dominio %>/sei', | ||
| 21 | + 'Producao' => true, | ||
| 22 | + 'RepositorioArquivos' => '<%= @seidados %>'), | ||
| 23 | + | ||
| 24 | + 'PaginaSEI' => array( | ||
| 25 | + 'NomeSistema' => 'SEI', | ||
| 26 | + 'NomeSistemaComplemento' => 'Processo Eletronico', | ||
| 27 | + 'LogoMenu' => 'Teste'), | ||
| 28 | + | ||
| 29 | + 'SessaoSEI' => array( | ||
| 30 | + 'SiglaOrgaoSistema' => '<%= @sigla_organizacao %>', | ||
| 31 | + 'SiglaSistema' => 'SEI', | ||
| 32 | + 'PaginaLogin' => 'http://<%= @dominio %>/sip/login.php', | ||
| 33 | + 'SipWsdl' => 'http://<%= @dominio %>/sip/controlador_ws.php?servico=wsdl', | ||
| 34 | + 'https' => false), | ||
| 35 | + | ||
| 36 | + 'BancoSEI' => array( | ||
| 37 | + 'Servidor' => '<%= @mysql_ipaddr %>', | ||
| 38 | + 'Porta' => '3306', | ||
| 39 | + 'Banco' => 'sei', | ||
| 40 | + 'Usuario' => 'user_sei', | ||
| 41 | + 'Senha' => '<%= @sei_mysql_pass %>', | ||
| 42 | + 'Tipo' => 'MySql'), //MySql, SqlServer ou Oracle | ||
| 43 | + | ||
| 44 | + 'Editor' => array( | ||
| 45 | + 'Edoc' => false, | ||
| 46 | + 'CarregarAgenteEdoc' => false, | ||
| 47 | + 'Interno' => true), | ||
| 48 | + | ||
| 49 | + 'CacheSEI' => array( | ||
| 50 | + 'Servidor' => '127.0.0.1', | ||
| 51 | + 'Porta' => '11211'), | ||
| 52 | + | ||
| 53 | + 'JODConverter' => array('Servidor' => 'http://localhost:8080/converter/service'), | ||
| 54 | + | ||
| 55 | + 'Edoc' => array('Servidor' => 'http://[Servidor .NET]'), | ||
| 56 | + | ||
| 57 | + 'Pesquisa' => array( | ||
| 58 | + 'Banco' => false, | ||
| 59 | + 'Solr' => true, | ||
| 60 | + | ||
| 61 | + /* | ||
| 62 | + Se habilitada SqlServerFullTextSearch criar catálogo com os campos: | ||
| 63 | + indexacao_protocolo.idx_descricao | ||
| 64 | + indexacao_protocolo.idx_participante | ||
| 65 | + indexacao_protocolo.idx_assunto | ||
| 66 | + indexacao_protocolo.idx_unidade_acesso | ||
| 67 | + indexacao_protocolo.idx_unidade_aberto | ||
| 68 | + indexacao_protocolo.idx_assinante | ||
| 69 | + indexacao_protocolo.idx_observacao | ||
| 70 | + indexacao_protocolo.idx_conteudo | ||
| 71 | + indexacao_base_conhecimento.idx_conteudo | ||
| 72 | + indexacao_publicacao.idx_resumo | ||
| 73 | + indexacao_publicacao.idx_conteudo | ||
| 74 | + */ | ||
| 75 | + 'SqlServerFullTextSearch' => false), | ||
| 76 | + | ||
| 77 | + 'Solr' => array( | ||
| 78 | + 'Servidor' => 'http://localhost:8080/solr', | ||
| 79 | + 'CoreProtocolos' => 'sei-protocolos', | ||
| 80 | + 'CoreBasesConhecimento' => 'sei-bases-conhecimento', | ||
| 81 | + 'CorePublicacoes' => 'sei-publicacoes'), | ||
| 82 | + | ||
| 83 | + 'HostWebService' => array( | ||
| 84 | + 'Edoc' => array('127.0.0.1','localhost'), | ||
| 85 | + 'Sip' => array('127.0.0.1','localhost'), //Referências (IP e nome na rede) de todas as máquinas que executam o SIP. | ||
| 86 | + 'Publicacao' => array('127.0.0.1','localhost'), //Referências (IP e nome na rede) das máquinas de veículos de publicação externos cadastrados no SEI. | ||
| 87 | + 'Ouvidoria' => array('127.0.0.1','localhost'), //Referências (IP e nome na rede) da máquina que hospeda o formulário de Ouvidoria personalizado. Se utilizar o formulário padrão do SEI, então configurar com as máquinas dos nós de aplicação do SEI. | ||
| 88 | + ), | ||
| 89 | + | ||
| 90 | + 'InfraMail' => array( | ||
| 91 | + 'Tipo' => '1', //1 = sendmail (neste caso não é necessário configurar os atributos abaixo), 2 = SMTP | ||
| 92 | + 'Servidor' => 'localhost', | ||
| 93 | + 'Porta' => '25', | ||
| 94 | + 'Codificacao' => '8bit', //8bit, 7bit, binary, base64, quoted-printable | ||
| 95 | + 'Autenticar' => false, //se true então informar Usuario e Senha | ||
| 96 | + 'Usuario' => '', | ||
| 97 | + 'Senha' => '', | ||
| 98 | + 'Protegido' => ''), //campo usado em desenvolvimento, se tiver um email preenchido entao todos os emails enviados terao o destinatario ignorado e substituído por este valor (evita envio incorreto de email) | ||
| 99 | + | ||
| 100 | + ); | ||
| 101 | + } | ||
| 102 | +} | ||
| 103 | +?> |
| @@ -0,0 +1,58 @@ | @@ -0,0 +1,58 @@ | ||
| 1 | +<? | ||
| 2 | + | ||
| 3 | +require_once dirname(__FILE__).'/Sip.php'; | ||
| 4 | + | ||
| 5 | +class ConfiguracaoSip extends InfraConfiguracao { | ||
| 6 | + | ||
| 7 | + private static $instance = null; | ||
| 8 | + | ||
| 9 | + public static function getInstance(){ | ||
| 10 | + if (ConfiguracaoSip::$instance == null) { | ||
| 11 | + ConfiguracaoSip::$instance = new ConfiguracaoSip(); | ||
| 12 | + } | ||
| 13 | + return ConfiguracaoSip::$instance; | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | + public function getArrConfiguracoes(){ | ||
| 17 | + return array( | ||
| 18 | + 'Sip' => array( | ||
| 19 | + 'URL' => 'http://<%= @dominio %>/sip', | ||
| 20 | + 'Producao' => true), | ||
| 21 | + | ||
| 22 | + 'PaginaSip' => array('NomeSistema' => 'SIP'), | ||
| 23 | + | ||
| 24 | + 'SessaoSip' => array( | ||
| 25 | + 'SiglaOrgaoSistema' => '<%= @sigla_organizacao %>', | ||
| 26 | + 'SiglaSistema' => 'SIP', | ||
| 27 | + 'PaginaLogin' => 'http://<%= @dominio %>/sip/login.php', | ||
| 28 | + 'SipWsdl' => 'http://<%= @dominio %>/sip/controlador_ws.php?servico=wsdl', | ||
| 29 | + 'https' => false), | ||
| 30 | + | ||
| 31 | + 'BancoSip' => array( | ||
| 32 | + 'Servidor' => '<%= @mysql_ipaddr %>', | ||
| 33 | + 'Porta' => '3306', | ||
| 34 | + 'Banco' => 'sip', | ||
| 35 | + 'Usuario' => 'user_sip', | ||
| 36 | + 'Senha' => '<%= @sei_mysql_pass %>', | ||
| 37 | + 'Tipo' => 'MySql'), //MySql, SqlServer ou Oracle | ||
| 38 | + | ||
| 39 | + 'HostWebService' => array( | ||
| 40 | + 'Replicacao' => array('127.0.0.1','localhost'), //endereço ou IP da máquina que implementa o serviço de replicação de usuários | ||
| 41 | + 'Pesquisa' => array('127.0.0.1','localhost'), //endereços/IPs das máquinas do SEI | ||
| 42 | + 'Autenticacao' => array('127.0.0.1','localhost')), //endereços/IPs das máquinas do SEI | ||
| 43 | + | ||
| 44 | + 'InfraMail' => array( | ||
| 45 | + 'Tipo' => '1', //1 = sendmail (neste caso não é necessário configurar os atributos abaixo), 2 = SMTP | ||
| 46 | + 'Servidor' => 'localhost', | ||
| 47 | + 'Porta' => '25', | ||
| 48 | + 'Codificacao' => '8bit', //8bit, 7bit, binary, base64, quoted-printable | ||
| 49 | + 'Autenticar' => false, //se true então informar Usuario e Senha | ||
| 50 | + 'Usuario' => '', | ||
| 51 | + 'Senha' => '', | ||
| 52 | + 'Protegido' => ''), //campo usado em desenvolvimento, se tiver um email preenchido entao todos os emails enviados terao o destinatario ignorado e substituído por este valor (evita envio incorreto de email) | ||
| 53 | + | ||
| 54 | + ); | ||
| 55 | + | ||
| 56 | + } | ||
| 57 | +} | ||
| 58 | +?> |