• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

NixIPFS/nixipfs-scripts: Mirror a Hydra jobset using IPFS or plain rsync

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

NixIPFS/nixipfs-scripts

开源软件地址:

https://github.com/NixIPFS/nixipfs-scripts

开源编程语言:

Python 73.7%

开源软件介绍:

NixIPFS Release Scripts

banner

This is a collection of scripts that fetch jobsets from a Hydra, create releases and publish them to IPFS. This is a working solution for NAR distribution but should be rewritten completely for an IPLD approach.

Usage

Start IPFS on your host or have the API close (latency) to you:

release_nixos --dir /data/nixipfs --tmpdir /data/tmp --ipfsapi 127.0.0.1 5001 --config nixos_release.json

This downloads the latest release builds of NixOS and all .narinfo + .nar files that belong to the runtime closure (if all store-paths are resolved) to --dir. tmpdir will be used for .nar/.tar extraction since /tmp is often too small

  • --print_only will not add anything to IPFS and will not download the *.nar files locally. Instead the paths are printed and can be piped to a file so you can fetch them using another tool / on another host.
  • --gc the scripts ship their own garbage collector that purges the global binary cache of all files that are not used by a release.
  • --no_ipfs will not add anything to IPFS
  • --config points to a json file that contains most of the parameters (see nixos_release.json for an example)

The modules used by release_nixos have their own scripts that can be used from a CLI.

  • create_channel_release fetches the latest tested build of a single jobset in a project and creates a channel
  • update_binary_cache updates a global binary cache with the runtime closure of a release
  • garbage_collect deletes all unreferenced files from a global binary cache.
  • create_nixipfs creates a IPFS directory from a local directory

Caching

In order to reduce the requests to the IPFS API, the hashes of each directory is stored on disk. If you want to re-add a directory with changed content (e.g. binary-cache-url) you need to delete a file called ipfs_hash in the same directory.

Run this in the releases path to add all releases again:

find . -iname ipfs_hash | xargs rm

License

  • /nixipfs/* is released under the GPLv3, see COPYING
  • /generate_programs_index/* has no license yet (Copyright by Eelco Dolstra, LGPL assumed)



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap