Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

[docs] update for 0.10 release #2450

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const config = {
({
docs: {
versions: {
"0.9": {label: "0.9", banner: "none", path: "0.9"},
"0.8": { label: "0.8", banner: "none", path: "0.8" },
"0.7": { label: "0.7", banner: "none", path: "0.7" },
"0.6": { label: "0.6", banner: "none", path: "0.6" },
Expand Down
140 changes: 140 additions & 0 deletions docs/versioned_docs/version-0.10/10-home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: Home
slug: /
---

:::caution

Acorn is a work in progress. Features will evolve over time and there may be breaking changes between releases. Please give us your feedback in [Slack](https://slack.acorn.io), [Discussions](https://github.com/acorn-io/runtime/discussions), or [Issues](https://github.com/acorn-io/runtime/issues)!
:::

:::note
These are the docs for installing and running Acorn runtime on your own Kubernetes clusters. To learn how to use Acorn to package and deploy your applications, and the Acorn hosted platform please visit [docs.acorn.io](https://docs.acorn.io).
:::

## Overview

### What is Acorn?

Acorn is an application packaging and deployment framework that simplifies running apps on Kubernetes. Acorn is able to package up all of an application's Docker images, configuration, and deployment specifications into a single Acorn image artifact. This artifact is publishable to any OCI container registry allowing it to be deployed on any dev, test, or production Kubernetes. The portability of Acorn images enables developers to develop applications locally and move to production without having to switch tools or technology stacks.

Developers create Acorn images by describing the application configuration in an [Acornfile](https://docs.acorn.io/authoring/overview). The Acornfile describes the whole application without all of the boilerplate of Kubernetes YAML files. The Acorn CLI is used to build, deploy, and operate Acorn images on any Kubernetes cluster.

### Acorn Workflow

The following figure illustrates the steps a user takes when using Acorn.

1. The user authors an Acornfile to describe the application.
2. The user invokes the Acorn CLI to build an Acorn image from the Acornfile.
3. The Acorn image is pushed to an OCI registry.
4. The user invokes the Acorn CLI to deploy the Acorn image onto an Acorn runtime, which can be installed on any Kubernetes cluster.

![Acorn Workflow](/img/acorn.workflow.png)

### Acorn vs. Helm

Helm is a popular package manager for Kubernetes. After working with Helm charts for many years, we built Acorn
specifically to offer a simplified application deployment experience for Kubernetes. Here are some of the
differences between Acorn and Helm.

1. Helm charts are templates for Kubernetes YAML files, whereas Acornfiles define application-level constructs. Acorn is
a layer of abstraction on top of Kubernetes. Acorn users do not work with Kubernetes YAML files directly. By design, no Kubernetes
knowledge is needed to use Acorn.

2. Helm users can package any Kubernetes workload into Helm charts, whereas Acorn is designed to package applications and not
system-level drivers, plugins, and agents. Acorn supports any type of application, stateless and stateful. Applications
run in their own namespaces. Applications do not need privileged containers. Applications run on Kubernetes but do not call the
underlying Kubernetes API or use the underlying etcd as a database by defining custom resources.

3. Acornfiles define application-level constructs such as Docker containers, application configuration, and application
deployment specifications. Acorn brings structure to application deployment on Kubernetes. This is in marked contrast with
unconstrained use of Kubernetes YAML files in Helm charts.

We hope Acorn will simplify packaging and deployment of applications on Kubernetes.

## Quickstart

### Prerequisites

To try out Acorn you will need admin access to a Kubernetes cluster. Docker Desktop, Rancher Desktop, and K3s are all great options for trying out Acorn for testing/development.

### Install

On Linux and macOS you can use `brew` to quickly install Acorn.

```shell
# Linux or macOS
brew install acorn-io/cli/acorn

# verify binary (assume local directory)
acorn -v
```

For Windows and binary installs see the [installation docs](30-installation/01-installing.md#binary-install).

### Initialize Acorn on Kubernetes cluster

Before using Acorn on your cluster you need to initialize Acorn by running:

```shell
acorn install
```

:::note
Acorn has a handful of installation requirements. If you're installing to your desktop Kubernetes cluster, you likely meet the requirements. If you're installing into a remote cluster, please review the detailed [installation instructions](30-installation/01-installing.md).
:::

You will only need to do this once per cluster.

### Build/Run First Acorn app

Create a new `Acornfile` in your working directory and add the following contents.

```acorn
containers: {
web: {
image: "nginx"
ports: publish: "80/http"
files: {
// Simple index.html file
"/usr/share/nginx/html/index.html": "<h1>My First Acorn!</h1>"
}
}
}
```

Save the file. What this file defines is a container called `web` based on the nginx container image from DockerHub. It also declares that port 80 should be exposed and that it will expose an http protocol service. We are also customizing the `index.html` file as part of our packaging process. The contents of the file will be added during the build process.

Now you will need to build your Acorn from this file by typing `acorn build .`. This will launch an Acorn builder and development registry into your Kubernetes cluster and build the Acorn image.

```shell
acorn run .
#[+] Building 0.8s (5/5) FINISHED
# => [internal] load .dockerignore
# => => transferring context: 2B
# ...
#green-bush

```

Our Acorn has started and is named `green-bush`.

To check the status of our app we can run the following.

```shell
acorn apps green-bush
#NAME IMAGE HEALTHY UPTODATE CREATED ENDPOINTS MESSAGE
#green-bush 60d803258f7aa2680e4910c526485488949835728a2bc3519c09f1b6b3be1bb3 1 1 About a minute ago http://web-nginx-green-bush-6cc6aeba547e.local.oss-acorn.io => web:80 OK
```

In Chrome or Firefox browsers you can now open the URL listed under the endpoints column to see our app.

Next you can learn more about what you can do with Acorn in the [getting started](37-getting-started.md) guide.

## Next steps

* [Installation](30-installation/01-installing.md)
* [Getting Started](37-getting-started.md)
* [Authoring Acornfiles](https://docs.acorn.io/authoring/overview)
* [Hands On Running Acorn Apps](https://docs.acorn.io/hands-on-with-acorn)
* [Join our Slack channel](https://slack.acorn.io)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Command Line'
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "acorn"
---
## acorn



### Synopsis

Acorn: Containerized Application Packaging Framework

```
acorn [flags]
```

### Options

```
--config-file string Path of the acorn config file to use
--debug Enable debug logging
--debug-level int Debug log level (valid 0-9) (default 7)
-h, --help help for acorn
--kubeconfig string Explicitly use kubeconfig file, overriding the default context
-j, --project string Project to work in
```

### SEE ALSO

* [acorn all](acorn_all.md) - List (almost) all objects
* [acorn build](acorn_build.md) - Build an app from a Acornfile file
* [acorn check](acorn_check.md) - Check if the cluster is ready for Acorn
* [acorn container](acorn_container.md) - Manage containers
* [acorn copy](acorn_copy.md) - Copy Acorn images between registries
* [acorn credential](acorn_credential.md) - Manage registry credentials
* [acorn dashboard](acorn_dashboard.md) - Open the web dashboard for the project
* [acorn dev](acorn_dev.md) - Run an app from an image or Acornfile in dev mode or attach a dev session to a currently running app
* [acorn edit](acorn_edit.md) - Edits an acorn or secret interactively. The things you can change with acorn edit are the same things you can set via the CLI when running acorn run.
* [acorn events](acorn_events.md) - List events about Acorn resources
* [acorn exec](acorn_exec.md) - Run a command in a container
* [acorn fmt](acorn_fmt.md) - Format an Acornfile
* [acorn image](acorn_image.md) - Manage images
* [acorn info](acorn_info.md) - Info about acorn installation
* [acorn install](acorn_install.md) - Install and configure acorn in the cluster
* [acorn job](acorn_job.md) - Manage jobs
* [acorn login](acorn_login.md) - Add registry credentials
* [acorn logout](acorn_logout.md) - Remove registry credentials
* [acorn logs](acorn_logs.md) - Log all workloads from an app
* [acorn offerings](acorn_offerings.md) - Show infrastructure offerings
* [acorn port-forward](acorn_port-forward.md) - Forward a container port locally
* [acorn project](acorn_project.md) - Manage projects
* [acorn ps](acorn_ps.md) - List or get apps
* [acorn pull](acorn_pull.md) - Pull an image from a remote registry
* [acorn push](acorn_push.md) - Push an image to a remote registry
* [acorn render](acorn_render.md) - Evaluate and display an Acornfile with args
* [acorn rm](acorn_rm.md) - Delete an acorn, optionally with it's associated secrets and volumes
* [acorn run](acorn_run.md) - Run an app from an image or Acornfile
* [acorn secret](acorn_secret.md) - Manage secrets
* [acorn start](acorn_start.md) - Start an app
* [acorn stop](acorn_stop.md) - Stop an app
* [acorn tag](acorn_tag.md) - Tag an image
* [acorn uninstall](acorn_uninstall.md) - Uninstall acorn and associated resources
* [acorn update](acorn_update.md) - Update a deployed Acorn
* [acorn version](acorn_version.md) - Version information for acorn
* [acorn volume](acorn_volume.md) - Manage volumes
* [acorn wait](acorn_wait.md) - Wait an app to be ready then exit with status code 0

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "acorn all"
---
## acorn all

List (almost) all objects

```
acorn all [flags]
```

### Examples

```

acorn all
```

### Options

```
-a, --all Include stopped apps/containers
-h, --help help for all
-i, --images Include images in output
-o, --output string Output format (json, yaml, {{gotemplate}})
-q, --quiet Output only names
```

### Options inherited from parent commands

```
--config-file string Path of the acorn config file to use
--debug Enable debug logging
--debug-level int Debug log level (valid 0-9) (default 7)
--kubeconfig string Explicitly use kubeconfig file, overriding the default context
-j, --project string Project to work in
```

### SEE ALSO

* [acorn](acorn.md) -

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- This is a manually added redirect, since we changed the primary name of `acorn app` to `acorn ps`, but left `acorn app`
as an alias. This was not auto-generated. -->
import {Redirect} from "@docusaurus/router";

<Redirect to="./acorn_ps"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "acorn build"
---
## acorn build

Build an app from a Acornfile file

### Synopsis

Build all dependent container and app images from your Acornfile file

```
acorn build [flags] DIRECTORY
```

### Examples

```

# Build from Acornfile file in the local directory
acorn build .
```

### Options

```
--args-file string Default args to apply to the build (default ".build-args.acorn")
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
-h, --help help for build
-p, --platform strings Target platforms (form os/arch[/variant][:osversion] example linux/amd64)
--push Push image after build
-t, --tag strings Apply a tag to the final build
```

### Options inherited from parent commands

```
--config-file string Path of the acorn config file to use
--debug Enable debug logging
--debug-level int Debug log level (valid 0-9) (default 7)
--kubeconfig string Explicitly use kubeconfig file, overriding the default context
-j, --project string Project to work in
```

### SEE ALSO

* [acorn](acorn.md) -

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "acorn check"
---
## acorn check

Check if the cluster is ready for Acorn

```
acorn check [flags]
```

### Examples

```

acorn check
```

### Options

```
-h, --help help for check
-i, --image string Override the image used for test deployments.
--ingress-class-name string Specify ingress class used for tests
-o, --output string Output format (json, yaml, {{gotemplate}})
-q, --quiet No Results. Success or Failure only.
-n, --test-namespace string Specify namespace used for tests
```

### Options inherited from parent commands

```
--config-file string Path of the acorn config file to use
--debug Enable debug logging
--debug-level int Debug log level (valid 0-9) (default 7)
--kubeconfig string Explicitly use kubeconfig file, overriding the default context
-j, --project string Project to work in
```

### SEE ALSO

* [acorn](acorn.md) -

Loading