Working with legacy applications in the clouds

Hi, I’m Maxime

  • Cloud Consultant
  • Public & Private cloud
    • OpenStack
    • Ceph
    • Kubernetes
    • DevOps

Slides

root314.com/presentations/osdfr2017

QR code

Agenda

  1. What’s a legacy app?
  2. Migrate
  3. Integrate
  4. Questions

What’s a legacy app?

  • Monolithic
  • Strong dependencies
  • Scale up


Examples

  • ERP / LOB
  • HA VMs
  • Physical appliance

Why?

  • Consolidate (efficiency)
  • API driven
  • Self-service
  • (A first step)

Migrate

Requirements

  • 1:1 migration
  • Test with snapshots
  • Downtime
  • Cinder, nova (KVM) and neutron (OVS)
  • Enough capacity: 2*disk space
  • Utility VM in OpenStack
    • qemu-utils: qemu-img
    • libguestfs-tools: guestfish, virt-v2v

Procedure

  • Create bootable cinder volume
  • Attach volume to utility VM
  • Export VM disk to utility VM
  • Convert to raw:
    • VM: qemu-img convert -O raw in.vmdk /dev/vdx
    • Metal: dd if=/dev/sdx | ssh UtilityVM "dd of=/dev/vdx"

Linux procedure

  • guestfish --rw --inspector --add /dev/vdx
    • Edit network config
  • uname -r

Windows procedure

  • Edit network config
    • guestfish --rw --inspector --add /dev/vdx
    • or virt-customize --add /dev/vdx --firstboot script.bat
  • VirtIO drivers
    • Put virtio-win.iso into /usr/share/virtio-win/
    • virt-v2v -i disk /dev/vdx -if raw --in-place

Boot it up

  • Detach volume
  • Volume transfer (optional)
  • Boot new instance from volume

Further

  • cloud-init
  • watchdog
  • HA
  • Automate

Integrate

Floating IP

  • Easy!

  • Security?
  • Performance?

Provider networks

  • Security!
  • Performance!

  • Setup?

Provider networks: What?

  • L2 connectivity
  • Specify interface & segment ID
  • Created by admin, used by tenants

=> Use legacy VLAN in OpenStack

Provider networks: How?

# from /etc/neutron/plugins/ml2/ml2_conf.ini
[ovs]
bridge_mappings=physnet1:br0,physnet2:eth2
VLAN_ID=1234
openstack network create vlan-$VLAN_ID \
  --provider-physical-network physnet2 \
  --provider-network-type vlan \
  --provider-segment $VLAN_ID
L2

provider network

L3

provider network

Migrate + Integrate L2

  • Same IPs
  • Security group
  • API etc…

If external gateway:

  • No floating IP
  • No cloud-init

Thanks!