quarta-feira, 6 de novembro de 2019

Migrando o OVM Manager para um novo servidor utilizando um backup da base de dados

O Oracle VM Manager, conhecido normalmente por OVM Manager, é um estrutura composta de vários componentes inter-relacionados que por fim criam uma Interface baseada na Web e por linha de comando que permitem o gerenciamento de todo o ambiente Oracle VM (OVM).


Devido ao OVM Manager ser "apenas" um gerenciador do ambiente Oracle VM, o mesmo acaba não possuindo redundância, configurações de alta disponibilidade (pois o ambiente OVM acaba funcionando mesmo durante a inatividade do Manager) e claro, backup! 

Apesar do backup da base do Manager ser de extrema importância para sua recuperação ainda existem formas em que ele poder ser recuperado (reinstalado) sem necessidade de qualquer restore da antiga base de dados e posteriormente todos os OVM Servers serem descobertos novamente. Claro, isso é recomendado apenas em últimos casos e se realmente não existir um backup disponível, lembrando de algumas possíveis penalidades do processo.

When you perform a restore in this manner, the names and descriptions of all objects in Oracle VM Manager are lost. You need to manually rename each object in your environment.
Neste artigo estaremos abordando a migração (reinstalação do OVM Manager) em outro servidor utilizando um backup do Manager "antigo" que ainda está disponível. 

O objetivo desta migração é simplesmente disponibilizar o manager em uma nova estrutura

Conectado no OVM Manager (atual), verifique se o serviço do MySQL esta ativo e execute um novo backup da base de dados.


[root@ovmmanager ~]# service ovmm_mysql status
MySQL running (1956)                                       [  OK  ]
[root@ovmmanager ~]# /u01/app/oracle/ovm-manager-3/ovm_tools/bin/BackupDatabase -w
Enter your OVM Manager username: admin
Enter your OVM Manager password:

INFO:  Backup job starting with destination:
        /u01/app/oracle/mysql/dbbackup/ManualBackup-20191016_152756

        Job Id   = 'Start Backup to: ManualBackup(1571250476006) Uri: https://localhost:7002/ovm/core/wsapi/rest/Job/1571250476006'
        Job Name = 'Start Backup to: ManualBackup'

INFO:  Backup job finished

[root@ovmmanager ~]#

A opção de linha de comando -w server para forçar o script de backup a esperar até que a tarefa de backup seja concluída. Caso ela seja omitida, devemos posteriormente verificar o status do backup via interface Web do Manager ou via linha de comando pelo OVM CLI, conforme exemplo abaixo:

[root@ovmmanager ~]# ssh -l admin 172.16.100.13 -p 10000
admin@172.16.100.13's password:
OVM> getJobs startTime="10-16-2019 15:00:00" endTime="10-16-2019 16:00:00"
Command: getJobs startTime="10-16-2019 15:00:00" endTime="10-16-2019 16:00:00"
Status: Success
Time: 2019-10-16 15:53:05,985 BRT
Data:
  id:1571250476006  name:Start Backup to: ManualBackup
OVM> show job id=1571250476006
Command: show job id=1571250476006
Status: Success
Time: 2019-10-16 15:56:46,659 BRT
Data:
  Run State = Success
  Summary State = Success
  Done = Yes
  Summary Done = Yes
  Job Group = No
  Username = admin
  Creation Time = Oct 16, 2019 3:27:56 pm
  Start Time = Oct 16, 2019 3:27:56 pm
  End Time = Oct 16, 2019 3:33:42 pm
  Duration = 5m:46s
  Id = 1571250476006  [Start Backup to: ManualBackup]
  Name = Start Backup to: ManualBackup
  Description = Start Backup to: ManualBackup
  Locked = false
OVM>
OVM> exit
Connection to 172.16.100.13 closed.


É possivel realizar o backup diretamente via mysqlbackup mas é recomendado sempre utilizar a ferramenta para a execução do backup!

O local onde o backup foi gerado pode ser identificada na saída do próprio comando de backup:

INFO:  Backup job starting with destination:
        /u01/app/oracle/mysql/dbbackup/ManualBackup-20191016_152756

Ou verificado através do arquivo de configuração /etc/sysconfig/ovmm cuja variável DBBACKUP especifica onde os arquivos de backup serão gerados.


[root@ovmmanager ~]# cat /etc/sysconfig/ovmm
JVM_MEMORY_MAX=4096m
JVM_MAX_PERM=512m
RUN_OVMM=YES
DBBACKUP=/u01/app/oracle/mysql/dbbackup
DBBACKUP_CMD=/opt/mysql/meb-3.12/bin/mysqlbackup
UUID=0004fb0000010000af00a231cc0d7c3f
[root@ovmmanager ~]# cd /u01/app/oracle/mysql/dbbackup
[root@ovmmanager dbbackup]# ls -lrtd Manual*
drwx------ 4 oracle oinstall 4096 Oct 16 15:33 ManualBackup-20191016_152756

O backup da base MySQL também é executada automaticamente a cada 24 horas e seu arquivo gerado baixo do diretório configurado na variável DBBACKUP possuindo por padrão uma retenção de 21 dias que pode também ser ajustada via Interface Web do Manager.

Caso não seja possível executar um novo backup, podemos também utilizar os backups gerados automaticamente, como no caso do OVM Manager ter sido perdido, por exemplo, e uma cópia do backup automático estar disponível em algum outro local.

Parando os serviços do manager, CLI (Command Line Interface) e MySQL:

[root@ovmmanager dbbackup]# service ovmm stop
Stopping Oracle VM Manager                                 [  OK  ]
[root@ovmmanager dbbackup]# service ovmcli stop
Stopping Oracle VM Manager CLI                             [  OK  ]
[root@ovmmanager dbbackup]# service ovmm_mysql stop
Shutting down OVMM MySQL...                                [  OK  ]
[root@ovmmanager dbbackup]#

Desativando o Manager da inicialização:

[root@ovmmanager dbbackup]# chkconfig ovmm off

Para o OVM Manager ser instalado (migrado) para um novo servidor, um item importante que será preciso na nova instalação do produto é o UUID (Universally Unique IDentifier), que é um identificador único que relaciona o OVM Manager em cada OVM Server através do OVS-Agent.

Para resgatarmos o UUID no servidor do OVM manager:

[root@ovmmanager ~]# cat /u01/app/oracle/ovm-manager-3/.config | grep UUID
UUID=0004fb0000010000af00a231cc0d7c3f

ou

[root@ovmmanager ~]# cat /etc/sysconfig/ovmm | grep UUID
UUID=0004fb0000010000af00a231cc0d7c3f

Caso o OVM Manager esteja indisponível, podemos resgatar o UUID no OVM Server.

No OVM Server, o UUID da instância proprietária do OVM Manager é armazenado em um arquivo de banco de dados Berkeley DB no qual podemos despejar seu conteúdo através do seguinte comando executado com o usuário root no OVM Server:

[root@ovmsrv ~]# cd /etc/ovs-agent/db
[root@ovmsrv db]# ovs-agent-db dump_db server
{'cluster_state': 'Offline',
 'fs_stat_uuid_list': ['0004fb0000050000f9ac237aa6291f54'],
 'is_master': False,
 'manager_event_url': 'https://172.16.100.13:7002/ovm/core/wsapi/rest/internal/Server/4c:4c:45:44:00:54:57:10:80:4d:c7:c0:4f:53:4c:32/Event',
 'manager_ip': '172.16.100.13',
 'manager_statistic_url': 'https://172.16.100.13:7002/ovm/core/wsapi/rest/internal/Server/4c:4c:45:44:00:54:57:10:80:4d:c7:c0:4f:53:4c:32/Statistic',
 'manager_uuid': '0004fb0000010000af00a231cc0d7c3f',
 'node_number': -1,
 'pool_alias': 'serverpool01',
 'pool_master_ip': None,
 'pool_member_ip_list': None,
 'pool_uuid': '0004fb0000020000911e292b666408f9',
 'registered_hostname': 'ovmsrv.xxxxxxx.local',
 'registered_ip': '172.16.100.12',
 'roles': set(['utility', 'xen'])}

Com o backup e o UUID em mãos, vamos realizar a instalação do OVM Manager no novo servidor.

Quando estamos criando um novo ambiente é sempre importante verificarmos as documentações da Oracle relacionada ao produto e versão que estamos instalando para determinar as configurações minimas necessárias de hardware e software.

Para o OVM Manager 3.4 podemos verificar os requisitos através do Installation and Upgrade Guide acessível pelo link: 
https://docs.oracle.com/cd/E64076_01/E64078/html/vmiug-manager-requirements.html

Com o HW (Hardware) provisionado e com o sistema operacional instalado, devemos baixar a ISO do OVM Manager através do Oracle Software Delivery Cloud (edelivery.oracle.com)

Estando a ISO disponível no servidor vamos montá-la:

[root@ovmmanager media]# mkdir /mnt/iso
[root@ovmmanager media]# mount -o loop V952529-01.iso /mnt/iso/
mount: /media/V952529-01.iso is write-protected, mounting read-only
[root@ovmmanager media]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              83G  5.0G   74G   7% /
tmpfs                 1.8G     0  1.8G   0% /dev/shm
/media/V952529-01.iso
                      2.7G  2.7G     0 100% /mnt/iso

Seguindo os requisitos de software, vamos adicionar ao /etc/hosts o ip do servidor e o FQDN (Fully Qualified Domain Name)

[root@ovmmanager media]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.100.29 ovmmanager.xxxxxxx.local ovmmanager

Instalação dos pacotes necessários:

[root@ovmmanager media]# yum -y install libaio zip unzip bc perl iptables
Loaded plugins: security, ulninfo
Setting up Install Process
Package libaio-0.3.107-10.el6.x86_64 already installed and latest version
Package zip-3.0-1.el6_7.1.x86_64 already installed and latest version
Package unzip-6.0-5.el6.x86_64 already installed and latest version
Package bc-1.06.95-1.el6.x86_64 already installed and latest version
Package 4:perl-5.10.1-144.el6.x86_64 already installed and latest version
Package iptables-1.4.7-19.0.1.el6.x86_64 already installed and latest version
Nothing to do

Para Linux 7 o iptables deve ser substituído pela entrada iptables-services e os pacotes net-tools e perl-Data-Dumper adicionado ao conjunto de pacotes a serem instalados.

Dependendo da versão do sistema operacional que foi instalado também é comum existir bibliotecas do MariaDB instaladas. Caso ele existam, proceda com sua remoção bem como a remoção de qualquer banco MySQL presente no servidor, pois o OVM Manager requer o uso exclusivo do MySQL devido aos parâmetros específicos que se aplicam à sua configuração. 

Exemplo:

[root@ovmmanager iso]# rpm -qa | grep mariadb

[root@ovmmanager iso]# yum remove mariadb-libs


O Oracle VM Manager usa o MySQL Enterprise Edition em uma porta não padrão e o licenciamento do MySQL Enterprise Edition fornecido com o Oracle VM Manager concede uso exclusivo ao Oracle VM, desta forma não devemos usar o servidor MySQL fornecido para qualquer outra finalidade. 

Se uma instalação existente do MySQL estiver presente no sistema, o instalador sai com uma mensagem de erro informando que você deve removê-la antes de continuar com a instalação.

O próximo passo é executar o script createOracle.sh que será localizado abaixo do ponto de montagem da ISO do OVM Manager.

O script createOracle.sh será responsável por criar os grupos e usuários necessários, diretórios, ajustes de parâmetros e liberações de portas no firewall do sistema operacional.

[root@ovmmanager media]# cd /mnt/iso/
[root@ovmmanager iso]# ./createOracle.sh
Adding group 'oinstall' with gid '54321' ...
Adding group 'dba'
Adding user 'oracle' with user id '54321', initial login group 'dba', supplementary group 'oinstall' and  home directory '/home/oracle' ...
Changing ownership of '/home/oracle' to oracle:dba
Creating user 'oracle' succeeded ...
For security reasons, no default password was set for user 'oracle'. If you wish to login as the 'oracle' user, you will need to set a password for this account.
Verifying user 'oracle' OS prerequisites for Oracle VM Manager ...
oracle  soft    nofile          8192
oracle  hard    nofile          65536
oracle  soft    nproc           2048
oracle  hard    nproc           16384
oracle  soft    stack           10240
oracle  hard    stack           32768
oracle  soft    core            unlimited
oracle  hard    core            unlimited
Setting  user 'oracle' OS limits for Oracle VM Manager ...
Altered file /etc/security/limits.conf
Original file backed up at /etc/security/limits.conf.orabackup
Verifying & setting of user limits succeeded ...
Creating mountpoint '/u01' ...
Modifying iptables for OVM
Adding rules to enable access to:
     7002  : Oracle VM Manager https
       123 : NTP
     10000 : Oracle VM Manager CLI Tool
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]
Rules added.

Agora executaremos o runInstaller que irá proceder com a instalação do OVM Manager propriamente dita. Observe que devemos informar na chamada do shell script o UUID coletado anteriormente.

Caso os requisitos de Hardware não sejam satisfeitos, podemos utilizar a condição --noprereq para ignorá-los na verificação.

Durante a instalação algumas interações serão necessárias, proceda conforme a demonstração abaixo. Maiores detalhes de data etapa podem ser obtidas na mesma documentação do produto supracitada.

[root@ovmmanager iso]# ./runInstaller.sh --uuid 0004fb0000010000af00a231cc0d7c3f --noprereq

Oracle VM Manager Release 3.4.4 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2019-10-17-085754.log

Please select an installation type:
   1: Install
   2: Upgrade
   3: Uninstall
   4: Help

   Select Number (1-4): 1

Ignoring prerequisites check ...

Starting production with local database installation ...

One password is used for all users created and used during the installation.
Enter a password for all logins used during the installation:
Enter a password for all logins used during the installation (confirm):

Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com, (or IP address) of your management server for SSL certification generation 172.16.100.29 [ovmmanager.xxxxxxx.local]:  ovmmanager.xxxxxxx.local

Verifying configuration ...

Start installing Oracle VM Manager:
   1: Continue
   2: Abort

   Select Number (1-2): 1

Step 1 of 7 : Database Software ...
Installing Database Software...
Retrieving MySQL Database 5.6 ...
Unzipping MySQL RPM File ...
Installing MySQL 5.6 RPM package ...
Configuring MySQL Database 5.6 ...
Installing MySQL backup RPM package ...

Step 2 of 7 : Java ...
Installing Java ...

Step 3 of 7 : WebLogic and ADF ...
Retrieving Oracle WebLogic Server 12c and ADF ...
Installing Oracle WebLogic Server 12c and ADF ...
Applying patches to Weblogic ...
Applying patch to ADF ...

Step 4 of 7 : Oracle VM ...
Installing Oracle VM Manager Core ...
Retrieving Oracle VM Manager Application ...
Extracting Oracle VM Manager Application ...

Retrieving Oracle VM Manager Upgrade tool ...
Extracting Oracle VM Manager Upgrade tool ...
Installing Oracle VM Manager Upgrade tool ...

Retrieving Oracle VM Manager CLI tool ...
Extracting Oracle VM Manager CLI tool...
Installing Oracle VM Manager CLI tool ...
Installing Oracle VM Manager WLST Scripts ...

Step 5 of 7 : Domain creation ...
Creating domain ...

Step 6 of 7 : Oracle VM Tools ...

Retrieving Oracle VM Manager Shell & API ...
Extracting Oracle VM Manager Shell & API ...
Installing Oracle VM Manager Shell & API ...

Retrieving Oracle VM Manager Wsh tool ...
Extracting Oracle VM Manager Wsh tool ...
Installing Oracle VM Manager Wsh tool ...

Retrieving Oracle VM Manager Tools ...
Extracting Oracle VM Manager Tools ...
Installing Oracle VM Manager Tools ...

Retrieving ovmcore-console ...
Installing ovmcore-console RPM package ...
Copying Oracle VM Manager shell to '/usr/bin/ovm_shell.sh' ...
Installing ovm_admin.sh in '/u01/app/oracle/ovm-manager-3/bin' ...
Installing ovm_upgrade.sh in '/u01/app/oracle/ovm-manager-3/bin' ...

Step 7 of 7 : Start OVM Manager ...
Enabling Oracle VM Manager service ...
Shutting down Oracle VM Manager instance ...
Starting Oracle VM Manager instance ...

Please wait while WebLogic configures the applications...
Trying to connect to core via ovmwsh (attempt 1 of 20) ...
Trying to connect to core via ovm_shell (attempt 1 of 5)...
Oracle VM Manager installed.

Installation Summary
--------------------
Database configuration:
  Database type               : MySQL
  Database host name          : localhost
  Database name               : ovs
  Database listener port      : 49500
  Database user               : ovs

Weblogic Server configuration:
  Administration username     : weblogic

Oracle VM Manager configuration:
  Username                    : admin
  Core management port        : 54321
  UUID                        : 0004fb0000010000af00a231cc0d7c3f


Passwords:
There are no default passwords for any users. The passwords to use for Oracle VM Manager, Database, and Oracle WebLogic Server have been set by you during this installation. In the case of a default install, all passwords are the same.

Oracle VM Manager UI:
  https://ovmmanager.xxxxxxx.local:7002/ovm/console
Log in with the user 'admin', and the password you set during the installation.

For more information about Oracle Virtualization, please visit:
  http://www.oracle.com/virtualization/

Oracle VM Manager installation complete.

Please remove configuration file /tmp/ovm_configGSq1Wt.

[root@ovmmanager iso]# rm -f /tmp/ovm_configGSq1Wt

Concluída a instalação iremos proceder com o restore da base de dados MySQL utilizando o backup gerado anteriormente.

Para isto iremos parar os serviços do Manager, CLI e MySQL.

[root@ovmmanager iso]# /sbin/service ovmcli stop
Stopping Oracle VM Manager CLI                             [  OK  ]
[root@ovmmanager iso]# /sbin/service ovmm stop
Stopping Oracle VM Manager                                 [  OK  ]
[root@ovmmanager iso]# /sbin/service ovmm_mysql stop
Shutting down OVMM MySQL..                                 [  OK  ]

O local do backup sera puxado automaticamente através da variável DBBACKUP contida no arquivo /etc/sysconfig/ovmm, desta forma, proceda com a copia do backup para este diretório.

[root@ovmmanager iso]# cat /etc/sysconfig/ovmm
JVM_MEMORY_MAX=4096m
JVM_MAX_PERM=512m
RUN_OVMM=YES
DBBACKUP=/u01/app/oracle/mysql/dbbackup
DBBACKUP_CMD=/opt/mysql/meb-3.12/bin/mysqlbackup
UUID=0004fb0000010000af00a231cc0d7c3f

Como ainda estou com o antigo servidor do OVM Manager ligado (com os serviços parados), irei proceder com a cópia do backup a partir dele para o novo servidor do OVM Manager:

[root@ovmmanager dbbackup]# scp -rp ManualBackup-20191016_152756 172.16.100.29:/u01/app/oracle/mysql/dbbackup
root@172.16.100.29's password:
ovmca.jks                                                                                                                             100% 2361     2.3KB/s   00:00
ovmclient.jks                                                                                                                         100% 4332     4.2KB/s   00:00
backup-my.cnf                                                                                                                         100%  242     0.2KB/s   00:00
my.cnf                                                                                                                                100% 1244     1.2KB/s   00:00
ovmtrust.jks                                                                                                                          100% 1088     1.1KB/s   00:00
ovmclientssl.key                                                                                                                      100% 2289     2.2KB/s   00:00
version.txt                                                                                                                           100%   32     0.0KB/s   00:00
cwallet.sso                                                                                                                           100% 5613     5.5KB/s   00:00
OVMManagerDB.mbi                                                                                                                      100%   13GB  97.6MB/s   02:18
ovmca.pem                                                                                                                             100% 1593     1.6KB/s   00:00
ovmssl.jks                                                                                                                            100% 2379     2.3KB/s   00:00
restoreCertificates.sh                                                                                                                100% 1102     1.1KB/s   00:00
backup_variables.txt                                                                                                                  100%  271     0.3KB/s   00:00
MEB_2019-10-16.15-27-56_image_backup.log                                                                                              100%   34KB  34.1KB/s   00:00
backup_content.xml                                                                                                                    100%  192KB 192.4KB/s   00:00
backup_create.xml                                                                                                                     100% 6010     5.9KB/s   00:00
image_files.xml                                                                                                                       100%   78KB  78.2KB/s   00:00
AutoBackup.log                                                                                                                        100%   34KB  34.2KB/s   00:00

Ajustado a permissão do diretório e arquivos para o usuário oracle e grupo install:

[root@ovmmanager iso]# chown -R oracle:oinstall  /u01/app/oracle/mysql/dbbackup/

Realizando o restore da base de dados MySQL.

O script ira solicitar a confirmação de remoção dos arquivos da base MySQL recém instalada para poder proceder com o restore dos arquivos através do backup, confirme a remoção para dar sequencia ao processo.

IMPORTANTE:

O script RestoreDatabase irá executar uma verificação da versão para garantir que a versão do banco de dados corresponda a versão do banco de dados a partir da qual o backup foi criado. Se houver uma incompatibilidade de versão, o script sera encerrado com um aviso, pois essa ação poderia inutilizar o Oracle VM Manager.

É possível suprimir esta verificação de versão usando a opção --skipversionchecks ao chamar o script, contudo ela  deve ser usada com cuidado, pois as incompatibilidades de versão podem ter consequências indesejáveis para o Oracle VM Manager.

Por exemplo, os backups do banco de dados de uma versão 3.4.x anterior não podem ser usados em uma implantação do Oracle VM Manager na versão 3.4.5 ou posterior, devido a alterações no esquema do banco de dados.

[oracle@ovmmanager ~]$ /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh ManualBackup-20191016_152756

Before the database can be restored, the following database directories/files must be deleted:
appfw ibdata1 ib_logfile0 ib_logfile1 mysql ovs performance_schema

Are you sure it is safe to delete these directories/files now? [y,n] y
Deleting /u01/app/oracle/mysql/data/appfw
Deleting /u01/app/oracle/mysql/data/ibdata1
Deleting /u01/app/oracle/mysql/data/ib_logfile0
Deleting /u01/app/oracle/mysql/data/ib_logfile1
Deleting /u01/app/oracle/mysql/data/mysql
Deleting /u01/app/oracle/mysql/data/ovs
Deleting /u01/app/oracle/mysql/data/performance_schema
INFO: Expanding the backup image...
INFO: Applying logs to the backup snapshot...
INFO: Restoring the backup...
INFO: Restoring OVM keystores and certificates
INFO: Success - Done!
INFO: Log of operations performed is available at: /u01/app/oracle/mysql/dbbackup/ManualBackup-20191016_152756/Restore.log


IMPORTANT:

      As 'root', please start the OVM Manager database and application using:
            service ovmm_mysql start; service ovmm start; service ovmcli start


[oracle@ovmmanager ~]$

A partir deste ponto, a antiga máquina do OVM Manager foi desligada e o IP da nova máquina ajustado de 172.16.100.29 para 172.16.100.13 (IP da antiga máquina do OVM Manager)

  • Ajuste o IP da maquina em /etc/hosts e /etc/sysconfig/network-scripts/ifcfg-xxxxx e reinicie a interface de rede.

[root@ovmmanager iso]# service network restart

Suba todos os serviços parados anteriormente:

[root@ovmmanager iso]$ /sbin/service ovmm_mysql start
Starting OVMM MySQL..                                      [  OK  ]
[root@ovmmanager iso]# /sbin/service ovmm start
Starting Oracle VM Manager                                 [  OK  ]
[root@ovmmanager iso]# /sbin/service ovmcli start
Starting Oracle VM Manager CLI                             [  OK  ]

Como tivemos os certificados necessários para autenticar vários componentes do OVM Manager, como a Interface web e a interface de linha de comando regenerados durante a nova instalação e seus mapeamentos substituídos através da restauração do banco de dados, é necessário reconfigurar os certificados novamente para autenticar esses componentes.

[root@ovmmanager iso]# export MW_HOME=/u01/app/oracle/Middleware
[root@ovmmanager iso]# /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh setupWebLogic
Oct 17, 2019 9:43:19 AM oracle.security.jps.JpsStartup start
INFO: Jps initializing.
Oct 17, 2019 9:43:21 AM oracle.security.jps.JpsStartup start
INFO: Jps started.
Updating keystore information in WebLogic
Oracle MiddleWare Home (MW_HOME): [/u01/app/oracle/Middleware]
WebLogic domain directory: [/u01/app/oracle/ovm-manager-3/domains/ovm_domain]
WebLogic server name: [AdminServer]
WebLogic username: [weblogic]
WebLogic password: [********]
WLST session logged at: /tmp/wlst-session8949973622157455843.log

Reinicie o Oracle VM Manager e execute o script de configuração do certificado do cliente, da seguinte maneira:

[root@ovmmanager iso]# /sbin/service ovmm restart
Stopping Oracle VM Manager                                 [  OK  ]
Starting Oracle VM Manager                                 [  OK  ]

[root@ovmmanager ~]# /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

2019-10-17 10:14:25,928 [main] INFO  ovm.wlst.commands - Connecting using URL t3://localhost:7001

2019-10-17 10:14:31,655 [main] INFO  ovm.wlst.commands - Undeploying ovm_console
Undeploying application ovm_console ...
    
.Completed the undeployment of Application with status completed
Current Status of your Deployment:
Deployment command type: undeploy
Deployment State : completed
Deployment Message : no message
2019-10-17 10:14:42,980 [main] INFO  ovm.wlst.commands - Undeploying ovm_core
Undeploying application ovm_core ...
    
......Completed the undeployment of Application with status completed
Current Status of your Deployment:
Deployment command type: undeploy
Deployment State : completed
Deployment Message : no message
2019-10-17 10:15:01,518 [main] INFO  ovm.wlst.domainbuilder.Domain - Stopping AdminServer...
Stopping Weblogic Server...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "ovm_domain".

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Shutting down the server AdminServer with force=false while connected to AdminServer ...
Disconnected from weblogic server: AdminServer


Exiting WebLogic Scripting Tool.

Done
Stopping Derby Server...
Derby server stopped.
2019-10-17 10:15:58,807 [main] INFO  ovm.wlst.domainbuilder.Domain - Starting AdminServer...
2019-10-17 10:15:58,812 [main] INFO  ovm.wlst.domainbuilder.Domain - Trying to connect to t3://localhost:7001...
2019-10-17 10:16:10,682 [main] INFO  ovm.wlst.domainbuilder.Domain - Trying to connect to t3://localhost:7001...
2019-10-17 10:16:21,854 [main] INFO  ovm.wlst.domainbuilder.Domain - Trying to connect to t3://localhost:7001...
2019-10-17 10:16:33,208 [main] INFO  ovm.wlst.domainbuilder.Domain - Trying to connect to t3://localhost:7001...
2019-10-17 10:16:44,514 [main] INFO  ovm.wlst.domainbuilder.Domain - Trying to connect to t3://localhost:7001...

2019-10-17 10:16:46,118 [main] INFO  ovm.wlst.domainbuilder.Domain - Connected.
2019-10-17 10:16:46,161 [main] INFO  ovm.wlst.domainbuilder.Domain - AdminServer state is RUNNING
2019-10-17 10:16:46,163 [main] INFO  ovm.wlst.commands - Deploying ovm_core
Deploying application from /u01/app/oracle/ovm-manager-3/ovm_wlst/deploy/ovm_core/app/ovm_core_3.4.4.1709.ear to targets AdminServer (upload=false) ...
    
....Completed the deployment of Application with status completed
Current Status of your Deployment:
Deployment command type: deploy
Deployment State : completed
Deployment Message : no message
Already in Domain Config Tree


Already in Domain Config Tree


2019-10-17 10:17:00,049 [main] INFO  ovm.wlst.domainbuilder.Domain - Created a user named appframework
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/u01/app/oracle/ovm-manager-3/ovm_cli/lib/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/u01/app/oracle/Middleware/wlserver/modules/features/weblogic.server.merged.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Oct 17, 2019 10:17:01 AM oracle.security.jps.JpsStartup start
INFO: Jps initializing.
Oct 17, 2019 10:17:04 AM oracle.security.jps.JpsStartup start
INFO: Jps started.
2019-10-17 10:17:17,142 [main] INFO  com.oracle.appfw.ovm.ws.client.KeytoolHelper - Writing cacert.pem
2019-10-17 10:17:17,144 [main] INFO  com.oracle.appfw.ovm.ws.client.KeytoolHelper - Importing cacert.pem with alias ovmca
2019-10-17 10:17:17,763 [main] INFO  com.oracle.appfw.ovm.ws.client.KeytoolHelper - Generating key pair for appframework in /u01/app/oracle/ovm-manager-3/domains/ovm_domain/security/ovmclient.jks
2019-10-17 10:17:18,708 [main] INFO  com.oracle.appfw.ovm.ws.client.KeytoolHelper - Exporting clientcert.pem from /u01/app/oracle/ovm-manager-3/domains/ovm_domain/security/ovmclient.jks
2019-10-17 10:17:18,977 [main] INFO  com.oracle.appfw.ovm.ws.client.KeytoolHelper - Reading clientcert.pem
2019-10-17 10:17:18,978 [main] INFO  com.oracle.appfw.ovm.ws.client.SSLClientUtil - Signing certificate
2019-10-17 10:17:19,087 [main] INFO  com.oracle.appfw.ovm.ws.client.KeytoolHelper - Writing clientcert.pem
2019-10-17 10:17:19,087 [main] INFO  com.oracle.appfw.ovm.ws.client.KeytoolHelper - Importing clientcert.pem with alias appframework
2019-10-17 10:17:20,028 [main] INFO  com.oracle.appfw.ovm.ws.client.SSLClientUtil - Deleting cacert.pem
2019-10-17 10:17:20,029 [main] INFO  com.oracle.appfw.ovm.ws.client.SSLClientUtil - Deleting clientcert.pem
2019-10-17 10:17:20,059 [main] INFO  ovm.wlst.commands - Deploying ovm_console
Deploying application from /u01/app/oracle/ovm-manager-3/ovm_wlst/deploy/ovm_console/app/ovm_console_3.4.4.1709.ear to targets AdminServer (upload=false) ...
    
................Completed the deployment of Application with status completed
Current Status of your Deployment:
Deployment command type: deploy
Deployment State : completed
Deployment Message : no message
    

Client certificate login configuration complete

[root@ovmmanager ~]#

Reiniciei o serviço do OVM Manager:

[root@ovmmanager ~]# /sbin/service ovmm restart
Stopping Oracle VM Manager                                 [  OK  ]
Starting Oracle VM Manager                                 [  OK  ]
[root@ovmmanager ~]#

Como último passo, conecte na console do OVM Manager e realize o refresh do server pool:


Ambiente migrado e serviços disponíveis.



Postagem mais recente Postagem mais antiga Página inicial

0 comentários:

Postar um comentário

Translate

# Suporte

# ACE Program

#Oracle

#Oracle
Disclaimer: The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

#Blog reconhecido

#ARTICULISTA

Marcadores

Postagens populares