Skip to content

Commit

Permalink
Merge pull request #111 from vkareh/readme-command-updates
Browse files Browse the repository at this point in the history
README: Update based on output of newer commands
  • Loading branch information
vkareh authored Sep 24, 2020
2 parents 47a650f + 92a3a93 commit 5d1ce9c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ Verify your installation by running the following command:

```
$ moactl
Command line tool for MOA.
Usage:
Expand All @@ -117,15 +116,17 @@ Available Commands:
create Create a resource from stdin
delete Delete a specific resource
describe Show details of a specific resource
download Download necessary tools for using your cluster
edit Edit a specific resource
help Help about any command
init Applies templates to support Managed OpenShift on AWS clusters
list List all resources of a specific type
login Log in to your Red Hat account
logout Log out
logs Show logs of a specific resource
logs Show installation or uninstallation logs for a cluster
verify Verify resources are configured correctly for cluster install
version Prints the version of the tool
whoami Displays user account information
Flags:
--debug Enable debug mode.
Expand Down Expand Up @@ -156,7 +157,7 @@ I: AWS SCP policies ok
Verify that your AWS account has the necessary quota to deploy an OpenShift cluster. Sometimes quota varies by region, which may prevent you from deploying:

```
$ export AWS_DEFAULT_REGION=us-west-2 && moactl verify quota
$ moactl verify quota --region=us-west-2
I: Validating AWS quota...
E: Insufficient AWS quotas
Expand All @@ -165,7 +166,7 @@ E: Service ec2 quota code L-0263D0A3 Number of EIPs - VPC EIPs not valid, expect

If needed, try another region:
```
$ export AWS_DEFAULT_REGION=us-east-2 && moactl verify quota
$ moactl verify quota --region=us-east-2
I: Validating AWS quota...
I: AWS quota ok
Expand Down Expand Up @@ -229,20 +230,19 @@ I: AWS quota ok
I: Ensuring cluster administrator user 'osdCcsAdmin'...
I: Admin user 'osdCcsAdmin' created successfuly!
I: Verifying whether OpenShift command-line tool is available...
E: OpenShift command-line tool is not installed.
Go to https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/ to download the OpenShift client and add it to your PATH.
W: OpenShift command-line tool is not installed.
Run 'moactl download oc' to download the latest version, then add it to your PATH.
```

> NOTE
> If you have not already installed the OpenShift Command Line Utility, also known as `oc`, follow the link in the output to install it now.
> If you have not already installed the OpenShift Command Line Utility, also known as `oc`, run the command in the output to download it now.
## Creating your cluster

To view all of the available options when creating a cluster, run the following command:

```
$ moactl create cluster --help
Create cluster.
Usage:
Expand All @@ -257,17 +257,18 @@ Examples:
Flags:
-c, --cluster-name string Name of the cluster. This will be used when generating a sub-domain for your cluster on openshiftapps.com.
--multi-az Deploy to multiple data centers.
-r, --region string AWS region where your worker pool will be located. (overrides the AWS_REGION environment variable)
--version string Version of OpenShift that will be used to install the cluster, for example "4.3.10"
--multi-az Deploy to multiple data centers.
--compute-machine-type string Instance type for the compute nodes. Determines the amount of memory and vCPU allocated to each compute node.
--compute-nodes int Number of worker nodes to provision per zone. Single zone clusters need at least 4 nodes, while multizone clusters need at least 9 nodes (3 per zone) for resiliency.
--compute-nodes int Number of worker nodes to provision per zone. Single zone clusters need at least 4 nodes, multizone clusters need at least 9 nodes. (default 4)
--machine-cidr ipNet Block of IP addresses used by OpenShift while installing the cluster, for example "10.0.0.0/16".
--service-cidr ipNet Block of IP addresses for services, for example "172.30.0.0/16".
--pod-cidr ipNet Block of IP addresses from which Pod IP addresses are allocated, for example "10.128.0.0/14".
--host-prefix int Subnet prefix length to assign to each individual node. For example, if host prefix is set to "23", then each node is assigned a /23 subnet out of the given CIDR.
--private Restrict master API endpoint and application routes to direct, private connectivity.
--watch Watch cluster installation logs.
--use-paid-ami Whether to use the paid AMI from AWS. Requires a valid subscription to the MOA Product.
-h, --help help for cluster
Global Flags:
Expand Down Expand Up @@ -505,7 +506,7 @@ Run the following command to delete your cluster, replacing `<my-cluster>` with
moactl delete cluster -c <my-cluster>
```

To clean up your CloudFormation stack (this was created when you ran `moactl init`), run the following command:
Once the cluster is uninstalled, you can clean up your CloudFormation stack (this was created when you ran `moactl init`) by running the following command:

```
moactl init --delete-stack
Expand Down
10 changes: 4 additions & 6 deletions cmd/verify/oc/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package oc

import (
"fmt"
"os/exec"
"regexp"
"strings"
Expand All @@ -42,12 +41,11 @@ func run(_ *cobra.Command, _ []string) {

// Verify whether `oc` is installed
reporter.Infof("Verifying whether OpenShift command-line tool is available...")
ocDownloadURL := "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest"

output, err := exec.Command("oc", "version").Output()
if output == nil && err != nil {
reporter.Warnf("OpenShift command-line tool is not installed.\n"+
"Go to %s to download the OpenShift client and add it to your PATH.", ocDownloadURL)
reporter.Warnf("OpenShift command-line tool is not installed.\n" +
"Run 'moactl download oc' to download the latest version, then add it to your PATH.")
return
}

Expand All @@ -61,8 +59,8 @@ func run(_ *cobra.Command, _ []string) {

if !isCorrectVersion {
reporter.Warnf("Current OpenShift %s", version)
reporter.Warnf("Your version of the OpenShift command-line tool is not supported.")
fmt.Printf("Go to %s to download the latest version.\n", ocDownloadURL)
reporter.Warnf("Your version of the OpenShift command-line tool is not supported.\n" +
"Run 'moactl download oc' to download the latest version, then add it to your PATH.")
return
}

Expand Down

0 comments on commit 5d1ce9c

Please sign in to comment.