Upgrade vSphere Integrated Containers
VMware ha presentado nuevas versiones tanto de vSphere Integrated Containers (VIC) como de Pivotal Container Service (PKS). En este caso, VIC se encuentra en la versión 1.5.0 y PKS en la 1.3.
Como yo ya tengo en mi laboratorio instalado VMware VIC en la versión 1.4.4, quiero mostraros el procedimiento para hacer una actualización de la infraestructura. En este caso necesitaremos actualizar tanto el Appliance, como los VCH, el plugin y los Containers.
Antes de nada, vamos a ver qué novedades trae VIC en sus nueva versión.
Novedades VMware vSphere Integrated Containers 1.5 (VIC)
Entre las novedades nos encontramos con:
- Por fin encontramos compatibilidad para el uso de los conmutadores lógicos de nuestros NSX-T para todas las redes de los VCH
- Da la posibilidad de utilizar un Kernel alternativo de linux para nuestros Containers
- Todos los componentes de vSphere Integrated Containers han sido actualizados a Photon OS 2.0
- Nos da la opción de gestionar cuánto almacenamiento utilizará cada VCH
- Al implementar VIC podremos añadir un servidor NTP
- Nuevos requisitos para ingresar la contraseña de root durante la inicialización, reinicialización y actualización del dispositivo
- Se añade COMPOSE_TLS_VERSION al generar un VCH
- Y se han corregido diferentes bugs de seguridad
Actualización de VMware VIC
Antes de empezar, este procedimiento no debería dejar sin conexión a los VCH y los Containers si hemos implementado bien la red.
Lo primero es bajar el OVA de la nueva versión y cargarlo. No detallo el proceso porque no tiene mucho misterio. Lo único que no tenga la misma IP del anterior:
Para actualizar nuestro VMware VIC tendremos que acceder vía SSH al Appliance creado:
Abrimos una consola:
1 |
ssh root@192.168.2.185 |
Utilizamos la contraseña de root:
1 2 3 4 5 6 7 8 |
Last login: Sun Jan 13 21:08:55 2019 from 192.168.2.208 ########################################################################## ## SSH access to the vSphere Integrated Containers Appliance can be ## ## used in exceptional cases that cannot be handled through standard ## ## remote management or CLI tools. This is primarily intended for use ## ## in break-fix scenarios, under the guidance of VMware GSS. ## ########################################################################## root@Photon [ ~ ]# |
Una vez conectados, nos desplazamos al directorio y lanzamos el comando. Destroy es sólo por eliminar lo antiguo:
1 2 |
root@Photon [ ~ ]# cd /etc/vmware/upgrade root@Photon [ /etc/vmware/upgrade ]# ./upgrade.sh --destroy |
Por no agrandar la entrada innecesariamente podéis ver las respuestas en el texto:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
------------------------------- VIC Appliance Upgrade to v1.4.4 ------------------------------- 2019-01-20 19:18:16 [=] Values containing $ (dollar sign), ` (backquote), \' (single quote), " (double quote), and \ (backslash) will not be substituted properly. 2019-01-20 19:18:16 [=] Change any input (passwords) containing these values before running this script. Enter vCenter Server FQDN or IP: 192.168.2.54 Enter vCenter Administrator Username: administrator@negu.local Enter vCenter Administrator Password: If using an external PSC, enter the FQDN of the PSC instance (leave blank otherwise): If using an external PSC, enter the PSC Admin Domain (leave blank otherwise): Please verify the vCenter IP and TLS fingerprint: 192.168.2.54 06:B0:02:AC:00:52:23:E7:04:05:B3:AF:97:1C:14:48:C3:74:8C:7C Is the fingerprint correct? (y/n): y Enter vCenter Datacenter of the old VIC appliance: ELBLOGDENEGU Enter old VIC appliance IP: 192.168.2.160 Enter old VIC appliance username: root Upgrade VIC UI Plugin? (y/n): y 2019-01-20 19:18:22 [=] ------------------------- Starting upgrade 2019-01-20 19:18:16 +0000 UTC 2019-01-20 19:18:23 [=] Please enter the VIC appliance password for root@192.168.2.160 The authenticity of host '192.168.2.160 (192.168.2.160)' can't be established. ECDSA key fingerprint is SHA256:1ulNTNFkhBY5/EyPrgMYvZM6EYDZh5rIfPu0X0ipxlg. Are you sure you want to continue connecting (yes/no)? Password: 2019-01-20 19:18:34 [=] ------------------------- Starting upgrade 2019-01-20 19:18:34 +0000 UTC 2019-01-20 19:19:30 [=] Please enter the VIC appliance password for root@192.168.2.160 Password: 2018-08-16 19:19:36 [=] 2018-08-16 19:19:36 [=] Detected old appliance's version as v1.4.4. 2018-08-16 19:19:36 [=] If the old appliance's version is not detected correctly, please enter "n" to abort the upgrade and contact VMware support. 2018-08-16 19:19:36 [=] 2018-08-16 19:19:36 [=] Do you wish to proceed with upgrade? [y/n] y 2018-08-16 19:19:43 [=] Continuing with upgrade 2018-08-16 19:19:43 [=] 2018-08-16 19:19:45 [=] Waiting for old VIC appliance to power off 2018-08-16 19:22:00 [=] Waiting for old VIC appliance to power off 2018-08-16 19:22:18 [=] Migrating old disks to new VIC appliance... 2018-08-16 19:22:19 [=] Copying old data disk. Please wait. 2018-08-16 19:22:25 [=] Copying old database disk. Please wait. 2018-08-16 19:22:32 [=] Copying old log disk. Please wait. 2018-08-16 19:22:41 [=] Finished attaching migrated disks to new VIC appliance 2018-08-16 19:22:41 [=] Preparing upgrade environment 2018-08-16 19:22:41 [=] Disabling and stopping Admiral and Harbor 2018-08-16 19:22:41 [=] Waiting for register appliance... 2018-08-16 19:22:51 [=] Waiting for register appliance... 2018-08-16 19:23:01 [=] Waiting for register appliance... 2018-08-16 19:23:40 [=] Finished preparing upgrade environment 2018-08-16 19:23:40 [=] ------------------------- Starting Admiral Upgrade 2018-08-16 19:23:40 +0000 UTC 2018-08-16 19:23:40 [=] Performing pre-upgrade checks 2018-08-16 19:23:40 [=] Starting Admiral upgrade 2018-08-16 19:24:28 [=] Updating Admiral configuration 2018-08-16 19:24:28 [=] Restarting Admiral 2018-08-16 19:25:17 [=] ------------------------- Starting Harbor Upgrade 2018-08-16 19:25:17 +0000 UTC 2018-08-16 19:25:17 [=] Performing pre-upgrade checks 2018-08-16 19:25:17 [=] Starting Harbor upgrade 2018-08-16 19:25:17 [=] [=] Shutting down Harbor 2018-08-16 19:25:17 [=] [=] Migrating Harbor configuration and data 2018-08-16 19:25:17 [=] Testing database credentials... 2018-08-16 19:25:18 [=] Backing up harbor config... 2018-08-16 19:25:23 [=] [=] Successfully migrated Harbor configuration and data 2018-08-16 19:25:23 [=] Harbor upgrade complete 2018-08-16 19:25:23 [=] Starting Harbor 2018-08-16 19:25:33 [=] Enabling and starting Admiral and Harbor 2018-08-16 19:25:33 [=] 2018-08-16 19:25:33 [=] ------------------------- 2018-08-16 19:25:33 [=] Upgrade completed successfully. Exiting. All vSphere Client users must log out and log back in again twice to see the vSphere Integrated Containers plug-in. 2018-08-16 19:25:33 [=] ------------------------- |
Si no ponéis destroy se quedará el antiguo apagado y tendréis que eliminarlo a mano:
Ya se habrán migrado todos los proyectos, VCH y Containers.
También hay que entrar a vuestro vCenter y reiniciar el plugin, para que sea efectivo el upgrade del propio plugin:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
MacBook-Pro-de-Raul:~ raulunzue$ ssh root@192.168.2.54 VMware vCenter Server Appliance 6.7.0.20100 Type: vCenter Server with an embedded Platform Services Controller root@192.168.2.54's password: Connected to service * List APIs: "help api list" * List Plugins: "help pi list" * Launch BASH: "shell" Command> shell Shell access is granted to root root@photon-machine [ ~ ]# service-control --stop vsphere-ui && service-control --start vsphere-ui service-control --stop vsphere-ui && service-control --start vsphere-ui service-control --stop vsphere-client && service-control --start vsphere-client |
Os dejo todos los parámetros que le podéis pasar al comando Upgrade para automatizarlo mucho más:
1 2 3 4 5 6 7 8 9 10 11 |
./upgrade.sh --target 192.168.2.54 \ ### FQDN o IP del vCenter Server --username 'administrator@negu.local' \ ### Usuario con permisos --password '*********' \ ### Password --fingerprint '192.168.2.54 06:B0:02:A...' \ ### vCenter Server Fingerprint --dc ELBLOGDENEGU \ ### vSphere Nombre Datacenter --embedded-psc \ ### Platform Service Controller (--embedded-psc or --external-psc) --appliance-target 192.168.2.160 \ ### VIC Appliance IP antiguo --appliance-username root \ ### VIC Appliance usuario root --appliance-password ************* \ ### root user password --appliance-version v1.4.4 \ ### VIC Appliance version donde estamos --destroy ### Borrar VIC al terminar |
Al entrar en la consola veréis que los cambios se notan de la versión 1.4.4 a la 1.5.0
¿Te ha gustado la entrada SÍGUENOS EN TWITTER?
Te ha gustado la entrada SGUENOS EN TWITTER O INVITANOS A UN CAFE?