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

Commit 0ecb7ed

Browse files
jsilverio22cjellick
authored andcommitted
simplify acorn run -help text and add --help-advanced flag
Signed-off-by: Joshua Silverio <joshua@acorn.io>
1 parent f1f1abf commit 0ecb7ed

File tree

5 files changed

+192
-236
lines changed

5 files changed

+192
-236
lines changed

docs/docs/100-reference/01-command-line/acorn_run.md

Lines changed: 39 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -12,99 +12,61 @@ acorn run [flags] IMAGE|DIRECTORY [acorn args]
1212
### Examples
1313

1414
```
15-
# Publish and Expose Port Syntax
16-
# Publish port 80 for any containers that define it as a port
17-
acorn run -p 80 .
1815
19-
# Publish container "myapp" using the hostname app.example.com
20-
acorn run --publish app.example.com:myapp .
16+
# Build and run from a directory
17+
acorn run .
2118
22-
# Expose port 80 to the rest of the cluster as port 8080
23-
acorn run --expose 8080:80/http .
19+
# Run from an image
20+
acorn run ghcr.io/acorn-io/library/hello-world
2421
25-
# Labels and Annotations Syntax
26-
# Add a label to all resources created by the app
27-
acorn run --label key=value .
22+
# Automatic upgrades
23+
# Automatic upgrade for an app will be enabled if '#', '*', or '**' appears in the image's tag. Tags will be sorted according to the rules for these special characters described below. The newest tag will be selected for upgrade.
24+
25+
# '#' denotes a segment of the image tag that should be sorted numerically when finding the newest tag.
2826
29-
# Add a label to resources created for all containers
30-
acorn run --label containers:key=value .
27+
# This example deploys the hello-world app with auto-upgrade enabled and matching all major, minor, and patch versions:
28+
acorn run myorg/hello-world:v#.#.#
3129
32-
# Add a label to the resources created for the volume named "myvolume"
33-
acorn run --label volumes:myvolume:key=value .
30+
# '*' denotes a segment of the image tag that should sorted alphabetically when finding the latest tag.
31+
32+
# In this example, if you had a tag named alpha and a tag named zeta, zeta would be recognized as the newest:
33+
acorn run myorg/hello-world:*
3434
35-
# Link Syntax
36-
# Link the running acorn application named "mydatabase" into the current app, replacing the container named "db"
37-
acorn run --link mydatabase:db .
35+
# '**' denotes a wildcard. This segment of the image tag won't be considered when sorting. This is useful if your tags have a segment that is unpredictable.
36+
37+
# This example would sort numerically according to major and minor version (i.e. v1.2) and ignore anything following the "-":
38+
acorn run myorg/hello-world:v#.#-**
3839
39-
# Secret Syntax
40-
# Bind the acorn secret named "mycredentials" into the current app, replacing the secret named "creds". See "acorn secrets --help" for more info
41-
acorn run --secret mycredentials:creds .
40+
# NOTE: Depending on your shell, you may see errors when using '*' and '**'. Using quotes will tell the shell to ignore them so acorn can parse them:
41+
acorn run "myorg/hello-world:v#.#-**"
4242
43-
# Volume Syntax
44-
# Create the volume named "mydata" with a size of 5 gigabyes and using the "fast" storage class
45-
acorn run --volume mydata,size=5G,class=fast .
43+
# Automatic upgrades can be configured explicitly via a flag.
4644
47-
# Bind the acorn volume named "mydata" into the current app, replacing the volume named "data", See "acorn volumes --help for more info"
48-
acorn run --volume mydata:data .
45+
# In this example, the tag will always be "latest", but acorn will periodically check to see if new content has been pushed to that tag:
46+
acorn run --auto-upgrade myorg/hello-world:latest
4947
50-
# Automatic upgrades
51-
# Automatic upgrade for an app will be enabled if '#', '*', or '**' appears in the image's tag. Tags will sorted according to the rules for these special characters described below. The newest tag will be selected for upgrade.
52-
53-
# '#' denotes a segment of the image tag that should be sorted numerically when finding the newest tag.
54-
# This example deploys the hello-world app with auto-upgrade enabled and matching all major, minor, and patch versions:
55-
acorn run myorg/hello-world:v#.#.#
56-
57-
# '*' denotes a segment of the image tag that should sorted alphabetically when finding the latest tag.
58-
# In this example, if you had a tag named alpha and a tag named zeta, zeta would be recognized as the newest:
59-
acorn run myorg/hello-world:*
60-
61-
# '**' denotes a wildcard. This segment of the image tag won't be considered when sorting. This is useful if your tags have a segment that is unpredictable.
62-
# This example would sort numerically according to major and minor version (ie v1.2) and ignore anything following the "-":
63-
acorn run myorg/hello-world:v#.#-**
64-
65-
# NOTE: Depending on your shell, you may see errors when using '*' and '**'. Using quotes will tell the shell to ignore them so Acorn can parse them:
66-
acorn run "myorg/hello-world:v#.#-**"
67-
68-
# Automatic upgrades can be configured explicitly via a flag.
69-
# In this example, the tag will always be "latest", but acorn will periodically check to see if new content has been pushed to that tag:
70-
acorn run --auto-upgrade myorg/hello-world:latest
71-
72-
# To have acorn notify you that an app has an upgrade available and require confirmation before proceeding, set the notify-upgrade flag:
73-
acorn run --notify-upgrade myorg/hello-world:v#.#.# myapp
74-
# To proceed with an upgrade you've been notified of:
75-
acorn update --confirm-upgrade myapp
48+
# To have acorn notify you that an app has an upgrade available and require confirmation before proceeding, set the notify-upgrade flag:
49+
acorn run --notify-upgrade myorg/hello-world:v#.#.# myapp
7650
51+
# To proceed with an upgrade you've been notified of:
52+
acorn update --confirm-upgrade myapp
7753
```
7854

7955
### Options
8056

8157
```
82-
--annotation strings Add annotations to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
83-
--auto-upgrade Enabled automatic upgrades.
84-
-b, --bidirectional-sync In interactive mode download changes in addition to uploading
85-
--compute-class strings Set computeclass for a workload in the format of workload=computeclass. Specify a single computeclass to set all workloads. (ex foo=example-class or example-class)
86-
-i, --dev Enable interactive dev mode: build image, stream logs/status in the foreground and stop on exit
87-
-e, --env strings Environment variables to set on running containers
88-
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
89-
-h, --help help for run
90-
--interval string If configured for auto-upgrade, this is the time interval at which to check for new releases (ex: 1h, 5m)
91-
-l, --label strings Add labels to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
92-
--link strings Link external app as a service in the current app (format app-name:container-name)
93-
-m, --memory strings Set memory for a workload in the format of workload=memory. Only specify an amount to set all workloads. (ex foo=512Mi or 512Mi)
94-
-n, --name string Name of app to create
95-
--notify-upgrade If true and the app is configured for auto-upgrades, you will be notified in the CLI when an upgrade is available and must confirm it
96-
-o, --output string Output API request without creating app (json, yaml)
97-
--profile strings Profile to assign default values
98-
-p, --publish strings Publish port of application (format [public:]private) (ex 81:80)
99-
-P, --publish-all Publish all (true) or none (false) of the defined ports of application
100-
-q, --quiet Do not print status
101-
--region string Region in which to deploy the app, immutable
102-
--replace Replace the app with only defined values, resetting undefined fields to default values
103-
-s, --secret strings Bind an existing secret (format existing:sec-name) (ex: sec-name:app-secret)
104-
--target-namespace string The name of the namespace to be created and deleted for the application resources
105-
-u, --update Update the app if it already exists
106-
-v, --volume stringArray Bind an existing volume (format existing:vol-name,field=value) (ex: pvc-name:app-data)
107-
--wait Wait for app to become ready before command exiting (default true)
58+
--auto-upgrade Enabled automatic upgrades.
59+
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
60+
-h, --help help for run
61+
--help-advanced Show verbose help text
62+
-n, --name string Name of app to create
63+
--notify-upgrade If true and the app is configured for auto-upgrades, you will be notified in the CLI when an upgrade is available and must confirm it
64+
-o, --output string Output API request without creating app (json, yaml)
65+
--profile strings Profile to assign default values
66+
-q, --quiet Do not print status
67+
--replace Replace the app with only defined values, resetting undefined fields to default values
68+
-u, --update Update the app if it already exists
69+
--wait Wait for app to become ready before command exiting (default: true)
10870
```
10971

11072
### Options inherited from parent commands

docs/docs/100-reference/01-command-line/acorn_update.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,18 @@ acorn update [flags] APP_NAME [deploy flags]
1212
### Options
1313

1414
```
15-
--annotation strings Add annotations to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
16-
--auto-upgrade Enabled automatic upgrades.
17-
--compute-class strings Set computeclass for a workload in the format of workload=computeclass. Specify a single computeclass to set all workloads. (ex foo=example-class or example-class)
18-
--confirm-upgrade When an auto-upgrade app is marked as having an upgrade available, pass this flag to confirm the upgrade. Used in conjunction with --notify-upgrade.
19-
-e, --env strings Environment variables to set on running containers
20-
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
21-
-h, --help help for update
22-
--image string Acorn image name
23-
--interval string If configured for auto-upgrade, this is the time interval at which to check for new releases (ex: 1h, 5m)
24-
-l, --label strings Add labels to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
25-
--link strings Link external app as a service in the current app (format app-name:container-name)
26-
-m, --memory strings Set memory for a workload in the format of workload=memory. Only specify an amount to set all workloads. (ex foo=512Mi or 512Mi)
27-
-n, --name string Name of app to create
28-
--notify-upgrade If true and the app is configured for auto-upgrades, you will be notified in the CLI when an upgrade is available and must confirm it
29-
-o, --output string Output API request without creating app (json, yaml)
30-
--profile strings Profile to assign default values
31-
-p, --publish strings Publish port of application (format [public:]private) (ex 81:80)
32-
-P, --publish-all Publish all (true) or none (false) of the defined ports of application
33-
--pull Re-pull the app's image, which will cause the app to re-deploy if the image has changed
34-
-q, --quiet Do not print status
35-
--region string Region in which to deploy the app, immutable
36-
--replace Replace the app with only defined values, resetting undefined fields to default values
37-
-s, --secret strings Bind an existing secret (format existing:sec-name) (ex: sec-name:app-secret)
38-
--target-namespace string The name of the namespace to be created and deleted for the application resources
39-
-v, --volume stringArray Bind an existing volume (format existing:vol-name,field=value) (ex: pvc-name:app-data)
40-
--wait Wait for app to become ready before command exiting (default true)
15+
--auto-upgrade Enabled automatic upgrades.
16+
--confirm-upgrade When an auto-upgrade app is marked as having an upgrade available, pass this flag to confirm the upgrade. Used in conjunction with --notify-upgrade.
17+
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
18+
-h, --help help for update
19+
-n, --name string Name of app to create
20+
--notify-upgrade If true and the app is configured for auto-upgrades, you will be notified in the CLI when an upgrade is available and must confirm it
21+
-o, --output string Output API request without creating app (json, yaml)
22+
--profile strings Profile to assign default values
23+
--pull Re-pull the app's image, which will cause the app to re-deploy if the image has changed
24+
-q, --quiet Do not print status
25+
--replace Replace the app with only defined values, resetting undefined fields to default values
26+
--wait Wait for app to become ready before command exiting (default: true)
4127
```
4228

4329
### Options inherited from parent commands

0 commit comments

Comments
 (0)