Jump to: navigation, search

Difference between revisions of "StarlingX/Packet SIG"

(Installing the Sub Clouds ............................................................................)
(Installing the Sub Clouds ............................................................................)
Line 392: Line 392:
 
* Create an external network/subnet on that Flat Provider Network with the SC1 DATA Subnet.
 
* Create an external network/subnet on that Flat Provider Network with the SC1 DATA Subnet.
 
... and unlock controller-0. <br />
 
... and unlock controller-0. <br />
 +
<br />
 
<br />
 
<br />
 
<br />
 
<br />

Revision as of 19:29, 5 July 2019

Packet SIG

Packet.com is a baremetal public cloud, and they have donated some resources to the StarlingX project. The resources are available under the STX-PROJECT-01 project on Packet.com.


StarlingX Distributed Cloud on Packet.Com

As a demonstration of the OpenStack Edge Computing Group's Distributed Control Plane MVP Architecture, StarlingX Distributed Cloud has been deployed on Packet.com.

STX R1 : http://mirror.starlingx.cengn.ca/mirror/starlingx/release/2018.10/centos/2018.10.0/outputs/iso/

Horizon for Central Cloud: http://147.75.105.202
SSH to Central Cloud: ssh wrsroot@147.75.105.202


Packet.com Servers deployed

Packet-servers.png

Networking

Networking.png

Setting up the iPXE Boot Server ................................................................

The initial server of a StarlingX cloud, i.e. controller-0, must be installed via a PXE Boot Server. For packet.com, IPXE Booting will actually be used ... however the setup of the ipxe boot server is the same.

Get a small packet.com server (e.g. c1.small.x86) for the IPXE Boot Server. It should use packet.com L3 Networking and run ubuntu 16.04 on it .

Setup the PXE Boot Server as follows:

apt-get update
apt-install apache2 -y

wget http://mirror.starlingx.cengn.ca/mirror/starlingx/release/2018.10/centos/2018.10.0/outputs/iso/bootimage.iso

mkdir -p /media/iso
mount -o loop ./bootimage.iso  /media/iso
mount -o remount,exec,dev /media/iso

mkdir -p /export/pxeboot
cd /var/www/html
ln -s /export/pxeboot BIOS-Client

# for some reason have to remove pxeboot directory before running pxeboot_setup.sh
cd /export
rmdir pxeboot
cd
/media/iso/pxeboot_setup.sh -u http://<IPADDRESS-OF-IPXE-BOOT-SERVER>/BIOS-Client -t /export/pxeboot 


Get L2 VLANs and L3 Public IPs ..........................................................................

Get the following L2 VLANs for the project:

  • StarlingX MGMT Network (CC)
  • StarlingX OAM Network (CC)
  • StarlingX SC1 MGMT Network
  • StarlingX SC1 OAM Network
  • StarlingX SC1 DATA Network
  • StarlingX SC2 MGMT Network
  • StarlingX SC2 OAM Network
  • StarlingX SC2 DATA Network


Get the following L3 Public IPs for the project:

  • CC OAM Subnet - Public IPv4/29 subnet
  • SC1 DATA Subnet - Public IPv4/29 subnet
  • SC2 DATA Subnet - Public IPv4/29 subnet



Setting up the Router-Nat ................................................................

All of the packet.com servers running StarlingX software will use L2-only packet.com networking. A hybrid L3-Networking/L2-Networking server is required in order to route from the StarlingX L2 networks into the packet.com L3 networks and ultimately the public internet.

Get another packet.com server, that supports hybrid L3/L2 networking (e.g. c2.medium.x86) and run ubuntu 16.04 on it.

  • Add all the VLANs onto its L2 port
  • Add all Public IPv4 /29 subnets to this server (This will result in packet.com forwarding all packets to these subnets to this server.)


Setup the router-nat server as follows:

apt-get update
apt-get install vlan
sudo su -c 'echo "8021q" >> /etc/modules'
/sbin/reboot

vi /etc/network/interfaces

auto lo
iface lo inet loopback

# L3 Interface to INTERNET
auto bond0
iface bond0 inet static
    address 147.75.39.198
    netmask 255.255.255.252
    gateway 147.75.39.197
    bond-downdelay 200
    bond-miimon 100
    bond-mode 4
    bond-updelay 200
    bond-xmit_hash_policy layer3+4
    bond-lacp-rate 1
    bond-slaves enp1s0f0 
    dns-nameservers 147.75.207.207 147.75.207.208
iface bond0 inet6 static
    address 2604:1380:1:b800::1
    netmask 127
    gateway 2604:1380:1:b800::

auto bond0:0
iface bond0:0 inet static
    address 10.99.254.1
    netmask 255.255.255.254
    post-up route add -net 10.0.0.0/8 gw 10.99.254.0
    post-down route del -net 10.0.0.0/8 gw 10.99.254.0

auto enp1s0f0
iface enp1s0f0 inet manual
    bond-master bond0

# CC OAM Subnet
auto enp1s0f1
iface enp1s0f1 inet static
    address 147.75.105.201
    netmask 255.255.255.248
    network 147.75.105.200
    broadcast 147.75.105.207

# SC1 OAM Subnet
auto enp1s0f1.1092
iface enp1s0f1.1092 inet static
    address 11.11.11.1
    netmask 255.255.255.0
    network 11.11.11.0
    broadcast 11.11.11.255
    vlan-raw-device enp1s0f1

# SC2 OAM Subnet
auto enp1s0f1.1162
iface enp1s0f1.1162 inet static
    address 12.12.12.1
    netmask 255.255.255.0
    network 12.12.12.0
    broadcast 12.12.12.255
    vlan-raw-device enp1s0f1

# CC MGMT Subnet
auto enp1s0f1.1172
iface enp1s0f1.1172 inet static
    address 192.168.204.1
    netmask 255.255.255.0
    network 192.168.204.0
    broadcast 192.168.204.255
    mtu 1400
    vlan-raw-device enp1s0f1

# SC1 MGMT Subnet
auto enp1s0f1.1117
iface enp1s0f1.1117 inet static
    address 192.168.214.1
    netmask 255.255.255.0
    network 192.168.214.0
    broadcast 192.168.214.255
    mtu 1400
    vlan-raw-device enp1s0f1

# SC2 MGMT Subnet
auto enp1s0f1.1177
iface enp1s0f1.1177 inet static
    address 192.168.224.1
    netmask 255.255.255.0
    network 192.168.224.0
    broadcast 192.168.224.255
    mtu 1400
    vlan-raw-device enp1s0f1

# SC1 DATA Subnet
auto enp1s0f1.1145
iface enp1s0f1.1145 inet static
    address 147.75.105.193
    netmask 255.255.255.248
    network 147.75.105.192
    broadcast 147.75.105.199
    vlan-raw-device enp1s0f1

# SC2 DATA Subnet
auto enp1s0f1.1179
iface enp1s0f1.1179 inet static
    address 139.178.66.41
    netmask 255.255.255.248
    network 147.75.105.40
    broadcast 147.75.105.47
    vlan-raw-device enp1s0f1


Reboot server one more time and enable IP forwarding:

/sbin/reboot
...
sysctl -w net.ipv4.ip_forward=1



Installing the Central Cloud ........................................................................


SW Install of initial server (cc-controller-0):
In order to IPXE Install the StarlingX Load onto a packet.com server, it must have L3 connectivity.

Setup a new packet.com server for controller-0 (e.g. m1.xlarge.x86), initially with L3 connectivity and initially with an ubuntu 16.04 load.

After the server boots, 'REINSTALL' the packet.com server using 'Custom IPXE' and specifying the following ipxe.conf file:

#!ipxe
set base-url http://147.75.38.129/BIOS-Client
kernel ${base-url}/vmlinuz console=ttyS1,115200n8 root=live:${base-url}/LiveOS/squashfs.img ip=dhcp ks=${base-url}/pxeboot_controller.cfg boot_device=sda rootfs_device=sda inst.gpt inst.text inst.repo=${base-url} security_profile=standard user_namespace.enable=1 network ksdevice=bootif BOOTIF=01-${netX/mac}
initrd ${base-url}/initrd.img
imgstat
boot


NOTE: I setup a GitHub repo with ipxe.conf files for a StarlingX Standard configuration and a StarlingX All-In-One configuration: https://github.com/gwaines/ipxe-configs

Specify https://raw.githubusercontent.com/gwaines/ipxe-configs/master/ipxe-starlingx-standard-sda.conf as the URL for the ipxe.conf file for the Central Cloud.

The server will reboot a few times, run the StarlingX installer to install the StarlingX load on /dev/sda and then reboot a final time running the StarlingX load.

Change to L2-only Networking:
Switch the controller-0 packet.com server to L2-only networking now, and set:

  • port 1 = CC MGMT VLAN
  • port 2 = CC OAM VLAN


Bootstrap StarlingX Software:
Login to console with wrsroot/wrsroot ... system will force password change.

Cleanup remnants of L3 networking before running 'config_controller':

/sbin/ifdown <port1-dev>
vi /etc/resolv.conf    ## and delete all dns server entries


Bootstrap the StarlingX software by running 'config_controller':

sudo config_controller
...
# answer all the questions appropriately
# e.g. specify that this is a Distributed Cloud install of the Central Cloud (SystemController)
# e.g. specify the correct port/dev names for MGMT and OAM
# e.g. specify a unique (private) IP Subnet MGMT; for central cloud can use default 192.168.204.0/24
# e.g. use the CC OAM Public IPv4 subnet for the OAM Addresses
...

... wait for config_controller to complete.

Fix BIOS Boot Settings on server:

  • reboot server,
  • from console, F2 (or whatever) to enter Setup and change boot setting to boot disk first, and then network.


Configure and Unlock Controller-0
Refer to StarlingX documentation and

  • Configure Cinder Storage on LVM of controller-0 disk or partition,
  • Add LVM Storage Backend for Cinder,

... and unlock controller-0.

SW Install of second controller (cc-controller-1):
All subsequent nodes in StarlingX cluster are PXE BOOTED from controller-0.

Setup a new packet.com server for controller-1 (e.g. m1.xlarge.x86), initially with L3 connectivity and initially with an ubuntu 16.04 load.

Switch the controller-1 packet.com server to L2-only networking now, and set:

  • port 1 = CC MGMT VLAN
  • port 2 = CC OAM VLAN


And reboot from console, and use F# key to force a PXE BOOT.
Console should boot with message that it is waiting for configuration of server at controller.

On controller-0 console:

system host-update 2 personality=controller


controller-1 should now start to install software and then reboot into a locked/online state ... ready for provisioning.

Configure and Unlock Controller-1
Refer to StarlingX documentation and

  • Configure OAM Interface,
  • Configure Cinder Storage on LVM of controller-1 disk or partition,

... and unlock controller-1.




Installing the Sub Clouds ............................................................................


Configuring the Sub Clouds at the Central Cloud:

Configure the subcloud at the Central Cloud (SystemController):

dcmanager subcloud add --name=subcloud-1 \
 --description="subcloud-1 description" \
 --location="subcloud-1 location" \
 --management-subnet=192.168.214.0/24 \
 --management-start-ip=192.168.214.2 \
 --management-end-ip=192.168.214.50 \
 --management-gateway-ip=192.168.214.1 \
 --systemcontroller-gateway-ip=192.168.204.1

dcmanager subcloud generate-config subcloud-1 \
--management-interface-port=eno1 \
--management-interface-mtu=1400 \
--oam-subnet=11.11.11.0/24 \
--oam-gateway-ip=11.11.11.1 \
--oam-floating-ip=11.11.11.12 \
--oam-unit-0-ip=11.11.11.13 \
--oam-unit-1-ip=11.11.11.14 \
--oam-interface-port=eno2 \
--oam-interface-mtu=1500 \
--system-mode=simplex &> subcloud-1.ini


SW Install of initial server (sc1-controller-0):
In order to IPXE Install the StarlingX Load onto a packet.com server, it must have L3 connectivity.

Setup a new packet.com server for the All-In-One controller of the subcloud (e.g. m1.xlarge.x86), initially with L3 connectivity and initially with an ubuntu 16.04 load.

After the server boots, 'REINSTALL' the packet.com server using 'Custom IPXE' and specifying the following ipxe.conf file:

#!ipxe
set base-url http://147.75.38.129/BIOS-Client
kernel ${base-url}/vmlinuz console=ttyS1,115200n8 root=live:${base-url}/LiveOS/squashfs.img ip=dhcp ks=${base-url}/pxeboot_smallsystem.cfg boot_device=sda rootfs_device=sda inst.gpt inst.text inst.repo=${base-url} security_profile=standard user_namespace.enable=1 network ksdevice=bootif BOOTIF=01-${netX/mac}
initrd ${base-url}/initrd.img
imgstat
boot


NOTE: I setup a GitHub repo with ipxe.conf files for a StarlingX Standard configuration and a StarlingX All-In-One configuration: https://github.com/gwaines/ipxe-configs

Specify https://raw.githubusercontent.com/gwaines/ipxe-configs/master/ipxe-starlingx-aio-sda.conf as the URL for the ipxe.conf file for an AIO Subcloud.

The server will reboot a few times, run the StarlingX installer to install the StarlingX load on /dev/sda and then reboot a final time running the StarlingX load.

Change to L2-only Networking:
Switch the All-In-One controller packet.com server to L2-only networking now, and set:

  • port 1 = SC1 MGMT VLAN
  • port 2 = SC1 OAM VLAN
  • port 3 = SC1 DATA VLAN



Bootstrap StarlingX Software:
Login to console with wrsroot/wrsroot ... system will force password change.

Cleanup remnants of L3 networking before running 'config_controller':

/sbin/ifdown <port1-dev>
vi /etc/resolv.conf    ## and delete all dns server entries


Bootstrap the StarlingX software as a subcloud by running 'config_subcloud' and passing in the subcloud-1.ini file generated on the SystemController. ( You'll have to transfer the contents of that file to the subcloud all-in-one server.

sudo config_subcloud subcloud-1.ini

... wait for config_controller to complete.

Fix BIOS Boot Settings on server:

  • reboot server,
  • from console, F2 (or whatever) to enter Setup and change boot setting to boot disk first, and then network.



Configure and Unlock Controller-0
Refer to StarlingX documentation and

  • Configure Cinder Storage on LVM of controller-0 disk or partition,
  • Add LVM Storage Backend for Cinder,
  • Configure Flat Provider Network,
  • Configure Data Interface on port 3 and indicate that it is attached to Flat Provider Network,
  • Create an external network/subnet on that Flat Provider Network with the SC1 DATA Subnet.

... and unlock controller-0.



Problem Tracking


Problems Found with Packet.com:

  • Multi-cast Packets appear to be dropped by Packet.com switches
    • Results in StartingX Maintenance reporting a false alarm that it has lost connectivity with other nodes in the StarlingX Cloud. E.g. In Central Cloud, cc-controller-0 claims that it has a heartbeat audit failure with cc-controller-1.
    • WORKAROUND: Change maintenance's heartbeat failure behaviour to simply raise an alarm ... rather than declare the node as failed and reset the node.
system service-parameter-list
system service-parameter-modify platform maintenance heartbeat_failure_action=alarm
system service-parameter-apply platform
  • On some interfaces, packets between 1400 and 1500 bytes were dropped by packet.com switch, even though MTU of Interface was 1500 bytes.
    • WORKAROUND: set all MTUs to 1400 bytes


Problems Found with StarlingX R1.0:

  • config_subcloud would fail if prior to running the command on controller-0 of the subcloud, the mgmt interface was already configured and there were any unreachable DNS servers configured in /etc/resolv.conf
    • WORKAROUND: ifdown <mgmt-if-dev> and vi /etc/resolv.conf and remove all DNS Server entries
  • HORIZON subcloud 'managed' would fail with some error about JSON
    • WORKAROUND: Use CLI to set subcloud to managed