Skip to content

Commit

Permalink
Merge pull request #3827 from prksu/add-capdo-in-capi-book
Browse files Browse the repository at this point in the history
📖 Add CAPDO quickstart in CAPI book
  • Loading branch information
k8s-ci-robot authored Oct 20, 2020
2 parents 1319d61 + 7d96ce2 commit be5ff75
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 19 deletions.
25 changes: 13 additions & 12 deletions docs/book/src/clusterctl/provider-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,19 @@ easier transition from `kubectl apply` to `clusterctl`.
As a reference you can consider the labels applied to the following
providers.

| Provider Name| Label |
|--------------|----------------------------------------------------|
|CAPI | cluster.x-k8s.io/provider=cluster-api |
|CABPK | cluster.x-k8s.io/provider=bootstrap-kubeadm |
|CACPK | cluster.x-k8s.io/provider=control-plane-kubeadm |
|CAPA | cluster.x-k8s.io/provider=infrastructure-aws |
|CAPV | cluster.x-k8s.io/provider=infrastructure-vsphere |
|CAPD | cluster.x-k8s.io/provider=infrastructure-docker |
|CAPM3 | cluster.x-k8s.io/provider=infrastructure-metal3 |
|CAPP | cluster.x-k8s.io/provider=infrastructure-packet |
|CAPZ | cluster.x-k8s.io/provider=infrastructure-azure |
|CAPO | cluster.x-k8s.io/provider=infrastructure-openstack |
| Provider Name| Label |
|--------------|--------------------------------------------------------|
|CAPI | cluster.x-k8s.io/provider=cluster-api |
|CABPK | cluster.x-k8s.io/provider=bootstrap-kubeadm |
|CACPK | cluster.x-k8s.io/provider=control-plane-kubeadm |
|CAPA | cluster.x-k8s.io/provider=infrastructure-aws |
|CAPV | cluster.x-k8s.io/provider=infrastructure-vsphere |
|CAPD | cluster.x-k8s.io/provider=infrastructure-docker |
|CAPM3 | cluster.x-k8s.io/provider=infrastructure-metal3 |
|CAPP | cluster.x-k8s.io/provider=infrastructure-packet |
|CAPZ | cluster.x-k8s.io/provider=infrastructure-azure |
|CAPO | cluster.x-k8s.io/provider=infrastructure-openstack |
|CAPDO | cluster.x-k8s.io/provider=infrastructure-digitalocean |

### Workload cluster templates

Expand Down
11 changes: 10 additions & 1 deletion docs/book/src/developer/tilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ for more details.
**kustomize_substitutions** (Map{String: String}, default={}): An optional map of substitutions for `${}`-style placeholders in the
provider's yaml.

{{#tabs name:"tab-tilt-kustomize-substitution" tabs:"AWS,Azure,GCP"}}
{{#tabs name:"tab-tilt-kustomize-substitution" tabs:"AWS,Azure,DigitalOcean,GCP"}}
{{#tab AWS}}

For example, if the yaml contains `${AWS_B64ENCODED_CREDENTIALS}`, you could do the following:
Expand Down Expand Up @@ -123,6 +123,15 @@ Add the output of the following as a section in your `tilt-settings.json`:
EOF
```
{{#/tab }}
{{#tab DigitalOcean}}
```json
"kustomize_substitutions": {
"DO_B64ENCODED_CREDENTIALS": "your credentials here"
}
```
{{#/tab }}
{{#tab GCP}}
Expand Down
3 changes: 3 additions & 0 deletions docs/book/src/reference/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Cluster API Bootstrap Provider Kubeadm
### CAPD
Cluster API Provider Docker

### CAPDO
Cluster API Provider DigitalOcean

### CAPG
Cluster API Google Cloud Provider

Expand Down
39 changes: 33 additions & 6 deletions docs/book/src/user/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ and `kubeadm` control-plane providers.
Depending on the infrastructure provider you are planning to use, some additional prerequisites should be satisfied
before getting started with Cluster API. See below for the expected settings for common providers.

{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,Docker,GCP,vSphere,OpenStack,Metal3,Packet"}}
{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,DigitalOcean,Docker,GCP,vSphere,OpenStack,Metal3,Packet"}}
{{#tab AWS}}

Download the latest binary of `clusterawsadm` from the [AWS provider releases] and make sure to place it in your path. You need at least version v0.5.5 for these instructions.
Expand Down Expand Up @@ -216,6 +216,18 @@ export AZURE_CLIENT_SECRET_B64="$(echo -n "$AZURE_CLIENT_SECRET" | base64 | tr -
clusterctl init --infrastructure azure
```

{{#/tab }}
{{#tab DigitalOcean}}

```bash
export DIGITALOCEAN_ACCESS_TOKEN=<your-access-token>
export DO_B64ENCODED_CREDENTIALS="$(echo -n "${DIGITALOCEAN_ACCESS_TOKEN}" | base64 | tr -d '\n')"

# Initialize the management cluster
clusterctl init --infrastructure digitalocean
```


{{#/tab }}
{{#tab Docker}}

Expand Down Expand Up @@ -362,7 +374,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
Otherwise, you can look at the `clusterctl config cluster` [command][clusterctl config cluster] documentation for details about how to
discover the list of variables required by a cluster templates.

{{#tabs name:"tab-configuration-infrastructure" tabs:"AWS,Azure,Docker,GCP,vSphere,OpenStack,Metal3,Packet"}}
{{#tabs name:"tab-configuration-infrastructure" tabs:"AWS,Azure,DigitalOcean,Docker,GCP,vSphere,OpenStack,Metal3,Packet"}}
{{#tab AWS}}

```bash
Expand All @@ -387,6 +399,21 @@ export AZURE_CONTROL_PLANE_MACHINE_TYPE="Standard_D2s_v3"
export AZURE_NODE_MACHINE_TYPE="Standard_D2s_v3"
```

{{#/tab }}
{{#tab DigitalOcean}}

A ClusterAPI compatible image must be available in your DigitalOcean account. For instructions on how to build a compatible image
see [image-builder](https://image-builder.sigs.k8s.io/capi/capi.html).

```bash
export DO_REGION=nyc1
export DO_SSH_KEY_FINGERPRINT=<your-ssh-key-fingerprint>
export DO_CONTROL_PLANE_MACHINE_TYPE=s-2vcpu-2gb
export DO_CONTROL_PLANE_MACHINE_IMAGE=<your-capi-image-id>
export DO_NODE_MACHINE_TYPE=s-2vcpu-2gb
export DO_NODE_MACHINE_IMAGE==<your-capi-image-id>
```

{{#/tab }}
{{#tab Docker}}

Expand Down Expand Up @@ -545,8 +572,8 @@ export WORKER_NODE_TYPE="t1.small"

For the purpose of this tutorial, we'll name our cluster capi-quickstart.

{{#tabs name:"tab-clusterctl-config-cluster" tabs:"Azure|AWS|GCP|vSphere|OpenStack|Metal3|Packet,Docker"}}
{{#tab Azure|AWS|GCP|vSphere|OpenStack|Metal3|Packet}}
{{#tabs name:"tab-clusterctl-config-cluster" tabs:"Azure|AWS|DigitalOcean|GCP|vSphere|OpenStack|Metal3|Packet,Docker"}}
{{#tab Azure|AWS|DigitalOcean|GCP|vSphere|OpenStack|Metal3|Packet}}

```bash
clusterctl config cluster capi-quickstart \
Expand Down Expand Up @@ -663,8 +690,8 @@ See [Additional Notes for the Docker Provider](../clusterctl/developers.md#addit

Calico is used here as an example.

{{#tabs name:"tab-deploy-cni" tabs:"AWS|Docker|GCP|vSphere|OpenStack|Metal3|Packet,Azure"}}
{{#tab AWS|Docker|GCP|vSphere|OpenStack|Metal3|Packet}}
{{#tabs name:"tab-deploy-cni" tabs:"AWS|DigitalOcean|Docker|GCP|vSphere|OpenStack|Metal3|Packet,Azure"}}
{{#tab AWS|DigitalOcean|Docker|GCP|vSphere|OpenStack|Metal3|Packet}}

```bash
kubectl --kubeconfig=./capi-quickstart.kubeconfig \
Expand Down

0 comments on commit be5ff75

Please sign in to comment.