Yucca Gateway setup
Starting Yucca Gateway
Yucca Gateway is started using the same Yucca binary, Enterprise version; be sure to specify a separate directory in data-dir.
When installed via the deb/rpm package manager, the yucca-gateway service is already installed on the system, and you just need to start it
sudo systemctl status yucca-gateway.service
sudo systemctl enable yucca-gateway.service
sudo systemctl start yucca-gateway.service
sudo systemctl status yucca-gateway.service
If you installed Yucca a different way, you can start Gateway like this:
/opt/yucca/yucca gateway --data-dir /opt/yucca/data
By default, Yucca Gateway listens on port 9920, but you can override this behavior. You can see the full list of options in the help output /opt/yucca/yucca gateway --help
Getting a token
To connect Yucca Gateway to Yucca Server, it will need an administrator token from the target server. A personal token can be issued in the user profile, in the tokens section.
Connecting Yucca Gateway to Yucca Server
For everything to work correctly, you need to ensure network connectivity between Yucca Gateway and all Yucca Servers.
First, install curl if you don't already have it.
sudo apt update && sudo apt install curl -y
All the following steps can be performed from any host, as long as there's network connectivity.
Example command to connect:
curl -s -d '{"address": "http://localhost:9910", "token": "p.f22003974f22e41a2c48dc58ac25c24f412bff151"}' http://127.0.0.1:9920/v1/system/gateway/server
address- this is the address of the Yucca Server that Yucca Gateway will use to reach it.token- the token we obtained earlier.http://127.0.0.1:9920/v1/system/gateway/server- the Yucca Gateway address we're sending the request to.
Example of a correct response:
{
"active": true,
"address": "http://localhost:9910",
"healthy": true,
"id": 0,
"name": "",
"verified": true
}
This is how you can add several Yucca Server nodes.
All done!
Now, when authorizing via Yucca Gateway at http://127.0.0.1:9920, we'll end up on the Yucca Server where a user with the credentials we're authorizing with exists.