Environment Setup
Setup the airgapped harvester
- Fetch ipxe vagrant example with new offline feature https://github.com/harvester/ipxe-examples/pull/32
- Edit the setting.xml file
- Set offline:
true
- Use ipxe vagrant example to setup a 3 nodes cluster https://github.com/harvester/ipxe-examples/tree/main/vagrant-pxe-harvester
- Enable vlan on
harvester-mgmt
- Now harvester dashboard page will out of work
- Open Settings, edit
http-proxy
with the following values
HTTP_PROXY=http://proxy-host:port
HTTPS_PROXY=http://proxy-host:port
NO_PROXY=localhost,127.0.0.1,0.0.0.0,10.0.0.0/8,192.168.0.0/16,cattle-system.svc,.svc,.cluster.local,<internal domain>
- Create ubuntu cloud image from URL
- Create virtual machine with name
vlan1
and id:1
- Create virtual machine and assign vlan network, confirm can get ip address
Setup squid HTTP proxy server
- Move to vagrant pxe harvester folder
- Execute
vagrant ssh pxe_server
- Run
apt-get install squid
- Edit
/etc/squid/squid.conf
and add line
http_access allow all
http_port 3128
- Run
systemctl restart squid
Setup the online rancher
- Create an ubuntu virtual machine on localhost machine
- Assign virtual network with internet connection to ubuntu host VM
- Run
curl -fsSL https://get.docker.com | bash
to install docker - Run rancher container by command:
$ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher:v2.6-head
- Login rancher and set access url
Test steps
- Access Rancher dashboard
- Navigate to Virtualization Management page
- Import existing harvester
- copy the registration URL
- Access Harvester
- Input registration URL
- Create cloud credential
- Provision a RKE1 cluster to harvester
- Provision a RKE1 cluster to harvester
Expected Results
- Can import harvester from Rancher correctly
- Can access downstream harvester cluster from Rancher dashboard
- Can provision at least one node RKE2 cluster to harvester correctly with running status
- Can explore provisioned RKE2 cluster nodes
- RKE2 cluster VM created running correctly on harvester node