Code Monkey home page Code Monkey logo

Comments (6)

mudler avatar mudler commented on August 28, 2024

Integrate support of Viper/Cobra configuration for both client and build packages commands.

Format supported is YAML (or viper supported format):

Example of a configuration for the client:

logging:
   path: /var/log/luet/luet.log
   level: "info"

general:
   concurrency: 4
   # debug: false

# Environment options are usable
proxy:
    http: xxx
    https: xxxx
    ftp: xxx

cache_repositories:

We should be consistent, and choose between underscore or dashes for naming (cache_repositories vs system-repositories). But my question is also, should we allow to define the cache per-repo for the user? or compute automatically the paths based on a root path (which is defined by the user?)

from luet.

geaaru avatar geaaru commented on August 28, 2024

The cache_repositories is intended like an L2 Cache where luet could retrieve packages/layers before use mirrors. I'm not sure that /var/cache/luet/repos is right here because could be the default path where fetch packages.

The idea is to use for example a directory where retrieve/store fetched files:

$# ls /var/cache/luet/repos/
repo1/pkg1.tar
repo2/pkg2.tar
...

Or in a LAN fetch packages from a node used as local cache mirrors that is integrated in this way:

  1. Run: luet install pkg1
  2. luet try to see if pkg1 is already present in local cache
  3. if not present try to check if pkg is present on cached_repository with high priority
  4. if pkg is not present try to fetch the package from URL defined inside repository object
  5. if cached_repository has rw mode then try to push the package to cached_repos
  6. luet install fetched package.

The cached repository could be a feature of API Server instances.

from luet.

geaaru avatar geaaru commented on August 28, 2024

It seems that viper has an issue on parse structure from configuration files with field with an underscore (probably for the env key replacer):

$ ./luet config
 Using config file: /home/geaaru/go/src/github.com/mudler/luet/.luet.yaml
💣   [failed to load configuration: 1 error(s) decoding:

* 'cache_repositories[0]' expected a map, got 'string']🔥 
$ cat .luet.yaml
system_repositories:
   - name: "xxx"

I will rename system_repositories in repositories and cache_repositories in repetitors.

from luet.

geaaru avatar geaaru commented on August 28, 2024

This implement repositories integration b8f7122

from luet.

geaaru avatar geaaru commented on August 28, 2024

Just to trace the implemented configuration file: https://github.com/mudler/luet/blob/develop/contrib/config/luet.yaml

from luet.

geaaru avatar geaaru commented on August 28, 2024

repetitors integration will be defined by a specific issue.

from luet.

Related Issues (20)

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.