Code Monkey home page Code Monkey logo

heighliner's Introduction

Heighliner

Heighliner is a utility for building production-grade container images for blockchain node software, Cosmos and beyond.

Heighliner images are minimally constructed from scratch images, packaging only the chain binary and a useful reduced set of busybox utilities.

These container images can be used for infrastructure deployments (validator + horcrux, full node, archive node, etc.), end-to-end testing (interchaintest), and more.

This repository has a CI/CD pipeline to automatically build images when new git tags are detected on the chain repos in chains.yaml. These images are hosted as packages in the Github Container Registry (ghcr) here

Heighliner photo

Add a New Chain

To add a chain to the heighliner built-in configuration and have your chain images available on our repository's ghcr, submit a PR adding it to chains.yaml so it will be included in the automatic builds.

For further instructions see: addChain.md

Add Heighliner Images to your Chain Repo

To publish heighliner images on your chain repository and/or incorporate heighliner images into your chain repo's CI/CD flow, see heighliner-build-action

Build Your Own

If you would like to build the images yourself, heighliner is a CLI tool to help you do so. Download the latest release, or build it yourself with:

go build

Example: build the docker image for gaia v6.0.0:

heighliner build --chain gaia --git-ref v6.0.0

Docker image heighliner/gaia:v6.0.0 will now be available in your local docker images

Example: Cosmos SDK chain development cycle, build a local repository

cd ~/gaia-fork
heighliner build -c gaia --local

Docker image gaia:local will be built and stored in your local docker images.

Example: Build from a Github fork

cd ~/gaia-fork
heighliner build -c gaia -o strangelove-ventures -g working_branch -t image_tag

Heighliner will build the working_branch branch from the strangelove-ventures/gaia github organization/repository. Docker image gaia:image_tag will be stored in your local docker images.

Example: build with all overrides.

Heighliner can build without a chain present in chains.yaml if the necessary flags are provided.

heighliner build -c somegaia -o somefork --repo gaia --dockerfile cosmos --build-target "make install" --build-env "LEDGER_ENABLED=false BUILD_TAGS=muslc" --binaries "/go/bin/gaiad" -g v8.0.0 -t v8.0.0-somefork

Docker image somegaia:v8.0.0-somefork will be built and stored in your local docker images.

Example: build and push the gaia v6.0.0 docker image to ghcr:

# docker login ...
heighliner build -r ghcr.io/strangelove-ventures/heighliner -c gaia -g v6.0.0

Docker image ghcr.io/strangelove-ventures/heighliner/gaia:v6.0.0 will be built and pushed to ghcr.io

Example: build and push last n releases of osmosis chain

# docker login ...
heighliner build -r ghcr.io/strangelove-ventures/heighliner -c osmosis -n 3

heighliner will fetch the last 3 osmosis release tags from github, build docker images, and push them, e.g.:

  • ghcr.io/strangelove-ventures/heighliner/osmosis:v6.1.0
  • ghcr.io/strangelove-ventures/heighliner/osmosis:v6.0.0
  • ghcr.io/strangelove-ventures/heighliner/osmosis:v5.0.0

Example: build and push last n releases of all chains

This will make a request to each chain's Github repository to fetch all recent releases. Github rate-limits unauthenticated requests to 60 requests per hour. Authenticated requests have either 1000 (personal) or 15000 (enterprise) per hour. To add Github API authentication, set the GH_USER and GH_PAT environment variables with your Github username and Github Personal Access Token (PAT), respectively.

# docker login ...
export GH_USER=github_username GH_PAT=github_personal_access_token
heighliner build -r ghcr.io/strangelove-ventures/heighliner -n 3

heighliner will fetch the last 3 release tags from github for all chains in chains.yaml, build docker images, and push them.

Cross compiling

Depends on docker buildkit. Requires buildkitd server to be running. Pass -b flag to use buildkit.

The build will look for the local buildkit unix socket by default. Change address with --buildkit-addr flag.

Customize the platform(s) to be built with the --platform flag.

Example: build x64 and arm64 docker images for gaia v7.0.1:

heighliner build -b -c gaia -g v7.0.1

Docker images for heighliner/gaia:v7.0.1 will now be available in your local docker. The manifest for the tag will contain both amd64 and arm64 images.

Example: Use custom buildkit server, build x64 and arm64 docker images for gaia v7.0.1, and push:

heighliner build -b --buildkit-addr tcp://192.168.1.5:8125 -c gaia -g v7.0.1 -r ghcr.io/strangelove-ventures/heighliner

Docker images for heighliner/gaia:v7.0.1 will be built on the remote buildkit server and then pushed to the container repository. The manifest for the tag will contain both amd64 and arm64 images.

heighliner's People

Contributors

agouin avatar boojamya avatar dependabot[bot] avatar davidnix avatar danbryan avatar antityping avatar pharr117 avatar misko9 avatar qj0r9j0vc2 avatar ramilexe avatar pratikbin avatar vimystic avatar bigs avatar reecepbcups avatar jtieri avatar 7ac avatar cbarraford avatar iramiller avatar jackzampolin avatar johnletey avatar kakucodes avatar lockwarr avatar moonyongjung avatar pfc-developer avatar spoo-bar avatar udpatil avatar discoverdefiteam avatar

Watchers

 avatar

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.