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

Implement settings modification using the command line flags, instead of manually editing the config files #74

Open
yaroslav-gwit opened this issue Nov 7, 2023 · 0 comments
Assignees
Labels
new feature Label to apply to new features development

Comments

@yaroslav-gwit
Copy link
Owner

As Hoster matures and our user base grows, it becomes harder to support a current model of "it's easy, just edit the config file".

Step-by-step, I would like to implement command line flags that modify certain (most used, for now) config parameters. For example, to add a new network you could simply call:

hoster network add --name wan1 --apply-bridge-address --network-gateway 10.0.101.254

instead of adding this to the config file manually:

    {
        "network_name": "internal",
        "network_gateway": "10.0.101.254",
        "network_subnet": "10.0.101.0/24",
        "network_range_start": "10.0.101.10",
        "network_range_end": "10.0.101.200",
        "bridge_interface": "None",
        "apply_bridge_address": true,
        "comment": "Internal Network"
    }

which is not only error prone, but also hard for users who aren't familiar with JSON.

The same could be applied to the ZFS datasets, adding new networks to VMs, mounting ISOs, etc etc.

For the advanced users out there - JSON config files aren't going anywhere, and you'll still be able to edit them by hand, or maintain them via Ansible and other automation tools. This change is purely here to make life easier for the new users, and one-off changes.

@yaroslav-gwit yaroslav-gwit added the new feature Label to apply to new features development label Nov 7, 2023
@yaroslav-gwit yaroslav-gwit self-assigned this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Label to apply to new features development
Projects
None yet
Development

No branches or pull requests

1 participant