Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Support ComponentConfig for configuring defaults #315

Open
luxas opened this issue Aug 12, 2019 · 4 comments
Open

Support ComponentConfig for configuring defaults #315

luxas opened this issue Aug 12, 2019 · 4 comments
Labels
area/UX Let's make Ignite's UX great! kind/enhancement Categorizes issue or PR as related to improving an existing feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@luxas
Copy link
Contributor

luxas commented Aug 12, 2019

As ignited grows in complexity, instead of registering tons of flags on it, we'd use a declarative configuration file, aka. ComponentConfig, for it. (Could be even backed by git?)

@luxas luxas added area/UX Let's make Ignite's UX great! kind/enhancement Categorizes issue or PR as related to improving an existing feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Aug 12, 2019
@luxas luxas added this to the v0.6.0 milestone Aug 12, 2019
@luxas luxas modified the milestones: v0.6.0, v0.7.0 Aug 30, 2019
@stealthybox stealthybox changed the title Support ComponentConfig? Support ComponentConfig for configuring defaults Sep 19, 2019
@stealthybox
Copy link
Contributor

stealthybox commented Sep 19, 2019

Some defaults and values that could be configurable:

- runtime
- sandbox.image
- network-plugin
- CNI bin dir
- CNI conf dir
- CNI subnet
- CNI options
- CNI network name
- docker network name
- dns.nameservers[]  (not implemented)
- dns.search[]  (not implemented)
- ipv6 support  (not implemented)
- vm.cpus
- vm.size
- vm.memory
- log-level
- kernel.image
- kernel.args
- gitops.repo-url
- gitops.branch / ref
- gitops.paths

These can be overridden by flags or the appropriate field in an Ignite VM API object.

@stealthybox
Copy link
Contributor

stealthybox commented Sep 19, 2019

Just brainstorming:

ignited daemon --config production-config.yaml
apiVersion: ignite.weave.works/v1alpha1
kind: Configuration
metadata:
  name: production-config
spec:
  logLevel: debug
  runtime: docker
  sandbox:
    image: docker.io/weaveworks/ignite:0.6.4
  networkPlugin: docker-bridge
  dockerBridge:
    network: testnet
  cni:
    binDir: /opt/cni/bin
    confDir: /etc/cni/net.d
    subnet: 10.39.0.0/18
    networkName: prod-ignite-vm-bridge  # should this be configurable?
    confFile: 10-ignite.prod.conflist  # should this be configurable?
    # options: 
  dns:
    # ipv6: true
    nameservers:
      - 1.1.1.1
      - 9.9.9.9
    search:
      - deployment.example.com
      - production.example.com
  gitops:
    repoURL: git@github.com/stealthybox/example
    ref: master
    paths:
      - ignite/production-backend
      - ignite/production-cache
  kernel:
    image: <something>
    cmdLine:
      - my
      - default
      - kernel
      - args
  vm:
    cpus: 4
    size: 20GB
    memory: 4GB

@stealthybox
Copy link
Contributor

For the ignite tool since we do not yet have a complete daemon architecture, we could load this configuration file from some well known paths:

/etc/ignite/runtime.yaml
related XDG_CONFIG_HOME for root user?

@bbros-dev
Copy link

bbros-dev commented Mar 5, 2020

Possibly this discussion is relevant to PR #428

I'd say this micro-VM data belongs in XDG_DATA_HOME: ~/.local/share/ignite, and the XDG_CONFIG_HOME would contain the much simpler Ignite (not micro-VM)configuration defaults. Below is one possibility. Even better would be if we avoided configuration, preferring some defined, useful conventions, as discussed in issue #554, where this example can be avoided by adopting a convention discussed there:

manifest:
  paths: 
    - /etc/firecracker/manifests
    - /dfs/db/firecracker/manifests
    - /dfs/sec/firecracker/manifests
    - /home/me/.local/share/ignite/manifests
    - /usr/local/share/ignite/manifests
    - /usr/share/ignite/manifests

What configuration goes where?

  • XDG_CONFIG_HOME: configuration that does not influence the specification/behavior of the micro-VM
  • XDG_DATA_HOME: configuration that does influence the specification/behavior of the micro-VM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/UX Let's make Ignite's UX great! kind/enhancement Categorizes issue or PR as related to improving an existing feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

3 participants