Skip to content

Add support for DNS and only create instances that do not exist #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

bluesmoon
Copy link

@bluesmoon bluesmoon commented Apr 17, 2025

This PR adds support for updating linode DNS with entries for the newly created kafka hosts.

It also checks that a host hasn't already been created before creating new hosts. This allows you to (for example), delete one linode from the cluster, and then run the playbooks to just recreate that one host.

Additionally, we now use rdns instead of IPs to ssh into the host. This is necessary because some corporate DNS systems (like at Akamai) require some hosts (like linode) to go through a proxy server that is allowed by their default firewall rules (see PR #8 for firewall support), and without this, the wait_for task would just timeout.

Note that this PR builds on #8 so it includes all commits from that PR as well.

We need linode-api4 5.29 to assign firewalls to newly created linodes.
We can assign a firewall to newly created linodes if the user sets a firewall_label in `vars`
Add the firewall_label variable to vars that allows setting a firewall when deploying linodes
Use the rdns name for the linode rather than the IP when doing ssh since this allows corporate DNS servers to reroute traffic through their own proxies.
@bluesmoon
Copy link
Author

Any chance of having this merged?

bluesmoon and others added 7 commits May 12, 2025 12:59
If a `domain_name` is configured in `vars`, then we should also add these hosts to DNS. Before adding, we will remove any stale records.
The hostname in `kafka_data` is used to generate self signed certificates. If we're using a FQDN name to connect to kafka, then the certificate needs to have this FQDN as well.
This commit checks which kafka instances have already been created before trying to create new ones. It will only create instances that do not already exist.
instance_list gets us information about all instances in a single call which is more efficient than looping through instance_info just to check if an instance has been created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant