replacing 'duplicate' with 'clone'

This commit is contained in:
Mark Bishop
2018-11-02 10:49:05 -07:00
parent a927570d32
commit bed345156b
@@ -1,13 +1,13 @@
---
title: Duplicating Clusters
title: Cloning Clusters
weight: 2400
---
If you have a cluster in Rancher that you want to use as a template for creating similar clusters, you can use Rancher CLI to duplicate the cluster's configuration, edit it, and then use it to quickly launch the duplicate cluster.
If you have a cluster in Rancher that you want to use as a template for creating similar clusters, you can use Rancher CLI to clone the cluster's configuration, edit it, and then use it to quickly launch the cloned cluster.
## Caveats
- Only [cluster types]({{< baseurl >}}/content/rancher/v2.x/en/cluster-provisioning) that interact with cloud hosts over API can be duplicated. Duplication of imported clusters and custom clusters provisioned using Docker machine is not supported.
- Only [cluster types]({{< baseurl >}}/content/rancher/v2.x/en/cluster-provisioning) that interact with cloud hosts over API can be cloned. Duplication of imported clusters and custom clusters provisioned using Docker machine is not supported.
| Cluster Type | Cloneable? |
| -------------------------------- | ------------- |
@@ -29,6 +29,8 @@ Download and install [Rancher CLI]({{< baseurl >}}/rancher/v2.x/en/cli). Remembe
## 1. Export Cluster Config
Begin by using Rancher CLI to export the configuration for the cluster that you want to clone.
1. Open Terminal and change your directory to the location of the Rancher CLI binary, `rancher`.
1. Enter the following command to list the clusters managed by Rancher.
@@ -45,17 +47,17 @@ Download and install [Rancher CLI]({{< baseurl >}}/rancher/v2.x/en/cli). Remembe
./rancher clusters export <RESOURCE_ID>
**Step Result:** The YAML for a duplicate cluster prints to Terminal.
**Step Result:** The YAML for a cloned cluster prints to Terminal.
1. Copy the YAML to your clipboard and paste it in a new file. Save the file as `cluster-template.yml` (or any other name, as long as it has a `.yml` extension).
## 2. Modify Cluster Config
Use your favorite text editor to modify the cluster configuration in `cluster-template.yml` for your duplicate cluster.
Use your favorite text editor to modify the cluster configuration in `cluster-template.yml` for your cloned cluster.
1. Open `cluster-template.yml` (or whatever you named your config) in your favorite test editor.
1. Open `cluster-template.yml` (or whatever you named your config) in your favorite text editor.
>**Warning:** Only edit the cluster config values explicitly called out below. Many of the values listed in this file are used to provision your duplicate cluster, and editing their values may break the provisioning process.
>**Warning:** Only edit the cluster config values explicitly called out below. Many of the values listed in this file are used to provision your cloned cluster, and editing their values may break the provisioning process.
1. As depicted in one of the examples below, at the `<CLUSTER_NAME>` placeholder, replace your original cluster's name with a unique name (`<CLUSTER_NAME>`). If your cloned cluster has a duplicate name, the cluster will not provision successfully.
@@ -144,10 +146,10 @@ clusters:
1. When you're done, save and close the configuration.
## 3. Launch Duplicate Cluster
## 3. Launch Cloned Cluster
Move `cluster-template.yml` into the same directory as the Rancher CLI binary. Then run this command:
./rancher up --file cluster-template.yml
**Result:** Your duplicate cluster begins provisioning. Enter `./rancher cluster ls` to confirm. You can also log into the Rancher UI and open the **Global** view to watch your provisioning cluster's progress.
**Result:** Your cloned cluster begins provisioning. Enter `./rancher cluster ls` to confirm. You can also log into the Rancher UI and open the **Global** view to watch your provisioning cluster's progress.