Development Environments and Tooling

This document outlines the development environments and tooling used in apko, including how to set up and manage different development stages. This includes the different ways to use tools like melange and kontain.me.

Melange

Melange is a tool that allows you to manage multiple apko configurations and their associated build artifacts. It provides a simple way to switch between different configurations and to build and test apko images.

Installation

pip install melange
          

Usage

To create a new Melange project:

melange init my-project
          

To add an apko configuration to a Melange project:

melange add my-config --type apko my-config.yaml
          

To build an apko image:

melange build my-config
          

To test an apko image:

melange test my-config
          

More information on how to use Melange can be found in the Melange documentation.

Kontain.me

Kontain.me is a container runtime that provides a secure and lightweight environment for running applications. Kontain.me is designed for use with apko images.

Installation

Kontain.me can be installed from the Kontain.me website.

Usage

To run an apko image with Kontain.me:

kontain run my-image
          

Kontain.me provides a variety of options for customizing the runtime environment. More information can be found in the Kontain.me documentation.

Development Environments

Local Development

For local development, you can use a standard Linux or macOS system. Apko requires Go 1.18 or later. To install Go, follow the instructions in the Go documentation.

Continuous Integration

Apko uses GitHub Actions for continuous integration. GitHub Actions provides a platform for automating builds, tests, and deployments. To learn more about GitHub Actions, see the GitHub Actions documentation.

Code Structure

The following are some of the key components of the apko codebase:

  • apko/: The main apko codebase
  • build/: Code for building apko images
  • test/: Code for testing apko images
  • examples/: Examples of apko images

Additional Tools

  • Docker: Docker is a popular container runtime. Docker can be used to build and test apko images.
  • Podman: Podman is an alternative to Docker. Podman can also be used to build and test apko images.
  • Buildah: Buildah is a tool for building container images. Buildah can be used to build apko images.

Debugging

  • Debugging with GDB: GDB is a powerful debugger that can be used to debug apko code.
  • Debugging with Delve: Delve is a debugger for Go code.
  • Logging: Apko provides a logging system that can be used to track the progress of the build process.

Contributing to Apko

We welcome contributions to apko! Please see the Contributing document for more information.