Skip to content

Commit

Permalink
Document how to run the Ark server locally
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
  • Loading branch information
ncdc authored and carlisia committed Jul 6, 2018
1 parent 1a71437 commit bb8e2e9
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions docs/build-from-scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ files (clientset, listers, shared informers, docs) are up to date.

## 4. Run

### Prerequisites

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

* Appropriate RBAC permissions in the cluster
Expand All @@ -90,12 +92,47 @@ When running Heptio Ark, you will need to account for the following (all of whic

See [Cloud Provider Specifics][9] for more details.

### Specifying your image
### Option 1: Run your Ark server locally

Running the Ark server locally can speed up iterative development. This eliminates the need to rebuild the Ark server
image and redeploy it to the cluster with each change.

1. Set the appropriate environment variable for your cloud provider:
1. AWS: AWS_SHARED_CREDENTIALS_FILE
2. GCP: GOOGLE_APPLICATION_CREDENTIALS
3. Azure:
1. AZURE_CLIENT_ID
2. AZURE_CLIENT_SECRET
3. AZURE_SUBSCRIPTION_ID
4. AZURE_TENANT_ID
5. AZURE_STORAGE_ACCOUNT_ID
6. AZURE_STORAGE_KEY
7. AZURE_RESOURCE_GROUP

2. Start the server:

```
ark server
```

Make sure `ark` is in your `PATH` or specify the full path.

You may also specify these additional options, as needed:

- `--kubeconfig`: set the path to the kubeconfig file the Ark server uses to talk to the Kubernetes apiserver
- `--namespace`: the set namespace where the Ark server should look for backups, schedules, restores
- `--log-level`: set the Ark server's log level
- `--plugin-dir`: set the directory where the Ark server looks for plugins
- `--metrics-address`: set the bind address and port where Prometheus metrics are exposed

### Option 2: Run your Ark server in a deployment

1. Install Ark using a deployment (TODO: link).

When your Ark deployment is up and running, you must replace the Heptio-provided Ark image with the image that you built. Run:
2. Replace the deployment's default Ark image with the image that you built. Run:

```
kubectl set image deployment/ark ark=$REGISTRY/ark:$VERSION
kubectl --namespace=heptio-ark set image deployment/ark ark=$REGISTRY/ark:$VERSION
```
where `$REGISTRY` and `$VERSION` are the values that you built with.

Expand Down

0 comments on commit bb8e2e9

Please sign in to comment.