Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
Azure getting started (#1233)
Browse files Browse the repository at this point in the history
* Azure getting started

* azure-getting started

* azure getting started

* Update getting-started-standalone.md

* azure getting started

* azure - getting started

* azure getting started

* azure getting started

* azure getting started

* azure standalone install

* adding outputs for get nodes and cluster get
  • Loading branch information
kcoriordan authored Aug 6, 2021
1 parent 528345b commit cb548bc
Show file tree
Hide file tree
Showing 9 changed files with 231 additions and 20 deletions.
6 changes: 3 additions & 3 deletions docs/site/content/docs/assets/aws-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Amazon EC2.

* Set the instance type size to m5.xlarge or larger for both the control plane node and worker node.

* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments.
* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments. For more information about enabling Identity Management, see [Identity Management ](aws-install-mgmt/#step-6-identity-management).

1. Validate the management cluster started successfully.

Expand Down Expand Up @@ -91,7 +91,7 @@ Amazon EC2.
> ``<MGMT-CONFIG-FILE>`` is the name of the management cluster YAML config file
> This step duplicates the configuration file that was created when you deployed your management cluster. The configuration file will either have the name you assigned to the management cluster, or if no name was assigned, it will be randomly generated name.
> This step duplicates the configuration file that was created when you deployed your management cluster. The configuration file will either have the name you assigned to the management cluster, or if no name was assigned, it will be a randomly generated name.
> This duplicated file will be used as the configuration file for your workload cluster. You can edit the parameters in this new file as required. For an example of a workload cluster template, see [Amazon EC2 Workload Cluster Template](../aws-wl-template).
Expand All @@ -111,7 +111,7 @@ Amazon EC2.
CLUSTER_PLAN: dev
```
#### Note
* If you did not specify a name for your management cluster, the installer generated a unique name, in this case, you must manually add the CLUSTER_NAME parameter and assign a workload cluster name.
* If you did not specify a name for your management cluster, the installer generated a random unique name. In this case, you must manually add the CLUSTER_NAME parameter and assign a workload cluster name.
* If you specified a name for your management cluster, the CLUSTER_NAME parameter is present and needs to be changed to the new workload cluster name.
> The other parameters in ``workload1.yaml`` are likely fine as-is. However, you can change them as required. Reference an example configuration template here: [Amazon EC3 Workload Cluster Template](../aws-wl-template).
Expand Down
155 changes: 155 additions & 0 deletions docs/site/content/docs/assets/azure-clusters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
## Create Microsoft Azure Clusters

This section describes setting up management and workload clusters for
Microsoft Azure.

1. Initialize the Tanzu kickstart UI.

```sh
tanzu management-cluster create --ui
```

1. Go through the installation process for Azure. With the following
considerations:


* In Management Cluster Settings, use the Instance type drop-down menu to select from different combinations of CPU, RAM, and storage for the control plane node VM or VMs. The minimum configuration is 2 CPUs and 8 GB memory

* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments. For more information about enabling Identity Management, see [Identity Management](../azure-install-mgmt/#step-5-identity-management).

2. Validate the management cluster started successfully.

```sh
tanzu management-cluster get
NAME NAMESPACE STATUS CONTROLPLANE WORKERS KUBERNETES ROLES
mgmtclusterone tkg-system running 1/1 1/1 v1.21.2+vmware.1 management
Details:
NAME READY SEVERITY REASON SINCE MESSAGE
/mgmtclusterone True 67s
├─ClusterInfrastructure - AzureCluster/mgmtclusterone True 69s
├─ControlPlane - KubeadmControlPlane/mgmtclusterone-control-plane True 67s
│ └─Machine/mgmtclusterone-control-plane-4hszz True 68s
└─Workers
└─MachineDeployment/mgmtclusterone-md-0
└─Machine/mgmtclusterone-md-0-85b4bc7c6d-mbj7j True 68s
Providers:
NAMESPACE NAME TYPE PROVIDERNAME VERSION WATCHNAMESPACE
capi-kubeadm-bootstrap-system bootstrap-kubeadm BootstrapProvider kubeadm v0.3.22
capi-kubeadm-control-plane-system control-plane-kubeadm ControlPlaneProvider kubeadm v0.3.22
capi-system cluster-api CoreProvider cluster-api v0.3.22
capz-system infrastructure-azure InfrastructureProvider azure v0.4.15
```
3. Create a cluster name that will be used throughout this Getting Started guide. This instance of `MGMT_CLUSTER_NAME` should be set to whatever value is returned by `tanzu management-cluster get` in the previous step.

```sh
export MGMT_CLUSTER_NAME="<INSERT_MGMT_CLUSTER_NAME_HERE>"
export WORKLOAD_CLUSTER_NAME="<INSERT_WORKLOAD_CLUSTER_NAME_HERE>"
```

4. Capture the management cluster's kubeconfig.
```sh
tanzu management-cluster kubeconfig get ${MGMT_CLUSTER_NAME} --admin
Credentials of workload cluster 'mtce' have been saved
You can now access the cluster by running 'kubectl config use-context mtce-admin@mtce'
```
> Note the context name `${MGMT_CLUSTER_NAME}-admin@${MGMT_CLUSTER_NAME}`, you'll use the above command in
> future steps.

5. Set your kubectl context to the management cluster.

```sh
kubectl config use-context ${MGMT_CLUSTER_NAME}-admin@${MGMT_CLUSTER_NAME}
```

6. Validate you can access the management cluster's API server.
```sh
kubectl get nodes
NAME STATUS ROLES AGE VERSION
standalonedelete-control-plane-9ndzx Ready control-plane,master 3m36s v1.21.2+vmware.1
standalonedelete-md-0-7hvll Ready <none> 113s v1.21.2+vmware.1
```
7. Next you will create a workload cluster. First, setup a workload cluster config file.
```sh
cp ~/.tanzu/tkg/clusterconfigs/<MGMT-CONFIG-FILE> ~/.tanzu/tkg/clusterconfigs/workload1.yaml
```
> ``<MGMT-CONFIG-FILE>`` is the name of the management cluster YAML config file
> This step duplicates the configuration file that was created when you deployed your management cluster. The configuration file will either have the name you assigned to the management cluster, or if no name was assigned, it will be a randomly generated name.
> This duplicated file will be used as the configuration file for your workload cluster. You can edit the parameters in this new file as required. For an example of a workload cluster template, see [Azure Workload Cluster Template](../azure-wl-template).
[](ignored)
> In the next two steps you will edit the parameters in this new file (`workload1`) and then use the file to deploy a workload cluster.
[](ignored)
8. In the new workload cluster file (`~/.config/tanzu/tkg/clusterconfigs/workload1.yaml`), edit the CLUSTER_NAME parameter to assign a name to your workload cluster. For example,
```yaml
CLUSTER_CIDR: 100.96.0.0/11
CLUSTER_NAME: my-workload-cluster
CLUSTER_PLAN: dev
```
#### Note
* If you did not specify a name for your management cluster, the installer generated a random unique name. In this case, you must manually add the CLUSTER_NAME parameter and assign a workload cluster name.
* If you specified a name for your management cluster, the CLUSTER_NAME parameter is present and needs to be changed to the new workload cluster name.
> The other parameters in ``workload1.yaml`` are likely fine as-is. However, you can change them as required. Reference an example configuration template here: [Amazon EC3 Workload Cluster Template](../aws-wl-template).
> Validation is performed on the file prior to applying it, so the `tanzu` command will return a message if something necessary is omitted.
9. Create your workload cluster.
```sh
tanzu cluster create ${WORKLOAD_CLUSTER_NAME} --file ~/.tanzu/tkg/clusterconfigs/workload1.yaml
```
10. Validate the cluster starts successfully.
```sh
tanzu cluster list
```
11. Capture the workload cluster's kubeconfig.

```sh
tanzu cluster kubeconfig get ${WORKLOAD_CLUSTER_NAME} --admin
```

12. Set your `kubectl` context accordingly.

```sh
kubectl config use-context ${WORKLOAD_CLUSTER_NAME}-admin@${WORKLOAD_CLUSTER_NAME}
```

13. Verify you can see pods in the cluster.

```sh
kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system antrea-agent-9d4db 2/2 Running 0 3m42s
kube-system antrea-agent-vkgt4 2/2 Running 1 5m48s
kube-system antrea-controller-5d594c5cc7-vn5gt 1/1 Running 0 5m49s
kube-system coredns-5d6f7c958-hs6vr 1/1 Running 0 5m49s
kube-system coredns-5d6f7c958-xf6cl 1/1 Running 0 5m49s
kube-system etcd-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s
kube-system kube-apiserver-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s
kube-system kube-controller-manager-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s
kube-system kube-proxy-9825q 1/1 Running 0 5m48s
kube-system kube-proxy-wfktm 1/1 Running 0 3m42s
kube-system kube-scheduler-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s
```
41 changes: 41 additions & 0 deletions docs/site/content/docs/assets/azure-standalone-clusters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Create Standalone Azure Clusters

This section covers setting up a standalone cluster in Azure. A standalone cluster provides a workload cluster that is **not** managed by a centralized management cluster.

1. Initialize the Tanzu kickstart UI.

```sh
tanzu standalone-cluster create --ui
```

1. Go through the configuration steps, considering the following.


* In Management Cluster Settings, use the Instance type drop-down menu to select from different combinations of CPU, RAM, and storage for the control plane node VM or VMs. The minimum configuration is 2 CPUs and 8 GB memory

* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments. For more information about enabling Identity Management, see [Identity Management](../azure-install-mgmt/#step-5-identity-management).

1. At the end of the UI, deploy the cluster.

1. Store the name of your cluster (set during configuration or automatically generated) to a
`WORKLOAD_CLUSTER_NAME` environment variable.

```sh
export WORKLOAD_CLUSTER_NAME="<INSERT_WORKLOAD_CLUSTER_NAME_HERE>"
```

1. Set your kubectl context to the cluster.

```sh
kubectl config use-context ${WORKLOAD_CLUSTER_NAME}-admin@${WORKLOAD_CLUSTER_NAME}
```

1. Validate you can access the cluster's API server.
```sh
kubectl get nodes
NAME STATUS ROLES AGE VERSION
ip-10-0-1-133.us-west-2.compute.internal Ready <none> 123m v1.20.1+vmware.2
ip-10-0-1-76.us-west-2.compute.internal Ready control-plane,master 125m v1.20.1+vmware.2
```
6 changes: 3 additions & 3 deletions docs/site/content/docs/assets/vsphere-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ vSphere.
* The control plane IP is a virtual IP that fronts the Kubernetes API
server. You **must** set an IP that is routable and won't be taken by
another system (e.g. DHCP).
* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments.
* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments. For more information about enabling Identity Management, see [Identity Management ](vsphere-install-mgmt/#step-7-identity-management).
1. Validate the management cluster started successfully.
Expand Down Expand Up @@ -97,7 +97,7 @@ vSphere.
```
> ``<MGMT-CONFIG-FILE>`` is the name of the management cluster YAML config file

> This step duplicates the configuration file that was created when you deployed your management cluster. The configuration file will either have the name you assigned to the management cluster, or if no name was assigned, it will be randomly generated name.
> This step duplicates the configuration file that was created when you deployed your management cluster. The configuration file will either have the name you assigned to the management cluster, or if no name was assigned, it will be a randomly generated name.

> This duplicated file will be used as the configuration file for your workload cluster. You can edit the parameters in this new file as required. For an example of a workload cluster template, see [vSphere Workload Cluster Template](../vsphere-wl-template).

Expand All @@ -117,7 +117,7 @@ vSphere.
CLUSTER_PLAN: dev
```
#### Note
* If you did not specify a name for your management cluster, the installer generated a unique name, in this case, you must manually add the CLUSTER_NAME parameter and assign a workload cluster name.
* If you did not specify a name for your management cluster, the installer generated a random unique name. In this case, you must manually add the CLUSTER_NAME parameter and assign a workload cluster name.
* If you specified a name for your management cluster, the CLUSTER_NAME parameter is present and needs to be changed to the new workload cluster name.

1. In the workload cluster file (`~/.config/tanzu/tkg/clusterconfigs/workload1.yaml`), edit the VSPHERE_CONTROL_PLANE_ENDPOINT parameter to apply a viable IP.
Expand Down
2 changes: 2 additions & 0 deletions docs/site/content/docs/latest/azure-install-standalone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Deploy a Standalone Cluster to Azure
{{% include "/docs/assets/azure-standalone-clusters.md" %}}
9 changes: 7 additions & 2 deletions docs/site/content/docs/latest/getting-started-standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,24 @@ CLI.

## Creating Clusters

{{< tabs tabTotal="3" tabID="2" tabName1="Amazon EC2" tabName2="Docker" tabName3="vSphere" >}}
{{< tabs tabTotal="4" tabID="2" tabName1="Amazon EC2" tabName2="Azure" tabName3="Docker" tabName4="vSphere" >}}
{{< tab tabNum="1" >}}

{{% include "/docs/assets/aws-standalone-clusters.md" %}}

{{< /tab >}}
{{< tab tabNum="2" >}}

{{% include "/docs/assets/capd-standalone-clusters.md" %}}
{{% include "/docs/assets/azure-standalone-clusters.md" %}}

{{< /tab >}}
{{< tab tabNum="3" >}}

{{% include "/docs/assets/capd-standalone-clusters.md" %}}

{{< /tab >}}
{{< tab tabNum="4" >}}

{{% include "/docs/assets/vsphere-standalone-clusters.md" %}}

{{< /tab >}}
Expand Down
9 changes: 7 additions & 2 deletions docs/site/content/docs/latest/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,24 @@ Tanzu CLI.

## Creating Clusters

{{< tabs tabTotal="3" tabID="2" tabName1="Amazon EC2" tabName2="Docker" tabName3="vSphere" >}}
{{< tabs tabTotal="4" tabID="2" tabName1="Amazon EC2" tabName2="Azure" tabName3="Docker" tabName4="vSphere" >}}
{{< tab tabNum="1" >}}

{{% include "/docs/assets/aws-clusters.md" %}}

{{< /tab >}}
{{< tab tabNum="2" >}}

{{% include "/docs/assets/capd-clusters.md" %}}
{{% include "/docs/assets/azure-clusters.md" %}}

{{< /tab >}}
{{< tab tabNum="3" >}}

{{% include "/docs/assets/capd-clusters.md" %}}

{{< /tab >}}
{{< tab tabNum="4" >}}

{{% include "/docs/assets/vsphere-clusters.md" %}}

{{< /tab >}}
Expand Down
9 changes: 5 additions & 4 deletions docs/site/content/docs/latest/installation-planning.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ There are four main steps involved in deploying Tanzu Community Edition. The fol
2. Create a cluster on your infrastructure provider. There are two ways to approach this:
* Create a management cluster and then create a workload cluster. First, create the management cluster using the Tanzu Kubernetes Grid Installer. This installer is initiated from the Tanzu CLI. Then, create a workload cluster using the Tanzu CLI. For more information, see [Management cluster description](installation-planning/#management-cluster-description), [Workload cluster description](installation-planning/#workload-cluster-description).<br>
or <br>

* Create a standalone cluster using Tanzu Kubernetes Grid Installer. For more information,see
[Standalone cluster description](installation-planning/#standalone-cluster-description).

There are three infrastructure providers:
There are three infrastructure providers:


* vSphere
* Amazon EC2
* Microsoft Azure
* Docker

* vSphere
For more information, see [Deploying Clusters](clusters-deploy.md).
4. Install and configure packages using the Tanzu CLI. For more information, see [Packages Overview](packages-intro).

Expand Down
14 changes: 8 additions & 6 deletions docs/site/data/docs/latest-toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,20 @@ toc:
subitems:
- subpage: Deploy a Management Cluster to Amazon EC2
suburl: /aws-install-mgmt
- subpage: Deploy a Management Cluster to vSphere
suburl: /vsphere-install-mgmt
- subpage: Deploy a Management Cluster to Docker
suburl: /docker-install-mgmt
- subpage: Deploy a Management Cluster to Azure
suburl: /azure-install-mgmt
- subpage: Deploy a Management Cluster to Docker
suburl: /docker-install-mgmt
- subpage: Deploy a Management Cluster to vSphere
suburl: /vsphere-install-mgmt
- subpage: Deploy a Standalone Cluster to Amazon EC2
suburl: /aws-install-standalone
- subpage: Deploy a Standalone Cluster to vSphere
suburl: /vsphere-install-standalone
- subpage: Deploy a Standalone Cluster to Azure
suburl: /azure-install-standalone
- subpage: Deploy a Standalone Cluster to Docker
suburl: /docker-install-standalone
- subpage: Deploy a Standalone Cluster to vSphere
suburl: /vsphere-install-standalone
- subpage: Deploying a Workload Cluster
suburl: /workload-clusters
- subpage: Examine the cluster
Expand Down

0 comments on commit cb548bc

Please sign in to comment.