Commit Graph

97 Commits

Author SHA1 Message Date
Lance Ball 857b0fd19d
feat: add/improve spinner for build and deploy (#322)
This commit modifies the progress meter so that, by default there is no
step counter. It also modifies the responsibility for calling `Done()`,
making it the job of the command rather than the client. This is because
the client does not know how many commands will be executed and therefore
cannot know when the progress bar is done.

This commit also adds String() to the progress bar, and moves logging
responsibility out of the deployer itself and fully into the client.
Deployer#Deploy() now returns a DeploymentResult.

Fixes: https://github.com/boson-project/func/issues/296

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-03 14:25:19 -04:00
Zbynek Roubalik 541e8586f7
feat: function name matches KService name (#317)
* feat: function name matches KService name

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fix typo

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-26 10:13:32 +02:00
Matej Vasek 923c788f4a
src: better ctx propagation (#283)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-24 11:05:52 -04:00
Matej Vasek dc2fbee67f
fix: `func deploy` uses Docker API, not binary
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-22 15:18:03 +01:00
Luke Kingland 8a91cac6cc
feat: add --build (default: true) flag to func deploy 2021-03-16 15:29:36 +09:00
Luke Kingland f115a7a871
client: remove implicit call to Build on Deploy 2021-03-16 15:24:39 +09:00
Matej Vasek db0945ed3e
fix: `func run` now uses Docker API, not binary
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-15 18:24:57 +01:00
Luke Kingland 4f2f577a82
ci: run integration tests with on-demand cluster 2021-03-10 19:35:27 +09:00
Luke Kingland 80e366b142
fix: increase remove timeout to 120s 2021-03-10 19:35:26 +09:00
Zbynek Roubalik a5cbe3061b
src: rename from faas to func (#253)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-01-21 17:10:39 +01:00
Lance Ball 8e72fd2eba
feat: add --all-namespaces flag to `func list` (#242)
* feat: add --all-namespaces flag to `func list`

Fixes: https://github.com/boson-project/faas/issues/224

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: linting

Signed-off-by: Lance Ball <lball@redhat.com>
2020-12-10 12:12:11 +01:00
Luke K 57e12362af
feat!: remove create cli subcommand (#180) 2020-11-06 17:08:49 +09:00
Zbynek Roubalik ddbb95b075
feat: Better output of build/deploy/delete commands (#206)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-11-05 16:46:21 +01:00
Zbynek Roubalik 29ca07768c
feat: list command - improved output (#205)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-11-04 13:15:06 +01:00
Lance Ball 61cb56aec3
feat: change default runtime to Node.js HTTP (#198)
Fixes: https://github.com/boson-project/faas/issues/191

Signed-off-by: Lance Ball <lball@redhat.com>
2020-11-02 09:27:31 -05:00
Zbynek Roubalik 00e5d187c2
src: use image digest (#175)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-10-19 11:43:50 +02:00
Zbynek Roubalik 551331925a
chore: tweak output & verbose messages (#173)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-10-15 19:00:28 +02:00
Lance Ball e425c8f081
src!: change all references of "repository" to "registry" for images (#156)
When dealing with images, instead of referring to an image repository,
let's instead use the more correct term "registry", even though we're
actually using "registry/namespace" in most case.

Signed-off-by: Lance Ball <lball@redhat.com>
2020-10-08 10:58:17 +02:00
Zbynek Roubalik d5839ea6c1
feat!: combine deploy and update commands (#152)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-10-07 17:29:09 +02:00
Matej Vasek c2b4a304bd
feat: ability for users to specify custom builders (#147)
* refactor: functionWithOverrides
* feat: custom Buildpacks builder
* fix: namespaces
2020-10-05 10:29:51 -04:00
Lance Ball d6e131f915
feat: set builder images in templates and .faas.yaml (#136)
This commit adds a .builder.yaml file to each template directory. In the file
there is at the moment a single key/value pair, "default: <image>", where the
actual builder image name is <image>. Using a mapping allows the future
possibility that a user may specify a builder image by name via a flag on the
command line. For example,

```console
faas build --builder native
```

When a project is initialized, the .builder.yaml file is read, and the default
builder is saved in the project's .faas.yaml file. The .faas.yaml file is then
consulted when building an image with `faas build`. If the builder image is
specified, then the builder will use it. Otherwise, it will fallback to the
defaults. This allows developers to create custom builders, and specify them
in the configuration file.

After extracting the builder image from .builder.yaml in the project directory,
this file is deleted.

This commit also adds Verbose to the init command.
2020-09-24 11:41:34 -04:00
Zbynek Roubalik 025862689e
feat: decouple function name from function domain (#127)
* decouple function name from function domain

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-09-24 09:52:22 -04:00
Lance Ball 566d8f9255 feat: default to no confirmation prompts for CLI commands
The CLI commands all printed confirmation prompts for the various flags
they exposed. This commit modifies that logic, so that there is no longer
a `-y` flag, but instead a `--confirm` or `-c` flag for each command, and
prompts are only displayed if using this flag. In most cases, the derived
values are printed even if not prompted for.

In call cases where the user is prompted, I have removed the "Verbose"
prompt, as that seems less like a configuration option that needs to be
confirmed, and more like just a CLI option for the current run which we
can just accept as-is.

The text for the prompts has also been reduced to one or two words.

Also added are some checks around image naming and repositories, short
circuiting failures that could occur if these are not specified or are
unknown. For example, if a user does `faas init` and then `faas deploy`
we don't yet know what the image name should be - one hasn't been built.

Fixes: https://github.com/boson-project/faas/issues/91
Fixes: https://github.com/boson-project/faas/issues/90
Fixes: https://github.com/boson-project/faas/issues/89
2020-09-11 14:36:34 -04:00
Matej Vasek 284b77f7ef fix: delete command
There was hard-coded `faas` namespace.
2020-09-10 10:06:20 -04:00
Matej Vasek 91172ef0b1
fix: image override (#88) 2020-09-02 08:37:17 -04:00
Luke K 3fc39aa773
feat: consolidate formatters
- Replaces globally-scoped formatter function with methods
- Defines enumerated Format types
- Renames the 'output' flag 'format' due to confusion with command file descriptors
- FunctionDescription now Function
- Global verbose flag replaced with config struct based value throughout
2020-08-31 16:37:07 +09:00
Luke K 00ac880c3b
docs: fix function typos 2020-08-29 01:55:33 +09:00
Luke K d33fb2d694
feat: test suite
- updated tests to new api throughout
- expanded tests where appropriate
- lint issues
- minor code review comments addressed
2020-08-29 01:55:33 +09:00
Luke K 4918cc7eef
feat: cli usability enhancements and API simplification 2020-08-29 01:54:13 +09:00
Lance Ball 5b4d97a443
feat: add init/build/deploy commands and customizable namespace (#65)
* feat: add init/build/deploy commands and customizable namespace

This commit comprises some fairly large changes in the codebase.
The 'create' command has been extracted into 'init', 'bulid' and
'deploy' commands. The 'create' command remains, but now delegates
most of its work to these other three. This also has resulted in
some rework of the various flags. 

In addition, it is now possible to specify the cluster namespace to
which the function will be deployed.
2020-08-12 10:52:50 -04:00
Matej Vasek 4677b3452f
chore: add lint to GH actions CI 2020-07-29 17:47:08 +02:00
Luke K 711094b02e
rename Service Function to simply Function 2020-07-02 14:52:27 +00:00
Luke K faf1e7aa66
tests to runtime 2020-07-02 14:36:48 +00:00
Luke K f23e81538f
rename language to runtime 2020-07-02 13:06:54 +00:00
Luke K 92976d6009
add context templates to tests 2020-06-16 14:34:22 +00:00
Luke K ac0845c909
reenable full creation 2020-06-11 12:25:36 +00:00
Luke K 5febf1ac4a
add function context (style) to Create 2020-06-11 12:23:49 +00:00
Matej Vasek 5e8dc8b5f7
feat: buildpacks
Implemented builder using buildpack.
2020-06-08 18:38:55 +02:00
Luke K a784445333
progress bar deferred done and cleanup 2020-05-29 03:03:22 +00:00
Luke K 9671e5af74
progress indicator on create 2020-05-28 07:47:07 +00:00
Luke K fd27affb4b
final url print placeholder 2020-05-23 01:25:12 +00:00
Luke K 31d601197a
expand describe to default to current active function (CWD) 2020-05-11 04:59:41 +00:00
Luke K 853d0eb4db
remove defaults to CWD, with name parameter available 2020-05-11 01:40:37 +00:00
Luke K 48e761c999
internal mode stub 2020-05-11 00:27:49 +00:00
Luke K 724b64b51a
FaasNamespace to DefaultNamespace 2020-05-11 00:17:39 +00:00
Luke K a6c10fdaa8
separate function from client to enable contextless methods such as List 2020-05-11 00:12:19 +00:00
Luke K 1a3fbe294d
flatten package structure 2020-05-10 23:55:04 +00:00