Skip to content

Commit

Permalink
Use hydroform installation package (kyma-project#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Suleyman Akbas authored Jun 16, 2020
1 parent 8c27f51 commit 211dd33
Show file tree
Hide file tree
Showing 40 changed files with 344 additions and 858 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Kyma CLI is a command line tool which supports [Kyma](https://github.com/kyma-pr

Kyma CLI requires the following software:

- [kubectl](https://github.com/kubernetes/kubectl)
- [Minikube](https://github.com/kubernetes/minikube)

## Installation
Expand Down Expand Up @@ -67,6 +66,7 @@ choco install kyma-cli
### Other

To install a different release, change the path to point to the desired version and architecture:

```bash
curl -Lo kyma.tar.gz https://github.com/kyma-project/cli/releases/download/${KYMA_VERSION}/kyma_${ARCH}.tar.gz
```
Expand Down Expand Up @@ -94,9 +94,9 @@ kyma install --source=latest

### Commands

Kyma CLI comes with a set of commands, each of which has its own specific set of flags.
Kyma CLI comes with a set of commands, each of which has its own specific set of flags.

>**NOTE:** For the full list of commands and flags, see [this](https://github.com/kyma-project/cli/tree/master/docs/gen-docs) document.
>**NOTE:** For the full list of commands and flags, see [this](https://github.com/kyma-project/cli/tree/master/docs/gen-docs) document.
| Command | Child commands | Description | Example |
|--------------------|----------------|---------------|---------|
Expand Down
9 changes: 3 additions & 6 deletions cmd/kyma/install/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ Before you use the command, make sure your setup meets the following prerequisit
* Kyma is not installed.
* Kubernetes cluster is available with your kubeconfig file already pointing to it.
* Helm binary is available (optional).
Here are the installation steps:
The standard installation uses the minimal configuration. The system performs the following steps:
1. Fetches the ` + "`tiller.yaml`" + ` file from the ` + "`/installation/resources`" + ` directory and deploys it to the cluster.
2. Deploys and configures the Kyma Installer. At this point, steps differ depending on the installation type.
1. Deploys and configures the Kyma Installer. At this point, steps differ depending on the installation type.
When you install Kyma locally ` + "**from release**" + `, the system:
1. Fetches the latest or specified release along with configuration.
Expand All @@ -85,8 +83,7 @@ The standard installation uses the minimal configuration. The system performs th
5. Sets the admin password.
6. Patches the Minikube IP.
3. Configures Helm. If installed, Helm is automatically configured using certificates from Tiller. This step is optional.
4. Runs Kyma installation until the ` + "**installed**" + ` status confirms the successful installation. You can override the standard installation settings using the ` + "`--override`" + ` flag.
2. Runs Kyma installation until the ` + "**installed**" + ` status confirms the successful installation. You can override the standard installation settings using the ` + "`--override`" + ` flag.
`,
RunE: func(_ *cobra.Command, _ []string) error { return cmd.Run() },
Expand Down Expand Up @@ -118,7 +115,7 @@ func (cmd *command) Run() error {
}

var err error
if cmd.K8s, err = kube.NewFromConfig("", cmd.KubeconfigPath); err != nil {
if cmd.K8s, err = kube.NewFromConfigWithTimeout("", cmd.KubeconfigPath, cmd.opts.Timeout); err != nil {
return errors.Wrap(err, "Could not initialize the Kubernetes client. Make sure your kubeconfig is valid")
}

Expand Down
8 changes: 4 additions & 4 deletions cmd/kyma/provision/minikube/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ func (c *command) Run() error {
}
s.Successf("Minikube status verified")

s = c.NewStep(fmt.Sprintf("Initializing Minikube config"))
s = c.NewStep("Initializing Minikube config")
err = c.initializeMinikubeConfig()
if err != nil {
s.Failure()
return err
}
s.Successf("Minikube config initialized")

s = c.NewStep(fmt.Sprintf("Create Minikube instance"))
s = c.NewStep("Create Minikube instance")
s.Status("Start Minikube")
err = c.startMinikube()
if err != nil {
Expand Down Expand Up @@ -138,7 +138,7 @@ func (c *command) Run() error {
}
s.Successf("Minikube up and running")

s = c.NewStep(fmt.Sprintf("Adjusting Minikube cluster"))
s = c.NewStep("Adjusting Minikube cluster")
s.Status("Increase fs.inotify.max_user_instances")
err = c.increaseFsInotifyMaxUserInstances()
if err != nil {
Expand All @@ -153,7 +153,7 @@ func (c *command) Run() error {
}
s.Successf("Adjustments finished")

s = c.NewStep(fmt.Sprintf("Creating cluster info ConfigMap"))
s = c.NewStep("Creating cluster info ConfigMap")
err = c.createClusterInfoConfigMap()
if err != nil {
s.Failure()
Expand Down
2 changes: 2 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (

"github.com/kyma-project/cli/cmd/kyma"
"github.com/kyma-project/cli/internal/cli"

_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ For more information, see: https://github.com/kyma-project/cli
* [kyma test](kyma_test.md) - Runs tests on a provisioned Kyma cluster.
* [kyma version](kyma_version.md) - Displays the version of Kyma CLI and the connected Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ kyma completion bash|zsh [flags]

* [kyma](kyma.md) - Controls a Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_console.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ kyma console [flags]

* [kyma](kyma.md) - Controls a Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
9 changes: 3 additions & 6 deletions docs/gen-docs/kyma_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ Before you use the command, make sure your setup meets the following prerequisit

* Kyma is not installed.
* Kubernetes cluster is available with your kubeconfig file already pointing to it.
* Helm binary is available (optional).

Here are the installation steps:

The standard installation uses the minimal configuration. The system performs the following steps:
1. Fetches the `tiller.yaml` file from the `/installation/resources` directory and deploys it to the cluster.
2. Deploys and configures the Kyma Installer. At this point, steps differ depending on the installation type.
1. Deploys and configures the Kyma Installer. At this point, steps differ depending on the installation type.

When you install Kyma locally **from release**, the system:
1. Fetches the latest or specified release along with configuration.
Expand All @@ -36,8 +34,7 @@ The standard installation uses the minimal configuration. The system performs th
5. Sets the admin password.
6. Patches the Minikube IP.

3. Configures Helm. If installed, Helm is automatically configured using certificates from Tiller. This step is optional.
4. Runs Kyma installation until the **installed** status confirms the successful installation. You can override the standard installation settings using the `--override` flag.
2. Runs Kyma installation until the **installed** status confirms the successful installation. You can override the standard installation settings using the `--override` flag.



Expand Down Expand Up @@ -79,4 +76,4 @@ kyma install [flags]

* [kyma](kyma.md) - Controls a Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Provisions a cluster for Kyma installation.
* [kyma provision gke](kyma_provision_gke.md) - Provisions a Google Kubernetes Engine (GKE) cluster on Google Cloud Platform (GCP).
* [kyma provision minikube](kyma_provision_minikube.md) - Provisions Minikube.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision_aks.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ kyma provision aks [flags]

* [kyma provision](kyma_provision.md) - Provisions a cluster for Kyma installation.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision_gardener.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Provisions a cluster using Gardener on GCP, Azure, or AWS.
* [kyma provision gardener az](kyma_provision_gardener_az.md) - Provisions a Kubernetes cluster using Gardener on Azure.
* [kyma provision gardener gcp](kyma_provision_gardener_gcp.md) - Provisions a Kubernetes cluster using Gardener on Google Cloud Platform (GCP).

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision_gardener_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ kyma provision gardener aws [flags]

* [kyma provision gardener](kyma_provision_gardener.md) - Provisions a cluster using Gardener on GCP, Azure, or AWS.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision_gardener_az.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ kyma provision gardener az [flags]

* [kyma provision gardener](kyma_provision_gardener.md) - Provisions a cluster using Gardener on GCP, Azure, or AWS.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision_gardener_gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ kyma provision gardener gcp [flags]

* [kyma provision gardener](kyma_provision_gardener.md) - Provisions a cluster using Gardener on GCP, Azure, or AWS.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision_gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ kyma provision gke [flags]

* [kyma provision](kyma_provision.md) - Provisions a cluster for Kyma installation.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_provision_minikube.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ kyma provision minikube [flags]

* [kyma provision](kyma_provision.md) - Provisions a cluster for Kyma installation.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Use this command to run tests on a provisioned Kyma cluster.
* [kyma test run](kyma_test_run.md) - Runs tests on a Kyma cluster.
* [kyma test status](kyma_test_status.md) - Shows the status of a test suite and related test executions.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_test_definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ kyma test definitions [flags]

* [kyma test](kyma_test.md) - Runs tests on a provisioned Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_test_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ kyma test delete <test-suite-1> <test-suite-2> ... <test-suite-N> [flags]

* [kyma test](kyma_test.md) - Runs tests on a provisioned Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_test_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ kyma test list [flags]

* [kyma test](kyma_test.md) - Runs tests on a provisioned Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_test_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ kyma test logs <test-suite-1> <test-suite-2> ... <test-suite-N> [flags]

* [kyma test](kyma_test.md) - Runs tests on a provisioned Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_test_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ kyma test run <test-definition-1> <test-definition-2> ... <test-definition-N> [f

* [kyma test](kyma_test.md) - Runs tests on a provisioned Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_test_status.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ kyma test status <test-suite-1> <test-suite-2> ... <test-suite-N> [flags]

* [kyma test](kyma_test.md) - Runs tests on a provisioned Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ kyma version [flags]

* [kyma](kyma.md) - Controls a Kyma cluster.

###### Auto generated by spf13/cobra on 7-May-2020
###### Auto generated by spf13/cobra on 12-Jun-2020
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ require (
github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995 // indirect
github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/kyma-incubator/hydroform/install v0.0.0-20200608065102-102f8232317b
github.com/kyma-incubator/hydroform/provision v0.0.0-20200528121905-83605518328f
github.com/kyma-incubator/octopus v0.0.0-20191009105757-2e9d86cd9967
github.com/kyma-project/kyma v0.5.1-0.20190909070658-69599d4a33a2
github.com/kyma-project/kyma v0.5.1-0.20191106070956-5aa08d114ca0
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.10 // indirect
github.com/mitchellh/mapstructure v1.1.2
Expand Down
Loading

0 comments on commit 211dd33

Please sign in to comment.