Skip to main content

XOA to XPA Connection

VKB-1086How-to
📦 Applies to
XO ProxyXen Orchestra
🗓️ Created
2024-03-14
🔄 Updated
2024-03-14

Environment​

  • An XOA to convert into an XO Proxy Appliance (XPA), plus the main XOA it will be connected to.
  • The appliance must be registered. If not, ask the user to register the appliance (or copy /var/lib/xoa-updater/registration.json from a registered appliance).
  • An authentication token (ask @julien-f to generate one).

Procedure​

Converting XOA to XO Proxy Appliance​

Create a user xoa-support and the password, check if the appliance is registered, then run:

root@xoa
# xoa-updater --configure-channel=xo-proxy-appliance
# xoa-updater --upgrade   # as many times as necessary
# sudo systemctl disable --now redis-server.service xo-server.service

Connecting XOA to XPA​

Generate a token (ask @julien-f).

On the XPA:

root@dom0
# sudo -s
# cd /root/.config
# mkdir xo-proxy
# cd xo-proxy
# touch config.z-auto.json

Add the token in /root/.config/xo-proxy/config.z-auto.json. Content:

{"authenticationToken": "<token>"}

Then:

root@dom0
# systemctl restart xo-proxy.service

Get the VM UUID:

root@dom0
# xenstore-read vm

On the XOA:

root@xoa
# sudo -s
# xo-server-recover-account xoa-support
# npm install --global xo-cli
# xo-cli --register http://localhost xoa-support

Two ways to register the proxy are possible:

root@xoa
# xo-cli proxy.register authenticationToken=<token> vm=<UUID>
root@xoa
# xo-cli proxy.register authenticationToken=<token> address=<IP address>

Verification​

Test the connection:

root@xoa
# curl -k https://10.109.197.38/api/v1
# xo-cli proxy.checkHealth id=<proxy id>