Setup (4.0)
A sample template for eksctl and terraform is available from the Release Information page and you can use these 'as is' or modify them to create a system according to your own requirements.
You can use this as a reference or modify according to your infrastructure standards, see Pre-installation (4.0) page for the AWS service list required for MZ installation in AWS.
Working With the Infrastructure Template
Get the latest infrastructure templates from Release Information.
Download the template file and unzip it to a new folder.$ cd <your work folder> $ tar xzvf mz10-aws.tgz
For EKS Cluster
Set up the VPC and EKS Cluster
Note!
If you are using Openshift cluster refer to the section for Setup - OpenShift (4.0).
The default value for the cluster name is mz-eks and region is eu-west-1
Go to the eksctl folder in the unzipped contents.
Update the following fields in themz-eks.yaml
file:See https://github.com/weaveworks/eksctl for information about more parameters that can be used in the eksctl template
Metadata name (cluster name, default to mz-eks) aws region (default to eu-west-1) Worker Nodes instanceType (change the instant type to match your application load) minSize, maxSize and desiredSize (if you wish to have more nodes running)
Execute the following commands to start the creation of the EKS cluster
$ eksctl create cluster -f mz-eks.yaml --kubeconfig=./kubeconfig $ export KUBECONFIG=`pwd`/kubeconfig You should be able to run any kubectl commands from now on
Note!
The eksctl create
command can take a considerable amount of time to be completed.
Create Resources Required for with EKS
Go to the
terraform
folder and copy theterraform.tfvars.example
toterraform.tfvars
.Retrieve the following values from AWS Console and fill in the parameters in
terraform.tfvars
.Run the following commands:
Save the output from terraform for the next step.
Installing AWS Helpers
Run the following commands by replacing the placeholders with values from the terraform output.
See https://github.com/kubernetes-sigs/aws-efs-csi-driver for information on how to install Amazon EFS CSI Driver as follows:
If you need to dynamically provision persistent volume claim (PVC) through Amazon EFS access points, see https://github.com/kubernetes-sigs/aws-efs-csi-driver/tree/master/examples/kubernetes/dynamic_provisioning for information on how to install the storage class.
Below is an example of a storage class yaml setup:
See https://github.com/bitnami/charts/tree/master/bitnami/external-dns for information on how to install External DNS as follows:
See https://github.com/aws/eks-charts/tree/master/stable/aws-load-balancer-controller for information on how to install AWS Load Balancer Controller as follows:
Create a custom values yaml and populate it with the following information, which will be used in NGINX ingress controller installation:
ingress-nginx-values.yaml
Install NGINX chart with custom values yaml:
For Openshift Cluster
These installation steps are only applicable if you are using an Openshift cluster on your AWS. The following procedures and steps are specific to Openshift clusters.
Set up Openshift Cluster
To set up the Openshift cluster on your AWS, see https://docs.openshift.com/container-platform/4.7/installing/installing_aws/installing-aws-default.html.
Create Resources Required for with Openshift
Once you have successfully set up the cluster, proceed with the following steps:
Go to the
terraform
folder and copy theterraform.tfvars.example
toterraform.tfvars
.Retrieve the following values from AWS Console and fill in the parameters in terraform.tfvars.
Comment out the following line from
kms.tf
file. The role will not exist in this instance.Run the following commands:
Save the output from terraform for the next step.
Installing AWS Helpers
Run the following commands by replacing the placeholders with values from the terraform output.
See https://github.com/kubernetes-sigs/aws-efs-csi-driver for information on how to install Amazon EFS CSI Driver as follows:
See https://github.com/bitnami/charts/tree/master/bitnami/external-dns for information on how to install External DNS as follows:
See https://github.com/aws/eks-charts/tree/master/stable/aws-load-balancer-controller for information on how to install AWS Load Balancer Controller as follows:
Create a custom values yaml and populate it with the following information, which will be used in NGINX ingress controller installation.
ingress-nginx-values.yaml
Install NGINX chart with custom values yaml: