Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

set nodes hostname during provisioning

avatar
Explorer

Good day,

is it possible to set a hostname on per-node basis during cluster creation.

For example may I use something like:

masters-1 {
count: 1

instance: ${instances.m5x} {
tags {
group: master-1
}
hostname: master-1.example.com
}
worker-1 {
count: 1

instance: ${instances.t2l} {
tags {
group: workers
}
hostname: worker-1.example.com
}
worker-2 {
count: 1

instance: ${instances.t2xl} {
tags {
group: workers
}
hostname: worker-2.example.com
}

 

I can not come up with a way to set up predefined hostnames for every node in director. In the past I've used terraform and chef for provisioning and it was obvious how to set hostname, create /etc/hosts file and etc.

 

1 ACCEPTED SOLUTION

avatar
Rising Star

Director doesn't have a built in way to specify hostnames like that. You may be able to achieve something like this through the use of bootstrapScripts which lets you run a script on the instance. Something to keep in mind, Director requires forward and reverse hostname resolutions in order to work correctly, so you will probably have to mess with DNS settings as well. This thread here may be of help.

View solution in original post

1 REPLY 1

avatar
Rising Star

Director doesn't have a built in way to specify hostnames like that. You may be able to achieve something like this through the use of bootstrapScripts which lets you run a script on the instance. Something to keep in mind, Director requires forward and reverse hostname resolutions in order to work correctly, so you will probably have to mess with DNS settings as well. This thread here may be of help.