Skip to content
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

[FEATURE] alternc-slavedns design #1

Open
ulvida opened this issue Mar 22, 2021 · 2 comments
Open

[FEATURE] alternc-slavedns design #1

ulvida opened this issue Mar 22, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@ulvida
Copy link
Member

ulvida commented Mar 22, 2021

About alternc-slavedns

When you install an alternc instance, your are prompted to configure two NS servers, DNS1 and DNS2. These are not DNS resolvers of your local networks, but the NS servers of the zones you will configure in your AlternC panel, those that you have to provide to the registrar when you register a DNS zone. These NS servers must obviously be configured by AlternC, and these is done either because the NS server is the AlternC server itself (its bind daemon, more specifically) either because they run an alternc-slavedns which synchronizes a bind DNS server with slave zones with their master in the AlternC main server, for the list of zones that are shared through a webpage.

Work proposed for this repo

We want to extend the AlternC main role to allow the configuration of alternc-slave DNS accounts (Administrator panel -> Slave DNS accounts), and a role to install and configure alternc-slavedns in a host.

The set of variables must be coherent (an account being the same object for client and server) and addressable as group variables.

Technique's issue

The AlternC role adresses AlternC configuration setting data directly to the database, with SQL sentences. This technique is not very sustainable, as the database structure is not an API, and leads to idempotency problems.

It would be better to use AlternC API, which is mentioned but not consistently documented somewhere, just a few mentions int he code. We can start trying for alternc-slavdns role, and only then eventually refactor alternc main role.

@ulvida ulvida added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Mar 22, 2021
@ulvida
Copy link
Member Author

ulvida commented Mar 22, 2021

I start trying the API.

First, something not documented: AlternC API is not included in alternc package. One must install alternc-api.

I first try the authentication API with this ansible code.

But I obtain:

...
TASK [udelarinterior.alternc_slavedns : See URI request result] *****************************************
task path: /home/ulvida/tech/interior/roles/ansible-role-alternc-slavedns/tasks/main.yml:17
ok: [anacahuita.interior.edu.uy] => {
    "alternc_login": {
        "changed": false,
        "connection": "close",
        "content": "I did nothing. Did you call the api properly?",
        "content_length": "45",
        "content_type": "text/html; charset=UTF-8",
        "cookies": {},
        "cookies_string": "",
        "date": "Mon, 22 Mar 2021 14:26:10 GMT",
        "elapsed": 0,
        "failed": false,
        "msg": "OK (45 bytes)",
        "redirected": false,
        "server": "Apache/2.4.46 (Debian)",
        "status": 200,
        "url": "https://anacahuita.interior.edu.uy/api/auth"
    }
}
...

¿What am I doing wrong?

@ulvida
Copy link
Member Author

ulvida commented Mar 28, 2021

Well, bad idea to use the API; "we just found a bug that prevents the API to work at all"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant