|
1 | 1 | # 
|
2 | 2 |
|
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). |
4 | 4 |
|
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. |
6 | 6 |
|
7 | 7 | ## Main commands
|
8 | 8 | The main commands supported by the CLI are:
|
9 | 9 | - 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. |
14 | 14 | - get: prints a table of the most important information about the specified function.
|
15 | 15 | - 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. |
18 | 18 |
|
19 | 19 | ## Getting started
|
20 | 20 |
|
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. |
22 | 22 |
|
23 | 23 | ### Use ofn to deploy OpenFunction
|
24 | 24 |
|
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`. |
26 | 26 |
|
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. |
28 | 28 |
|
29 |
| -Please refer to the [ofn install docs](docs/install.md). |
| 29 | +For more information, refer to the [ofn install document](docs/install.md). |
30 | 30 |
|
31 | 31 | ```shell
|
32 |
| -# ofn install --all --upgrade |
| 32 | +# ofn install --all |
33 | 33 | Start installing OpenFunction and its dependencies.
|
34 |
| -Here are the components and corresponding versions to be installed: |
| 34 | +The following components will be installed: |
35 | 35 | +------------------+---------+
|
36 | 36 | | COMPONENT | VERSION |
|
37 | 37 | +------------------+---------+
|
| 38 | +| Knative Serving | 1.0.1 | |
| 39 | +| Tekton Pipelines | 0.30.0 | |
| 40 | +| OpenFunction | 0.5.0 | |
38 | 41 | | Kourier | 1.0.1 |
|
| 42 | +| DefaultDomain | 1.0.1 | |
39 | 43 | | Keda | 2.4.0 |
|
40 |
| -| Tekton Pipelines | 0.30.0 | |
41 |
| -| OpenFunction | 0.4.0 | |
| 44 | +| CertManager | 1.5.4 | |
42 | 45 | | Dapr | 1.5.1 |
|
43 |
| -| CertManager | 1.1.0 | |
44 | 46 | | Shipwright | 0.6.1 |
|
45 |
| -| Knative Serving | 1.0.1 | |
46 |
| -| DefaultDomain | 1.0.1 | |
| 47 | +| IngressNginx | 1.1.0 | |
47 | 48 | +------------------+---------+
|
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 | +╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ |
77 | 71 | ```
|
78 | 72 |
|
79 | 73 | ### Use ofn to uninstall OpenFunction
|
80 | 74 |
|
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`. |
82 | 76 |
|
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). |
84 | 78 |
|
85 |
| -Please refer to the [ofn uninstall docs](docs/uninstall.md). |
| 79 | +For more information, refer to the [ofn uninstall document](docs/uninstall.md). |
86 | 80 |
|
87 | 81 | ```shell
|
88 |
| -~# ofn uninstall --all |
| 82 | +~# ofn uninstall --all -y |
89 | 83 | Start uninstalling OpenFunction and its dependencies.
|
90 | 84 | The following components already exist:
|
91 | 85 | +------------------+---------+
|
92 | 86 | | COMPONENT | VERSION |
|
93 | 87 | +------------------+---------+
|
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 | |
100 | 93 | | 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 | |
102 | 98 | +------------------+---------+
|
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. |
123 | 108 | ```
|
124 | 109 |
|
125 | 110 | ### Build OpenFunction CLI
|
126 | 111 |
|
127 |
| -You can also use `make build` to build the OpenFunction CLI —— `ofn`. |
| 112 | +To build the OpenFunction CLI——`ofn`, run `make build`. |
128 | 113 | 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. |
130 | 115 |
|
131 | 116 | ```shell
|
132 | 117 | ~# make build
|
|
0 commit comments