Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Correction to Cluster Manager examples and Wercker Cluster readme for…
Browse files Browse the repository at this point in the history
…mat. (#8)
  • Loading branch information
klustria authored and honghzzhang committed Dec 12, 2017
1 parent 0ee626f commit f1bf014
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ deploy directory or may refer to the helm chart in the deploy directory.
examples.
```
kubectl --context $FEDERATION_HOST create -f ClusterOke.yaml
kubectl --context $FEDERATION_CONTEXT create -f ClusterOke.yaml
```
This command deploys the cluster in an offline state. To customize the Wercker cluster, change the parameters in `cluster-manager.n6s.io/cluster.config` annotation of cluster. Before deploying, you can modify *ClusterOke.yaml* or use `kubectl` annotate command. The supported parameters are
Expand All @@ -133,7 +133,7 @@ examples.
- At the end of the provisioning, the value of `n6s.io/cluster.lifecycle.state` will be changed either to `ready` if successful or `failed-up` if failed.
```
kubectl --context=$FEDERATION_HOST annotate cluster akube-oke n6s.io/cluster.lifecycle.state=pending-provision --overwrite
kubectl --context=$FEDERATION_CONTEXT annotate cluster akube-oke n6s.io/cluster.lifecycle.state=pending-provision --overwrite
```
### Provisioning an AWS Cluster
Expand All @@ -142,7 +142,7 @@ examples.
from examples.
```
kubectl --context $FEDERATION_HOST create -f ClusterAwsEast2.yaml
kubectl --context $FEDERATION_CONTEXT create -f ClusterAwsEast2.yaml
```
This command deploys the cluster in an offline state. To customize the AWS cluster, change the parameters in
Expand All @@ -164,7 +164,7 @@ from examples.
- At the end of the provisioning, the value of `n6s.io/cluster.lifecycle.state` will be changed either to `ready` if successful or `failed-up` if failed.
```
kubectl --context=$FEDERATION_HOST annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-provision --overwrite
kubectl --context=$FEDERATION_CONTEXT annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-provision --overwrite
```
### Scaling up an already provisioned cluster
Expand All @@ -178,8 +178,8 @@ from examples.
Here is an example of scaling up a previously provisioned `akube-us-east-2` AWS cluster by 5
```
kubectl --context=$FEDERATION_HOST annotate cluster akube-us-east-2 cluster-manager.n6s.io/cluster.scale-up-size=5 --overwrite && \
kubectl --context=$FEDERATION_HOST annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-up --overwrite
kubectl --context=$FEDERATION_CONTEXT annotate cluster akube-us-east-2 cluster-manager.n6s.io/cluster.scale-up-size=5 --overwrite && \
kubectl --context=$FEDERATION_CONTEXT annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-up --overwrite
```
### Scaling down an already provisioned cluster
Expand All @@ -193,8 +193,8 @@ Here is an example of scaling up a previously provisioned `akube-us-east-2` AWS
Here is an example of scaling down a previously provisioned `akube-us-east-2` AWS cluster by 5
```
kubectl --context=$FEDERATION_HOST annotate cluster akube-us-east-2 cluster-manager.n6s.io/cluster.scale-down-size=5 --overwrite && \
kubectl --context=$FEDERATION_HOST annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-down --overwrite
kubectl --context=$FEDERATION_CONTEXT annotate cluster akube-us-east-2 cluster-manager.n6s.io/cluster.scale-down-size=5 --overwrite && \
kubectl --context=$FEDERATION_CONTEXT annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-down --overwrite
```
### Shutting down a provisioned cluster
Expand All @@ -207,19 +207,19 @@ Here is an example of scaling down a previously provisioned `akube-us-east-2` AW
Here is an example of shutting down a previously provisioned `akube-us-east-2` AWS cluster
```
kubectl --context=$FEDERATION_HOST annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-shutdown --overwrite
kubectl --context=$FEDERATION_CONTEXT annotate cluster akube-us-east-2 n6s.io/cluster.lifecycle.state=pending-shutdown --overwrite
```
### Checking cluster status
- To check the status of a specific cluster, execute the command and note the value of `n6s.io/cluster.lifecycle.state` annotation.
```
kubectl --context=$FEDERATION_HOST get cluster <Cluster Name> -o yaml
kubectl --context=$FEDERATION_CONTEXT get cluster <Cluster Name> -o yaml
```
- To check the status of all the clusters, execute the command and note the value of `n6s.io/cluster.lifecycle.state` annotation for each of the clusters listed .
```
kubectl --context=$FEDERATION_HOST get clusters -o yaml
kubectl --context=$FEDERATION_CONTEXT get clusters -o yaml
```
6 changes: 3 additions & 3 deletions deploy/WerckerClustersParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ If you are using [Wercker Clusters](http://devcenter.wercker.com/docs/getting-st
1. When you use Wercker Clusters to create a new Kubernetes cluster, you specify Cloud Credentials to specify where you want to create the cluster. If you already have *Cloud Auth ID* and OKE_AUTH_GROUP in the **Clusters > Cloud Credentials** page in the Wercker cluster, you can use those credentials. If you have to create those IDs, then follow these steps:
<ol type="a">
<li>Go to https://app.wercker.com/clusters/cloud-credentials and select the Organization.</li>
<li>Click **New Cloud Credential Button**. </li>
<li>Click <B>New Cloud Credential Button</B>. </li>
<li>Enter a name.</li>
<li>Enter all your Oracle Cloud Infrastructure (OCI) tenancy specific information (User OCID, Tenancy OCID). You can get those information by logging in to [OCI](https://console.us-phoenix-1.oraclecloud.com/) and then by changing the Region, for example, change the region to *us-ashburn-1*. Navigate to Identity and note down the User OCID and also copy the Tenancy ID, which you will find at the bottom of any page in OCI.</li>
<li>For **Key Fingerprint** and **API Private Key (PEM Format)**, follow the instructions in https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.</li>
<li> Click **Create** and note down the Cloud Auth ID. The Cloud_Auth_ID is displayed in the Cloud Credentials page.</li>
<li>For <B>Key Fingerprint</B> and <B>API Private Key (PEM Format)</B>, follow the instructions in https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.</li>
<li> Click <B>Create</B> and note down the Cloud Auth ID. The Cloud_Auth_ID is displayed in the Cloud Credentials page.</li>
<li>In the Cloud Credentials page, note down the OKE_AUTH_GROUP, which is the ID displayed next to the Organization drop down list.
</ol>
1. Create a new Wercker authentication token if you do not have one, which will be used for *OKE_BEARER_TOKEN*. See [how to get a Wercker authentication token] (http://devcenter.wercker.com/docs/getting-started-with-wercker-releases#gettingtoken) for more details.
Expand Down

0 comments on commit f1bf014

Please sign in to comment.