Giter Site home page Giter Site logo

cddns's Introduction

cddns's People

Contributors

dependabot[bot] avatar renovate[bot] avatar simbleau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

miltongz

cddns's Issues

Kubernetes deployment support

The Kubernetes story has not yet been tried. Currently all documentation on Kubernetes is untested.
It would be useful to provide helm charts or an operator.

Instructions on updating inventory

Inventories don't need to be "reloaded", because watch will read the most recent version every interval. Instead, this just needs representation in docs.

Support Homebrew

cddns needs alternative installation methods, such as homebrew.

Bug: config path must exist

If the config path does not exist, you are met with a similar message:

Error: could not canonicalize path to config file "/root/.config/cddns/config.toml"

Caused by:
    No such file or directory (os error 2)

Certificate error Docker

Since migrating to a slim docker image, some dependencies were removed, causing SSL verification issues.

error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

# ./cddns -v verify -t hi
2022-12-11T20:00:55.379802Z DEBUG run:run: configuration file not found
2022-12-11T20:00:55.379832Z  INFO run:run:verify: verifying, please wait...
2022-12-11T20:00:55.379838Z TRACE run:run:verify: starting http request
2022-12-11T20:00:55.454794Z ERROR verification failure, need help? see https://github.com/simbleau/cddns#readme

Caused by:
    0: error verifying API token
    1: error sending HTTP request
    2: error sending request for url (https://api.cloudflare.com/client/v4//user/tokens/verify): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1914: (unable to get local issuer certificate)
    3: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1914: (unable to get local issuer certificate)
    4: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1914: (unable to get local issuer certificate)
    5: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1914:
# sudo apt install ca-certificates

False-negative updates in logs

As a test of faith, I changed my IP and relaxed as cddns fixed the record.
However, in the logs of the service running, I noticed that it appeared as though the log was unsuccessful, except it was successful.

2022-12-12T02:46:19.243463Z  INFO summary valid=1 outdated=0 invalid=0
2022-12-12T02:46:19.243617Z  INFO inventory is updated
2022-12-12T02:46:47.707059Z  INFO checking records, please wait...
2022-12-12T02:46:49.421868Z  WARN outdated name="imbleau.com" id="5dba009abaa3ba5d3a624e87b37f941a" content="72.239.221.209"
2022-12-12T02:46:49.421967Z  INFO summary valid=0 outdated=1 invalid=0
2022-12-12T02:46:49.422004Z  WARN inventory contains 1 outdated records
2022-12-12T02:46:49.422070Z  INFO updating 1 records...
2022-12-12T02:46:49.993344Z ERROR unsuccessful record update id="5dba009abaa3ba5d3a624e87b37f941a" name="imbleau.com"
2022-12-12T02:46:49.993463Z ERROR 1 outdated records remain
2022-12-12T02:47:17.706232Z  INFO checking records, please wait...
2022-12-12T02:47:19.354639Z  INFO summary valid=1 outdated=0 invalid=0
2022-12-12T02:47:19.354793Z  INFO inventory is updated

Expected result:

  • Should have printed out "successful update", not "unsuccessful update"

Implement `cddns setup`

In the effort of being the most simple tool available,

The command would be simple. In one command:

  • Take CLI input from the user for their token and save it.
  • Next, run inventory build and save the inventory file.
  • Immediately go into inventory watch with the token and inventory file.

Verbose logging

cddns -v should provide enhanced logging.

Currently we are not using the tracing crate, but it would be a massive improvement.

v1.0 Tracking

Below are the milestones I want to hit before cddns is considered "production ready".

Once all the above are finished,

  • All dependencies are up to date, stable versions
  • 90s days without bugs since final minor release

Migrate to stable

nightly has delivered cutting features that are exciting, however, for production readiness, we need stability.

support docker compose

version: '3.3'
services:
    cddns:
        environment:
            - CDDNS_VERIFY_TOKEN='<YOUR_CLOUDFLARE_TOKEN>'
        volumes:
            - '/<host_path>/inventory.yaml:/inventory.yaml'
        image: 'simbleau/cddns:latest'

--keep-invalid

There should be the ability to not prune on inventory watch.

5s is a fast default

5 seconds is pretty quick by DDNS standards. 30/60s is more appropriate for a default.

Error messages are unclear in fallible tasks

Fallible tasks do not give good indication there are errors.

Example: On triggering inventory watch with a bad token.

simbleau@PC:~/git/cddns$ cargo run -- inventory watch
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/cddns inventory watch`
Checking Cloudflare resources...
resolving zones endpoint
Checking Cloudflare resources...
resolving zones endpoint

README Changes

  • Add a GIF to facade
  • Add instructions for Docker Swarm

inventory header is duplicated

Upon inventory build being generated, I am seeing a double header.

# cat inventory.yaml
# This file was automatically @generated by cddns.
# last-modified: 2022-12-12 01:10:24.955420632 +00:00

# This file was automatically @generated by cddns.
# last-modified: 2022-12-12 01:10:24.954950966 +00:00

9aad55f2e0a8d9373badd4361227cabe: # 'imbleau.com'
- 5dba009abaa3ba5d3a624e87b37f941a # 'imbleau.com'

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • clap 4.0.29
  • tokio 1.23.0
  • crossterm 0.25.0
  • tracing 0.1.37
  • tracing-subscriber 0.3.16
  • ansi_term 0.12.1
  • reqwest 0.11.13
  • toml 0.5.9
  • anyhow 1.0.66
  • envy 0.4
  • serde 1.0.150
  • serde_json 1.0.89
  • serde_yaml 0.9.14
  • ron 0.8
  • regex 1.7.0
  • public-ip 0.2.2
  • directories 4.0.1
  • chrono 0.4.23
dockerfile
Dockerfile
github-actions
.github/workflows/ci.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions-rs/toolchain v1
  • actions-rs/clippy-check v1
  • actions-rs/toolchain v1
  • actions/checkout v3
  • actions/cache v3
  • actions-rs/toolchain v1
  • actions/checkout v3
  • actions/cache v3
  • actions-rs/toolchain v1
  • actions/checkout v3
  • docker/setup-buildx-action v2
  • docker/build-push-action v3
.github/workflows/release.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions-rs/toolchain v1
  • actions/upload-artifact v3
  • actions/checkout v3
  • actions-rs/toolchain v1
  • actions/checkout v3
  • actions/download-artifact v3
  • softprops/action-gh-release v1
  • actions/checkout v3
  • docker/setup-qemu-action v2
  • docker/setup-buildx-action v2
  • docker/login-action v2
  • docker/build-push-action v3

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: packageRules[0]: Each packageRule must contain at least one match* or exclude* selector. Rule: {"automerge":false}

Add cddns to PATH in docker image

It's expected someone will, at some point, bash into a terminal for the docker container and wonder why cddns doesn't work. (hint: It's ./cddns)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.