Open vmatekole opened 7 years ago
Hey @vmatekole, thanks for filing this issue. I'll bring this suggestion to the team and keep you updated.
You'd write a systemd unit which fetches private IPs and other metadata from the cloud provider (in this case Vultr). Write the data to a file and use it as an EnvironmentFile in units which depend on it.
With that said, dynamically fetching IPs for starting etcd is questionable. What's your real desire? Do you expect the machine's IP to change between reboots? Do you expect to be able to auto-scale etcd nodes? etcd will not tolerate automatic dynamic membership (i.e. how will the other etcd nodes know the IPs of its peers changed).
On bare-metal, the recommendation is to assign static IPs to etcd members. Use convenience DNS names or service records resolving to those IPs when configuring etcd. This allows you to migrate to different static IPs (say you're changing network allocations) later without changing membership or configuration, if needed.
On cloud providers (AWS), a stable DNS name is allocated for each etcd VM instance, which itself can change IPs over time.
You're in an interesting place using the bare-metal installer on a cloud provider, but the advise is the same - configure etcd with stable node identifiers that will not require reconfiguration over time.
Use of private IPs (the original title) is fine and supported already.
@dghubble Thanks for your response. My goal here is, one security by binding only to a private interface as opposed to all interfaces, and two having a configuration that can be easily reused by changing IP's in one place. Ideally, the installer would provide fields for this purpose. Being able to deploy a new cluster with minimal changes between the last one is beneficial and less error prone.
Feature Request
Support ability to deploy ETCD over private IP
Environment
OSX 10.11.6
What hardware/cloud provider/hypervisor is being used with Tectonic? Vultr
Desired Feature
Enter private IP's in Tectonic during ETCD configuration.
Other Information
In the meantime how can I do this myself using Ignition? How can I leverage the metadata service to inject private IP's in ignition config: Currently the controller template looks like this:
systemd: units:
storage: {{ if index . "pxe" }} disks:
{{ if index . "ssh_authorized_keys" }} passwd: users: