purpleclay / dns53 Goto Github PK
View Code? Open in Web Editor NEWDynamic DNS within Amazon Route53. Expose your EC2 quickly, easily and privately
Home Page: https://docs.purpleclay.dev/dns53/
License: MIT License
Dynamic DNS within Amazon Route53. Expose your EC2 quickly, easily and privately
Home Page: https://docs.purpleclay.dev/dns53/
License: MIT License
To improve the user experience. Run dns53
in full-screen mode within the terminal. Ensure to return the terminal back to its original state upon exit.
Bubbletea supports the concept of full-screen mode (or alt-screen) and automatically returns the terminal back to its previous state.
tea.NewProgram(Model{}, tea.WithAltScreen())
No response
Add a new flag --proxy
that turns dns53
into a reverse proxy. Modify the existing dashboard to provide initial functionality for tracing incoming requests.
No response
Add a hotkey for copying the domain name to the clipboard.
Extend the existing hotkey menu to allow the custom domain name to be copied to the clipboard. The aymanbagabas/go-osc52
library looks like a good candidate.
No response
Once an EC2 has been modified to include instance tags within the IMDS service. All tags are accessible through metadata. To provide greater flexibility to dns53
, any of these tags should be made available for Go templating.
Capture all tags returned by IMDS and ensure they are sanitised in the same way as the Name tag by converting them to kebab case. A map can be indexed in many different ways within Go:
{{ .Map.Key }}
{{ index .Map "another-key" }}
The simplest form (the 1st) only works if the map key is alphanumeric. Remove any whitespace and automatically PascalCase each key in the map.
No response
Expose more categories from the instance metadata service (IMDS) and make them available during the construction of the custom EC2 domain name
Identify additional paths that can be used to extract metadata from the EC2 instance. Ensure these values are exposed on the existing metadata struct, ensuring they are available through go templating.
All supported categories can be found here:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html
Having exposed EC2 tags within dns53
the risk of creating an illegal A-Record (domain name) is greatly increased. Perform some validation on the domain name before interacting with Route53.
Remove accessing of IMDS from within the TUI and construct the domain name much earlier. This has the added benefit of simplifying the logic within the TUI and allowing dns53
to fail much faster, providing a better overall experience to the user
No response
Currently, dns53
has to be started by a user. It could be made simpler by offering an option of starting dns53
as a service. This will launch dns53
every time the EC2 instance is started.
The service must be driven by a config file that controls how the EC2 is exposed within the PHZ. If no PHZ is provided, a hosted zone called dns53
should be created. The user should be able to change this config file and bounce the service.
Investigate how dns53
will be installed as a service across all the different installation mediums.
No response
Provide a mechanism for defining the AWS region and profile when running dns53
Support the use of the --region
and --profile
flags used by existing AWS tooling.
No response
Dynamically generate an A-Record and append it to a selected R53 PHZ.
Provide the ability for a PHZ to be selected from a list if multiple exist. A TUI will be used to provide an interactive experience for a user. There should also be an option for a power user to use flags.
The IP of the EC2 should be looked up. Initial support will be for IPv4 only.
No response
Before releasing v0.1.0
of dns53, ensure documentation is in place to make using dns53
as simple as possible.
Use mkdocs
for generating the documentation. Serve behind a custom domain.
No response
Support the creation of a friendly DNS name for the running EC2 instance. This should be configured by either defining an explicit value or using a Go template
Specifying the root domain name is optional and will automatically be appended (along with .dns53
) if missing. The DNS name will be provided through a new flag called --dns-name
.
As an example, if the root domain was test
:
--dns-name my.domain
=> my.domain.dns53.test--dns-name {{ .IPv4 }}.{{ .Region }}
=> 172-10-1-0.eu-west-1.dns53.testNo response
Ensure dns53
has a custom look and feel.
Design a pupleclay theme using tools such as lipgloss
. Possibly look into using glamour
as well.
https://github.com/charmbracelet/lipgloss
https://github.com/charmbracelet/glamour
As all EC2 instance tags are now available to dns53
through building custom domains, tag names are automatically cleaned to simplify their usage within go templates. However, it may not always be obvious how best to access them.
Expand the dns53
command to include an additional command that will print out a processed list of EC2 tags and how they can be accessed within custom domain name templates.
dns53 tags
This would result in output like the following:
Tag | Property Chaining | Indexed |
---|---|---|
ec2:role | {{.Tags.Ec2Role}} |
{{index .Tags "ec2:role"}} |
No response
To support further customisation of the EC2 domain name, the EC2 name (tag) should be retrievable through IMDS and made available to templating through the {{.Name}}
field
Exposing EC2 tags to IMDS requires an option to be enabled. This can be done directly through the CLI and SDK, https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/modify-instance-metadata-options.html
There are two options for supporting this in dns53
:
dns53
that can be invoked to toggle IMDS features, such as dns53 imds
No response
Ensure the look of dns53
aligns with other PurpleClay applications using the dedicated theme.
No response
Update the existing workflows within the dns53
project to align with other projects. This includes switching to DeepSource and utilising sub-workflows from the purpleclay github
project.
If dns53
is always going to be used against the same Route53 Private Hosted Zone, the user should be able to set that in advance. Rather than having to step through the TUI every time.
Support the inclusion of a --phz-id
flag for specifying the ID of an R53 PHZ. If provided, the TUI should short-circuit straight to the dashboard and not require any further user interaction.
No response
If an explicit PHZ ID is provided, the TUI hangs as it is not sending the required message to trigger a dashboard update. Can't wait for the bubbletea test framework to arrive
dns53 --phz-id Z08726083A9IPD4OGD46X
v0.7.0
All
Increase the versatility of dns53
by providing an option for a default dns53
PHZ to be created and attached upon launch. This will skip the existing wizard and display the connection dashboard.
Provide a new flag --auto
that triggers the creation of a new dns53
hosted zone. If the hosted zone already exists, retrieve its ID and pass that to the TUI to ensure the wizard is skipped. When closing the TUI, do not delete the hosted zone if other records exist.
No response
dns53
is due for an overhaul of the existing TUI. The existing approach doesn't conform to the best practices when using the bubbletea
library.
Break the existing dashboard into smaller components that can be styled individually. Eventually, these components can be moved out of dns53
into a purpleclay bubbles library.
No response
Align the existing dns53
documentation with other purpeclay projects to ensure a consistent look and feel.
AWS supports exposing an EC2 over either IPv4 or IPv6. Ensure dns53
supports both of these options natively.
Using the IMDS service retrieve the IPv6 address of the EC2 instance, if supported. This should then be used to create an AAAA record within the Route53 Private Hosted Zone.
The IPv6 address is exposed through IMDS under the path: /latest/metadata/ipv6
An EC2 can be launched to have an IPv4 or IPv6 address only, or both. If both exist, should the EC2 be exposed over both? Or should one of the two be favoured?
Build a standardised layout that can be used across all other purpleclay applications.
| TITLE | FUNCTION KEYS (toggle sub-menu) | VERSION | >> (menu bar)
SUB-MENU >> (hideable)
PROMPTS >> (configurable per app)
Notes:
| TITLE | FUNCTION KEYS (toggle sub-menu) | VERSION | >> (menu bar)
SUB-MENU >> (hideable)
PHZ: Name [ID]
EC2: Name | Region | IP | VPC
DNS: A Record >> IP
Elapsed: ticker
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.