Skip to content

Add fn install & fn uninstall command - #5

Merged
benjaminhuo merged 4 commits into
OpenFunction:mainfrom
tpiperatgod:main
Dec 1, 2021
Merged

benjaminhuo merged 4 commits into
OpenFunction:mainfrom
tpiperatgod:main

Conversation

@tpiperatgod

Copy link
Copy Markdown
Member

Add fn install & fn uninstall command

Signed-off-by: laminar [email protected]

@tpiperatgod tpiperatgod linked an issue Nov 30, 2021 that may be closed by this pull request
Signed-off-by: laminar <[email protected]>
Signed-off-by: laminar <[email protected]>
@tpiperatgod
tpiperatgod marked this pull request as ready for review November 30, 2021 07:04
@tpiperatgod tpiperatgod changed the title [WIP]Add fn install & fn uninstall command Add fn install & fn uninstall command Nov 30, 2021
@tpiperatgod

Copy link
Copy Markdown
Member Author

Here are two examples of install and uninstall:

fn install

# fn install --all --upgrade
Start installing OpenFunction and its dependencies.
Here are the components and corresponding versions to be installed for this installation:
+------------------+---------+
| COMPONENT        | VERSION |
+------------------+---------+
| Keda             | 2.4.0   |
| Knative Serving  | 0.26.0  |
| Cert Manager     | v1.5.4  |
| Ingress Nginx    | 1.1.0   |
| Tekton Pipelines | v0.28.1 |
| Shipwright       | 0.6.0   |
| OpenFunction     | v0.4.0  |
| Dapr             | 1.4.3   |
+------------------+---------+
The following components already exist in the current cluster:
+------------------+---------+
| COMPONENT        | VERSION |
+------------------+---------+
| Keda             |         |
| Knative Serving  |         |
| Ingress Nginx    |         |
| Cert Manager     |         |
| Tekton Pipelines |         |
| Dapr             |         |
+------------------+---------+
You can see the list of components to be installed and the list of components already exist in the cluster.
You have used the `--upgrade` parameter, which means that the installation process will overwrite the components that already exist in the cluster.
Make sure you know what happens when you do this.
Enter 'y' to continue and 'n' to abort:
-> y
🔄  -> INGRESS <- Installing Ingress...
🔄  -> KNATIVE <- Installing Knative Serving...
🔄  -> DAPR <- Installing Dapr...
🔄  -> DAPR <- Downloading Dapr Cli binary...
🔄  -> KEDA <- Installing Keda...
🔄  -> CERTMANAGER <- Installing Cert Manager...
🔄  -> SHIPWRIGHT <- Installing Shipwright...
🔄  -> INGRESS <- Checking if Ingress is ready...
🔄  -> KEDA <- Checking if Keda is ready...
🔄  -> CERTMANAGER <- Checking if Cert Manager is ready...
🔄  -> SHIPWRIGHT <- Checking if Shipwright is ready...
🔄  -> KNATIVE <- Installing Kourier as Knative's gateway...
🔄  -> KNATIVE <- Configuring Knative Serving's DNS...
🔄  -> KNATIVE <- Checking if Knative Serving is ready...
✅  -> CERTMANAGER <- Done!
🔄  -> DAPR <- Initializing Dapr with Kubernetes mode...
✅  -> SHIPWRIGHT <- Done!
✅  -> KNATIVE <- Done!
✅  -> INGRESS <- Done!
✅  -> DAPR <- Done!
✅  -> KEDA <- Done!
🔄  -> OPENFUNCTION <- Installing OpenFunction...
🔄  -> OPENFUNCTION <- Checking if OpenFunction is ready...
✅  -> OPENFUNCTION <- Done!
🚀 Completed in 2m3.638035129s.

fn uninstall

~# fn uninstall --all
Start uninstalling OpenFunction and its dependencies.
Here are the components and corresponding versions to be uninstalled for this installation:
+------------------+---------+
| COMPONENT        | VERSION |
+------------------+---------+
| Cert Manager     | v1.5.4  |
| Ingress Nginx    | 1.1.0   |
| Tekton Pipelines | v0.28.1 |
| Shipwright       | 0.6.0   |
| OpenFunction     | v0.4.0  |
| Dapr             | 1.4.3   |
| Keda             | 2.4.0   |
| Knative Serving  | 0.26.0  |
+------------------+---------+
You can see the list of components to be installed and the list of components already exist in the cluster.
You have used the `--upgrade` parameter, which means that the installation process will overwrite the components that already exist in the cluster.
Make sure you know what happens when you do this.
Enter 'y' to continue and 'n' to abort:
-> y
🔄  -> OPENFUNCTION <- Uninstalling OpenFunction...
🔄  -> KNATIVE <- Uninstalling Knative Serving...
🔄  -> DAPR <- Uninstalling Dapr with Kubernetes mode...
🔄  -> KEDA <- Uninstalling Keda...
🔄  -> SHIPWRIGHT <- Uninstalling Tekton Pipeline & Shipwright...
🔄  -> INGRESS <- Uninstalling Ingress...
🔄  -> CERTMANAGER <- Uninstalling Cert Manager...
✅  -> OPENFUNCTION <- Done!
✅  -> DAPR <- Done!
🔄  -> KNATIVE <- Uninstalling Kourier...
✅  -> KEDA <- Done!
✅  -> CERTMANAGER <- Done!
✅  -> KNATIVE <- Done!
✅  -> INGRESS <- Done!
✅  -> SHIPWRIGHT <- Done!
🚀 Completed in 1m21.683329262s.

@tpiperatgod

Copy link
Copy Markdown
Member Author

And provide make build command to build fn binary. The fn binary can be found in the ./dist directory.

~# make build
go fmt ./...
/opt/openfunction/fn-cli/bin/goimports -w cmd/ pkg/ testdata/
go vet ./...
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build  -ldflags "-s -w -X 'main.goversion=go version go1.16.7 linux/amd64'" \
-o ./dist/fn_linux_amd64 cmd/main.go;

Comment thread pkg/dependency/linux/linux.go Outdated
Signed-off-by: laminar <[email protected]>
Comment thread docs/install.md Outdated
Comment thread docs/install.md Outdated
Comment thread pkg/cmd/subcommand/install.go Outdated
@benjaminhuo
benjaminhuo merged commit bedd766 into OpenFunction:main Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Optimized installation approach

3 participants