Files
velero/docs/build-from-scratch.md
Jessica Yao e19d964042 simplify local build instructions
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-08-16 10:36:31 -07:00

2.2 KiB

Build From Scratch

While the README pulls from the Heptio image registry, you can also build your own Heptio Ark container with the following steps:

0. Prerequisites

In addition to the handling the prerequisites mentioned in the Quickstart, you should have Go installed (minimum version 1.8).

1. Download

Install with go:

go get github.com/heptio/ark

The files are installed in $GOPATH/src/github.com/heptio/ark.

2. Build

Using a locally built image

To ensure that your Ark deployment uses your local image rather than pulling from an image registry, you'll need to explicitly set the spec.template.spec.containers[*].imagePullPolicy in your deployment file to IfNotPresent. This file is either examples/azure/00-ark-deployment.yaml if you're using Azure, or examples/common/10-deployment.yaml for all other cloud providers.

Using your own registry

If you want to push the Heptio Ark images to your own registry, set the $REGISTRY environment variable (used in the Makefile). This allows any node in your cluster to pull your locally built image.

$PROJECT and $VERSION environment variables are also specified in the Makefile, and can be similarly modified as desired.

Run the following in the Ark root directory to build your container with the tag $REGISTRY/$PROJECT:$VERSION:

sudo make all

To push your image to a registry, use make push.

3. Run

When running Heptio Ark, you will need to account for the following (all of which are handled in the /examples manifests):

  • Appropriate RBAC permissions in the cluster
    • Read access for all data from the source cluster and namespaces
    • Write access to the target cluster and namespaces
  • Cloud provider credentials
    • Read/write access to volumes
    • Read/write access to object storage for backup data
  • A Config object definition for the Ark server

See Cloud Provider Specifics for a more detailed guide.