@volcano.dev/cli 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -109
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Volcano CLI
|
|
2
2
|
|
|
3
|
-
`volcano` is the command-line client for Volcano, Kong's hosting platform.
|
|
4
|
-
|
|
5
|
-
standalone Go CLI.
|
|
3
|
+
`volcano` is the command-line client for Volcano, Kong's hosting platform. It
|
|
4
|
+
helps you scaffold, run, and manage Volcano projects from your terminal.
|
|
6
5
|
|
|
7
6
|
## Quickstart
|
|
8
7
|
|
|
@@ -19,32 +18,17 @@ npm install -g @volcano.dev/cli
|
|
|
19
18
|
volcano --help
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
platform-specific binary from the matching GitHub Release and verifies it
|
|
24
|
-
against that release's `SHA256SUMS`. Set `VOLCANO_SKIP_DOWNLOAD=1` to skip the
|
|
25
|
-
download (it is fetched on first run instead).
|
|
26
|
-
|
|
27
|
-
Build from source:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
make build
|
|
31
|
-
./volcano --help
|
|
32
|
-
./volcano --version
|
|
33
|
-
make test
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
From the CLI checkout, create an empty sibling project directory and run it:
|
|
21
|
+
Create a project directory and start local development:
|
|
37
22
|
|
|
38
23
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"$VOLCANO_CLI" migrations deploy --all -d app
|
|
24
|
+
mkdir volcano-quickstart
|
|
25
|
+
cd volcano-quickstart
|
|
26
|
+
volcano init javascript
|
|
27
|
+
volcano start
|
|
28
|
+
volcano variables deploy
|
|
29
|
+
volcano functions deploy --all
|
|
30
|
+
volcano config deploy
|
|
31
|
+
volcano migrations deploy --all -d app
|
|
48
32
|
```
|
|
49
33
|
|
|
50
34
|
`volcano init` without a template creates a base scaffold (environment
|
|
@@ -52,93 +36,22 @@ files, migrations directory, and README). Use a template to add
|
|
|
52
36
|
language-specific files: `javascript` (aliases: `js`, `node`, `nodejs`),
|
|
53
37
|
`nextjs`, `python`, or `ruby`.
|
|
54
38
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
New to Volcano? Create an account from the CLI:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
volcano signup
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
`volcano signup` prefills your email from `git config --global user.email`
|
|
64
|
-
when available (press Enter to accept, or type a different address), then
|
|
65
|
-
opens Volcano's web signup flow in your browser. Once you finish in the
|
|
66
|
-
browser, the CLI completes the device-authorization handshake and saves your
|
|
67
|
-
credentials to `~/.volcano/config.json` — so a single command signs you up
|
|
68
|
-
**and** logs you in.
|
|
69
|
-
|
|
70
|
-
Already have an account? Authenticate with `volcano login`:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# Browser-based login (default)
|
|
74
|
-
volcano login
|
|
75
|
-
|
|
76
|
-
# Token-based login (for CI/CD)
|
|
77
|
-
volcano login --token pk-xxxxxxxxxx
|
|
78
|
-
|
|
79
|
-
# Or skip login entirely with an environment variable
|
|
80
|
-
export VOLCANO_TOKEN=pk-xxxxxxxxxx
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Log out at any time (this deletes local credentials but does not revoke the
|
|
84
|
-
token — revoke it in the Volcano dashboard to fully cut off access):
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
volcano logout
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
To target a non-production environment, set `VOLCANO_API_URL` to that backend's
|
|
91
|
-
API endpoint. `volcano signup` then opens the signup page on the **same**
|
|
92
|
-
environment the API points at — it follows the device-flow verification URL,
|
|
93
|
-
just like `volcano login` — so you normally don't need anything else. Set
|
|
94
|
-
`VOLCANO_WEB_URL` only to force a specific web origin.
|
|
95
|
-
|
|
96
|
-
## Project configuration (`volcano-config.yaml`)
|
|
97
|
-
|
|
98
|
-
`volcano config deploy` reconciles declarative project configuration
|
|
99
|
-
(`volcano/volcano-config.yaml` or `./volcano-config.yaml`) against the active
|
|
100
|
-
target — the same manifest applies to local mode and cloud.
|
|
101
|
-
|
|
102
|
-
Functions may declare scheduled invocations. `name` and `cron` are required;
|
|
103
|
-
`enabled` (default `true`), `payload`, and `regions` are optional. A function
|
|
104
|
-
entry is valid if it sets `public` **or** declares at least one scheduler.
|
|
105
|
-
|
|
106
|
-
```yaml
|
|
107
|
-
version: 1
|
|
108
|
-
functions:
|
|
109
|
-
- name: hello
|
|
110
|
-
public: false
|
|
111
|
-
schedulers:
|
|
112
|
-
- name: refresh-cache # required, unique per function (the reconcile key)
|
|
113
|
-
cron: "*/5 * * * *"
|
|
114
|
-
enabled: true
|
|
115
|
-
payload: { job: refresh }
|
|
116
|
-
regions: [us-east-1] # omit to let the server pick one deployed region
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Reconciliation follows one rule that mirrors the server: **fields you declare
|
|
120
|
-
are enforced; fields you omit are left server-managed.** An omitted `enabled`,
|
|
121
|
-
`payload`, or `regions` keeps whatever the scheduler already has on the server
|
|
122
|
-
(on first create the server applies its defaults — `enabled: true`, an empty
|
|
123
|
-
payload, and one chosen region). In particular, `config deploy` will not
|
|
124
|
-
re-enable a scheduler you disabled out of band unless the manifest sets
|
|
125
|
-
`enabled: true`. `cron` is always required and enforced.
|
|
39
|
+
More detail lives in `docs/`:
|
|
126
40
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
is left running; to remove or disable one, use the imperative commands
|
|
131
|
-
(`volcano functions schedulers delete` / `disable`).
|
|
41
|
+
- [Installation details](docs/installation.md)
|
|
42
|
+
- [Authentication](docs/authentication.md)
|
|
43
|
+
- [Project configuration](docs/project-configuration.md)
|
|
132
44
|
|
|
133
45
|
## Contributing
|
|
134
46
|
|
|
135
|
-
See
|
|
136
|
-
notes, and pull request expectations.
|
|
137
|
-
|
|
47
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for local workflows, generated-code
|
|
48
|
+
guidance, building from source, release notes, and pull request expectations.
|
|
49
|
+
Participation is governed by [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
138
50
|
|
|
139
51
|
If you believe you have found a security vulnerability, do not open a public
|
|
140
|
-
issue. Follow
|
|
52
|
+
issue. Follow [SECURITY.md](SECURITY.md) instead.
|
|
141
53
|
|
|
142
54
|
## License
|
|
143
55
|
|
|
144
|
-
Volcano CLI is licensed under the Apache License, Version 2.0. See
|
|
56
|
+
Volcano CLI is licensed under the Apache License, Version 2.0. See
|
|
57
|
+
[LICENSE](LICENSE).
|