Jump to: navigation, search

Difference between revisions of "StarlingX/StarlingX Packet.com iPXE Installation"

m (Create an Instance in Packet.com)
m (Gregs Notes)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
 
== Install AIO Simplex into Packet.com via iPXE ==
 
== Install AIO Simplex into Packet.com via iPXE ==
  
Line 10: Line 11:
  
 
<pre>
 
<pre>
apt install apache -y
+
apt install apache2 -y
 
</pre>
 
</pre>
  
Download an ISO from the [http://mirror.starlingx.cengn.ca/mirror/starlingx/ CENGN StarlingX build archive].
+
Download an ISO from the [http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/outputs/iso/ CENGN StarlingX build archive].
 +
 
 +
<pre>
 +
wget http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/outputs/iso/bootimage.iso
 +
</pre>
  
 
Mount that ISO where it will be available to the webserver process.  
 
Mount that ISO where it will be available to the webserver process.  
Line 22: Line 27:
 
</pre>
 
</pre>
  
Create an iPXE configuration file that is available from the web server. Replace the "webserver_public_ip" with the webservers public IP address. The configuration below will install a AIO Simplex node via the kickstart file indicated in the kernel line. This configuration needs to be available on a public webserver, and would usually be installed on the same webserver as the ISO was mounted on.
+
Create an iPXE configuration file that is available from the web server. Replace the "webserver_public_ip" with the webserver's public IP address. The configuration below will install a AIO Simplex node via the kickstart file indicated in the kernel line. This configuration needs to be available on a public webserver, and would usually be installed on the same webserver as the ISO was mounted on.
  
NOTE: This is a configuration that is currently working, it may not be the perfect setup. Please feel free to make it better.
+
''NOTE: This is a configuration that is currently working, it may not be the perfect setup. Please feel free to make it better.''
  
 
<pre>
 
<pre>
 +
#!ipxe
 
set base-url http://<webserver_public_ip>/stx
 
set base-url http://<webserver_public_ip>/stx
 
kernel ${base-url}/vmlinuz console=ttyS1,115200n8 root=live:${base-url}/LiveOS/squashfs.img ip=dhcp ks=${base-url}/smallsystem_ks.cfg boot_device=sda rootfs_device=sda inst.text inst.repo=${base-url} security_profile=standard user_namespace.enable=1
 
kernel ${base-url}/vmlinuz console=ttyS1,115200n8 root=live:${base-url}/LiveOS/squashfs.img ip=dhcp ks=${base-url}/smallsystem_ks.cfg boot_device=sda rootfs_device=sda inst.text inst.repo=${base-url} security_profile=standard user_namespace.enable=1
Line 48: Line 54:
 
Use "Custom iPXE" for the operating system choice and point it to the iPXE configuration URL that was setup in the webserver configuration step.
 
Use "Custom iPXE" for the operating system choice and point it to the iPXE configuration URL that was setup in the webserver configuration step.
  
Then access the Packet.com instance via it's "Out of Band Console." Once the instance is available and you can connect to the out of band console you should be able to see the instance booting from the iPXE configuration.
+
[[File:Packet-custom-ipxe.jpg|frameless|Custom iPXE URL]]
 +
 
 +
Then access the Packet.com instance via its "Out of Band Console." Once the instance is available and you can connect to the out of band console you should be able to see the instance booting from the iPXE configuration.
  
 
Once the installation has completed the node will reboot and will not boot by PXE again unless requested. At this point it the public IP that is provided by Packet.com is available.on the first interface and is accessible from the Internet via SSH.
 
Once the installation has completed the node will reboot and will not boot by PXE again unless requested. At this point it the public IP that is provided by Packet.com is available.on the first interface and is accessible from the Internet via SSH.
  
''NOTE: STX does not initially currently understand Packet.com's layer 3 model. The private IP provided to the instance will not be placed automatically on bond0 interface like default packet.com deployments. Instead the first interface will have only the public IP.''
+
''NOTE: STX does not initially currently understand Packet.com's layer 3 model. The private IP provided to the instance will not be placed automatically on bond0 interface like default packet.com deployments. Instead the first interface will have only the public IP and there will be no bond0.''
  
 
=== Run config_controller ===
 
=== Run config_controller ===
Line 64: Line 72:
 
* For the c1.large.x86 it seems like config_controller will fail without using the nvme drive, perhaps related to size of the disks.
 
* For the c1.large.x86 it seems like config_controller will fail without using the nvme drive, perhaps related to size of the disks.
  
== Using Layer 2 VLANs in Packet.com ==
+
== Using Layer 2/VLANs in Packet.com ==
  
 
Packet, which by default is layer 3 only, also has the option to configure VLANs.
 
Packet, which by default is layer 3 only, also has the option to configure VLANs.
  
* While the documentation suggests they have some kind of "internet gateway" functionality, it does not seem like that is accessible yet. Instead one currently would have to setup another node as a hybrid node to act as a gateway.
+
TBD
* The CNCF appears to have some [https://github.com/cncf/cnf-testbed/blob/master/tools/packet_api/l2_packet_networking.rb code] around working with VLANS
+
 
 +
=== Notes ===
  
TBD
+
* While the documentation suggests that packet.com has some kind of "internet gateway" functionality when using layer 2, it does not seem like that is accessible yet. Instead one currently would have to setup another node with hybrid networking to act as a gateway if the deployment is full layer 2 and internet access is required.
 +
* The CNCF appears to have some [https://github.com/cncf/cnf-testbed/blob/master/tools/packet_api/l2_packet_networking.rb code] around automating with VLANS with packet.com.

Latest revision as of 19:54, 7 June 2019

Install AIO Simplex into Packet.com via iPXE

Packet.com is a baremetal public cloud, and they have donated some resources to the StarlingX project. The way that a custom operating system is installed into Packet.com is via iPXE. These instructions show a basic method for initial installation of a StarlingX ISO on Packet.com.

Configure a Web Server to serve ISO and iPXE Confguration

This assumes an Ubuntu 16.04 instance, but any Apache web server should do. It must be available publicly, ie. have a public IP address that is available from the Packet.com data center that the instance is being deployed to. (Typically this would be an instance that is running in the same Packet.com datacenter, but it doesn't have to be.)

Install Apache.

apt install apache2 -y

Download an ISO from the CENGN StarlingX build archive.

wget http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/outputs/iso/bootimage.iso

Mount that ISO where it will be available to the webserver process.

mkdir /var/www/html/stx
mount -o loop ~/bootimage.iso /var/www/html/stx

Create an iPXE configuration file that is available from the web server. Replace the "webserver_public_ip" with the webserver's public IP address. The configuration below will install a AIO Simplex node via the kickstart file indicated in the kernel line. This configuration needs to be available on a public webserver, and would usually be installed on the same webserver as the ISO was mounted on.

NOTE: This is a configuration that is currently working, it may not be the perfect setup. Please feel free to make it better.

#!ipxe
set base-url http://<webserver_public_ip>/stx
kernel ${base-url}/vmlinuz console=ttyS1,115200n8 root=live:${base-url}/LiveOS/squashfs.img ip=dhcp ks=${base-url}/smallsystem_ks.cfg boot_device=sda rootfs_device=sda inst.text inst.repo=${base-url} security_profile=standard user_namespace.enable=1
initrd ${base-url}/initrd.img
imgstat
boot

Using a Compute Type with nvme drives

Add the device name to the kernel line to the iPXE configuration file.

Example entry below:

rootfs_device=nvme0n1

Create an Instance in Packet.com

Use "Custom iPXE" for the operating system choice and point it to the iPXE configuration URL that was setup in the webserver configuration step.

Custom iPXE URL

Then access the Packet.com instance via its "Out of Band Console." Once the instance is available and you can connect to the out of band console you should be able to see the instance booting from the iPXE configuration.

Once the installation has completed the node will reboot and will not boot by PXE again unless requested. At this point it the public IP that is provided by Packet.com is available.on the first interface and is accessible from the Internet via SSH.

NOTE: STX does not initially currently understand Packet.com's layer 3 model. The private IP provided to the instance will not be placed automatically on bond0 interface like default packet.com deployments. Instead the first interface will have only the public IP and there will be no bond0.

Run config_controller

Installing the OS from the StarlingX ISO is only the first step of deploying STX. After the OS is installed, the next step is to run config_controller to setup the intial STX platform.

TBD

Notes

  • For the c1.large.x86 it seems like config_controller will fail without using the nvme drive, perhaps related to size of the disks.

Using Layer 2/VLANs in Packet.com

Packet, which by default is layer 3 only, also has the option to configure VLANs.

TBD

Notes

  • While the documentation suggests that packet.com has some kind of "internet gateway" functionality when using layer 2, it does not seem like that is accessible yet. Instead one currently would have to setup another node with hybrid networking to act as a gateway if the deployment is full layer 2 and internet access is required.
  • The CNCF appears to have some code around automating with VLANS with packet.com.