Configure hostname
Prerequisites
Modules
git checkout origin/osp-web-configuration .
Description
Note
The complete example can be checkout out with git checkout origin/example-set-hostname .
In this tutorial you will learn how to change the default hostname (stack-1.onsphere.local).
The hostname must be updated in all modules that use it, see the documentation for details.
Configuration structure
Steps
1. Create the stack.cfg file
Create the stack.cfg
file and set the host name accordingly.
Warning
Be sure to check for duplicated stack.cfg before creating another.
/root/configuration/stack.cfg
{
"moduleId": ["modules.configuration-dispatcher.main", "modules.web.web-1", "modules.keycloak.keycloak-1"],
"hostname": "example-stack-1.onsphere.local"
}
1. Deploy and test
If the hostname is not routed by your DNS, you can update the local configuration on Linux. This is done by adding the following line to /etc/hosts
[local-ip] stack-1.onsphere.local stack-1.onsphere.local