Skip to content

Commit 938c414

Browse files
tpiperatgodFelixnoobenjaminhuo
authored
Release 0.5 (#24)
* Update README Signed-off-by: Felixnoo <[email protected]> * Release v0.5.0 Signed-off-by: laminar <[email protected]> * update: change the default version of OpenFunction to the latest stable version. Signed-off-by: laminar <[email protected]> * release v0.5.2 Signed-off-by: laminar <[email protected]> Co-authored-by: Felixnoo <[email protected]> Co-authored-by: Benjamin Huo <[email protected]>
1 parent edad22b commit 938c414

File tree

17 files changed

+994
-803
lines changed

17 files changed

+994
-803
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,31 @@
1212

1313
`[BUGFIX]`
1414

15+
# 0.5.1
16+
17+
> This is the first release of OpenFunction CLI
18+
19+
`[CHANGE]`
20+
21+
`[FEATURE]`
22+
23+
`[ENHANCEMENT]`
24+
25+
`[BUGFIX]`
26+
- Fix the issue that ofn install cannot install the latest version of OpenFunction #19
27+
28+
# 0.5.2
29+
30+
> This is the first release of OpenFunction CLI
31+
32+
`[CHANGE]`
33+
34+
`[FEATURE]`
35+
36+
`[ENHANCEMENT]`
37+
- Change the default version of OpenFunction to the latest stable version
38+
- Add the `--force` option to force the operation
39+
- Use the spinner instead of the original process display
40+
- Adjust the function hierarchy to make some functions more generic
41+
42+
`[BUGFIX]`

README.md

Lines changed: 66 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,117 @@
11
# ![OpenFunctionCtl](docs/images/logo.png)
22

3-
`cli` is the Command-Line Interface for [OpenFunction](https://github.com/OpenFunction/OpenFunction)
3+
`cli` is the command-line interface for [OpenFunction](https://github.com/OpenFunction/OpenFunction).
44

5-
The `cli` repo is used to track issues for the `OpenFunction`. this tool allows users to focus on the core functionality of the OpenFunction, while also presenting the relationship between the OpenFunction and its dependent components in a more abstract and friendly way to the user.
5+
The `cli` repo is used to track issues for the `OpenFunction`. This tool allows you to focus on the core functionality of the OpenFunction, while also presents the relationship between the OpenFunction and its dependent components in a more abstract and friendly way.
66

77
## Main commands
88
The main commands supported by the CLI are:
99
- init: provides management for openfunction’s framework.
10-
- install: install OpenFunction and its dependencies.
11-
- uninstall: uninstall OpenFunction and its dependencies.
12-
- create: create a function from a file or stdin.
13-
- apply: apply a function from a file or stdin.
10+
- install: installs OpenFunction and its dependencies.
11+
- uninstall: uninstalls OpenFunction and its dependencies.
12+
- create: creates a function from a file or stdin.
13+
- apply: applies a function from a file or stdin.
1414
- get: prints a table of the most important information about the specified function.
1515
- get builder: prints important information about the builder.
16-
- get serving:prints important information about the serving.
17-
- delete: delete a specified the function.
16+
- get serving: prints important information about the serving.
17+
- delete: deletes the specified function.
1818

1919
## Getting started
2020

21-
Visit [ofn release](https://github.com/OpenFunction/cli/releases/) to select the `ofn` cli to deploy to your cluster.
21+
Visit [ofn releases page](https://github.com/OpenFunction/cli/releases/) to download the `ofn` cli to deploy to your cluster.
2222

2323
### Use ofn to deploy OpenFunction
2424

25-
> We assume that you have placed the artifacts from the above step under the appropriate path in `PATH` and renamed it `ofn`.
25+
> Make sure you put the artifacts from the above step under the appropriate path in `PATH` and rename it `ofn`.
2626
27-
You can use the `ofn install --all` to complete a simple deployment. By default, this command will install the *v0.4.0* version of OpenFunction for you, while it will skip the installation process for components that already exist (you can use the `--upgrade` command to overwrite these components).
27+
Run `ofn install --all` to implement a simple deployment. By default, this command will install the *v0.4.0* version of OpenFunction and skips the installation of components that already exist. To overwrite the existing components, use the `--upgrade` command.
2828

29-
Please refer to the [ofn install docs](docs/install.md).
29+
For more information, refer to the [ofn install document](docs/install.md).
3030

3131
```shell
32-
# ofn install --all --upgrade
32+
# ofn install --all
3333
Start installing OpenFunction and its dependencies.
34-
Here are the components and corresponding versions to be installed:
34+
The following components will be installed:
3535
+------------------+---------+
3636
| COMPONENT | VERSION |
3737
+------------------+---------+
38+
| Knative Serving | 1.0.1 |
39+
| Tekton Pipelines | 0.30.0 |
40+
| OpenFunction | 0.5.0 |
3841
| Kourier | 1.0.1 |
42+
| DefaultDomain | 1.0.1 |
3943
| Keda | 2.4.0 |
40-
| Tekton Pipelines | 0.30.0 |
41-
| OpenFunction | 0.4.0 |
44+
| CertManager | 1.5.4 |
4245
| Dapr | 1.5.1 |
43-
| CertManager | 1.1.0 |
4446
| Shipwright | 0.6.1 |
45-
| Knative Serving | 1.0.1 |
46-
| DefaultDomain | 1.0.1 |
47+
| IngressNginx | 1.1.0 |
4748
+------------------+---------+
48-
You have used the `--upgrade` parameter, which means that the installation process will overwrite the components that already exist.
49-
Make sure you know what happens when you do this.
50-
Enter 'y' to continue and 'n' to abort:
51-
-> y
52-
🔄 -> INGRESS <- Installing Ingress...
53-
🔄 -> KNATIVE <- Installing Knative Serving...
54-
🔄 -> DAPR <- Installing Dapr...
55-
🔄 -> DAPR <- Downloading Dapr Cli binary...
56-
🔄 -> KEDA <- Installing Keda...
57-
🔄 -> CERTMANAGER <- Installing Cert Manager...
58-
🔄 -> SHIPWRIGHT <- Installing Shipwright...
59-
🔄 -> INGRESS <- Checking if Ingress is ready...
60-
🔄 -> KEDA <- Checking if Keda is ready...
61-
🔄 -> CERTMANAGER <- Checking if Cert Manager is ready...
62-
🔄 -> SHIPWRIGHT <- Checking if Shipwright is ready...
63-
🔄 -> KNATIVE <- Installing Kourier as Knative's gateway...
64-
🔄 -> KNATIVE <- Configuring Knative Serving's DNS...
65-
🔄 -> KNATIVE <- Checking if Knative Serving is ready...
66-
✅ -> CERTMANAGER <- Done!
67-
🔄 -> DAPR <- Initializing Dapr with Kubernetes mode...
68-
✅ -> SHIPWRIGHT <- Done!
69-
✅ -> KNATIVE <- Done!
70-
✅ -> INGRESS <- Done!
71-
✅ -> DAPR <- Done!
72-
✅ -> KEDA <- Done!
73-
🔄 -> OPENFUNCTION <- Installing OpenFunction...
74-
🔄 -> OPENFUNCTION <- Checking if OpenFunction is ready...
75-
✅ -> OPENFUNCTION <- Done!
76-
🚀 Completed in 2m3.638035129s.
49+
✓ Dapr - Completed!
50+
✓ Keda - Completed!
51+
✓ Knative Serving - Completed!
52+
✓ Shipwright - Completed!
53+
✓ Cert Manager - Completed!
54+
✓ Ingress - Completed!
55+
✓ OpenFunction - Completed!
56+
🚀 Completed in 1m40.055438303s.
57+
58+
██████╗ ██████╗ ███████╗███╗ ██╗
59+
██╔═══██╗██╔══██╗██╔════╝████╗ ██║
60+
██║ ██║██████╔╝█████╗ ██╔██╗ ██║
61+
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║
62+
╚██████╔╝██║ ███████╗██║ ╚████║
63+
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝
64+
65+
███████╗██╗ ██╗███╗ ██╗ ██████╗████████╗██╗ ██████╗ ███╗ ██╗
66+
██╔════╝██║ ██║████╗ ██║██╔════╝╚══██╔══╝██║██╔═══██╗████╗ ██║
67+
█████╗ ██║ ██║██╔██╗ ██║██║ ██║ ██║██║ ██║██╔██╗ ██║
68+
██╔══╝ ██║ ██║██║╚██╗██║██║ ██║ ██║██║ ██║██║╚██╗██║
69+
██║ ╚██████╔╝██║ ╚████║╚██████╗ ██║ ██║╚██████╔╝██║ ╚████║
70+
╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝
7771
```
7872

7973
### Use ofn to uninstall OpenFunction
8074

81-
> We assume that you have placed the artifacts from the above step under the appropriate path in `PATH` and renamed it `ofn`.
75+
> Make sure you put the artifacts from the above step under the appropriate path in `PATH` and rename it `ofn`.
8276
83-
You can use `ofn uninstall --all` to easily uninstall OpenFunction and its dependencies (or just uninstall OpenFunction without arguments).
77+
Run `ofn uninstall --all` to uninstall OpenFunction and its dependencies (or just uninstall OpenFunction without arguments).
8478

85-
Please refer to the [ofn uninstall docs](docs/uninstall.md).
79+
For more information, refer to the [ofn uninstall document](docs/uninstall.md).
8680

8781
```shell
88-
~# ofn uninstall --all
82+
~# ofn uninstall --all -y
8983
Start uninstalling OpenFunction and its dependencies.
9084
The following components already exist:
9185
+------------------+---------+
9286
| COMPONENT | VERSION |
9387
+------------------+---------+
94-
| Cert Manager | v1.5.4 |
95-
| Ingress Nginx | 1.1.0 |
96-
| Tekton Pipelines | v0.28.1 |
97-
| Shipwright | 0.6.0 |
98-
| OpenFunction | v0.4.0 |
99-
| Dapr | 1.4.3 |
88+
| OpenFunction | 0.5.0 |
89+
| Knative Serving | 1.0.1 |
90+
| Kourier | 1.0.1 |
91+
| DefaultDomain | 1.0.1 |
92+
| IngressNginx | 1.1.0 |
10093
| Keda | 2.4.0 |
101-
| Knative Serving | 0.26.0 |
94+
| Dapr | 1.5.1 |
95+
| Shipwright | 0.6.1 |
96+
| Tekton Pipelines | 0.30.0 |
97+
| CertManager | 1.5.4 |
10298
+------------------+---------+
103-
You can see the list of components to be uninstalled and the list of components already exist in the cluster.
104-
Make sure you know what happens when you do this.
105-
Enter 'y' to continue and 'n' to abort:
106-
-> y
107-
🔄 -> OPENFUNCTION <- Uninstalling OpenFunction...
108-
🔄 -> KNATIVE <- Uninstalling Knative Serving...
109-
🔄 -> DAPR <- Uninstalling Dapr with Kubernetes mode...
110-
🔄 -> KEDA <- Uninstalling Keda...
111-
🔄 -> SHIPWRIGHT <- Uninstalling Tekton Pipeline & Shipwright...
112-
🔄 -> INGRESS <- Uninstalling Ingress...
113-
🔄 -> CERTMANAGER <- Uninstalling Cert Manager...
114-
✅ -> OPENFUNCTION <- Done!
115-
✅ -> DAPR <- Done!
116-
🔄 -> KNATIVE <- Uninstalling Kourier...
117-
✅ -> KEDA <- Done!
118-
✅ -> CERTMANAGER <- Done!
119-
✅ -> KNATIVE <- Done!
120-
✅ -> INGRESS <- Done!
121-
✅ -> SHIPWRIGHT <- Done!
122-
🚀 Completed in 1m21.683329262s.
99+
✓ Dapr - Completed!
100+
✓ Keda - Completed!
101+
✓ Knative Serving - Completed!
102+
✓ Shipwright - Completed!
103+
✓ Tekton Pipelines - Completed!
104+
✓ Cert Manager - Completed!
105+
✓ Ingress - Completed!
106+
✓ OpenFunction - Completed!
107+
🚀 Completed in 1m17.729501739s.
123108
```
124109

125110
### Build OpenFunction CLI
126111

127-
You can also use `make build` to build the OpenFunction CLI —— `ofn`.
112+
To build the OpenFunction CLI——`ofn`, run `make build`.
128113
When the command is executed, you can find the artifact in the `. /dist` directory.
129-
Move it to the appropriate path in the `PATH` so that you can use it in your environment.
114+
Move it to an appropriate path in the `PATH` so that you can use it in your environment.
130115

131116
```shell
132117
~# make build

RELEASE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This page describes the release process and the currently planned schedule for u
77
| release series | date (year-month-day) | release shepherd |
88
|----------------|--------------------------------------------|---------------------------------------------|
99
| v0.5.0 | 2021-12-21 | Laminar (GitHub: @tpiperatgod) |
10+
| v0.5.1 | 2021-12-22 | Laminar (GitHub: @tpiperatgod) |
11+
| v0.5.2 | 2022-01-03 | Laminar (GitHub: @tpiperatgod) |
1012

1113
# How to cut a new release
1214

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.5.0
1+
v0.5.2

docs/install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This command will help you to install OpenFunction and its dependencies.
1717
--shipwright For installing ShipWright.
1818
--sync For installing OpenFunction Sync Runtime (To be supported).
1919
--upgrade Upgrade components to target version while installing.
20+
--yes Automatic yes to prompts. ('-y' as a short form)
2021
--verbose Show verbose information.
2122
--version string Used to specify the version of OpenFunction to be installed. (default "v0.4.0")
2223
--timeout duration Set timeout time. Default is 5 minutes. (default 5m0s)
@@ -52,11 +53,10 @@ ofn install --upgrade --all
5253
5354
### Install a specific version of OpenFunction
5455
55-
> default to v0.4.0 if no version specified
56+
> default to the latest stable version
5657
5758
The available versions are:
58-
- v0.3.1
59-
- v0.4.0
59+
- any stable version
6060
- latest
6161
6262
```shell
@@ -69,7 +69,7 @@ OpenFunction relies on several components like Knative Serving, Dapr, Keda, Ship
6969
7070
The OpenFunction CLI provides a default compatibility matrix based on which OpenFunction CLI will install a default selected version of each component for each version of kubernetes.
7171
72-
The OpenFunction CLI keeps the installed component details in `$home/.ofn/inventory.yaml`.
72+
The OpenFunction CLI keeps the installed component details in `$home/.ofn/<cluster name>-inventory.yaml`.
7373
7474
| Components | Kubernetes 1.17 | Kubernetes 1.18 | Kubernetes 1.19 | Kubernetes 1.20+ | CLI Option | Description |
7575
| ---------------------- | --------------- | --------------- | --------------- | ---------------- | ---------------- | ---------------------------------------------- |

docs/uninstall.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ This command will help you to uninstall OpenFunction and its dependencies.
1717
--shipwright For uninstalling ShipWright.
1818
--sync For uninstalling OpenFunction Sync Runtime (To be supported).
1919
--verbose Show verbose information.
20-
--version string Used to specify the version of OpenFunction to be uninstalled. (default "v0.4.0")
20+
--yes Automatic yes to prompts. ('-y' as a short form)
21+
--version string Used to specify the version of OpenFunction to be uninstalled.
2122
--wait Awaiting the results of the uninstallation.
2223
--timeout duration Set timeout time. Default is 5 minutes. (default 5m0s)
2324
```
@@ -54,11 +55,10 @@ ofn uninstall --all --wait
5455

5556
### Uninstall a specific version of OpenFunction
5657

57-
> Default to v0.4.0 if no version specified
58+
> Default to the version of the OpenFunction currently installed
5859
5960
The available versions are:
60-
- v0.3.1
61-
- v0.4.0
61+
- any stable version
6262
- latest
6363

6464
```shell
@@ -67,7 +67,7 @@ ofn uninstall --version v0.4.0
6767

6868
## Inventory
6969

70-
During installation, the OpenFunction CLI keeps the installed component details in `$home/.ofn/inventory.yaml`. So during the uninstallation, the OpenFunction CLI will remove the relevant components based on the contents of `$home/.ofn/inventory.yaml`.
70+
During installation, the OpenFunction CLI keeps the installed component details in `$home/.ofn/<cluster name>-inventory.yaml`. So during the uninstallation, the OpenFunction CLI will remove the relevant components based on the contents of `$home/.ofn/<cluster name>-inventory.yaml`.
7171

7272
In addition, the OpenFunction CLI supports obtaining the version of the component and the path to the component's yaml file from the environment variable. You can refer to the [Environment variables](install.md#environment-variables) for more information.
7373

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ module github.com/OpenFunction/cli
33
go 1.16
44

55
require (
6+
github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412
67
github.com/fatih/color v1.7.0
78
github.com/jedib0t/go-pretty/v6 v6.2.4
9+
github.com/leaanthony/synx v0.1.0
10+
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852
811
github.com/openfunction v0.3.0
912
github.com/pkg/errors v0.9.1
1013
github.com/spf13/cobra v1.2.1

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ github.com/aerospike/aerospike-client-go v4.5.0+incompatible/go.mod h1:zj8LBEnWB
160160
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
161161
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
162162
github.com/agrea/ptr v0.0.0-20180711073057-77a518d99b7b/go.mod h1:Tie46d3UWzXpj+Fh9+DQTyaUxEpFBPOLXrnx7nxlKRo=
163+
github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412 h1:vOVO0ypMfTt6tZacyI0kp+iCZb1XSNiYDqnzBWYgfe4=
164+
github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412/go.mod h1:AI9hp1tkp10pAlK5TCwL+7yWbRgtDm9jhToq6qij2xs=
163165
github.com/ahmetb/gen-crd-api-reference-docs v0.3.1-0.20210420163308-c1402a70e2f1/go.mod h1:TdjdkYhlOifCQWPs1UdTma97kQQMozf5h26hTuG70u8=
164166
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
165167
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
@@ -852,6 +854,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
852854
github.com/kubernetes-sigs/custom-metrics-apiserver v0.0.0-20210311094424-0ca2b1909cdc/go.mod h1:o4psv/D+LJC+NGyL66BoKWXLkzlJeUqhL6/3rjFKXw0=
853855
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
854856
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
857+
github.com/leaanthony/synx v0.1.0 h1:R0lmg2w6VMb8XcotOwAe5DLyzwjLrskNkwU7LLWsyL8=
858+
github.com/leaanthony/synx v0.1.0/go.mod h1:Iz7eybeeG8bdq640iR+CwYb8p+9EOsgMWghkSRyZcqs=
855859
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
856860
github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570/go.mod h1:BLt8L9ld7wVsvEWQbuLrUZnCMnUmLZ+CGDzKtclrTlE=
857861
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f/go.mod h1:UGmTpUd3rjbtfIpwAPrcfmGf/Z1HS95TATB+m57TPB8=
@@ -998,6 +1002,8 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ
9981002
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
9991003
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
10001004
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
1005+
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI=
1006+
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4=
10011007
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
10021008
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
10031009
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

0 commit comments

Comments
 (0)