This terraform module allows the installation of AAE on a generic Kubernetes cluster.
Install the required tools as follows, using a package manager for operating system like Homebrew if available there or the generic installer in the docs.
Install and make sure the Docker daemon is started by starting a container, see https://docs.docker.com/get-started/
On Mac OS X via brew:
brew cask install docker
See https://kubernetes.io/docs/tasks/tools/install-kubectl/
On Mac OS X via brew:
brew install kubectl
Version 2.12.3, see https://helm.sh/docs/using_helm/#installing-helm
On Mac OS X via brew:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/869efd7bc843ac82a4d7f46753cb5a9c5c3949b2/Formula/kubernetes-helm.rb
Install Terraform 0.12.x, see https://learn.hashicorp.com/terraform/getting-started/install.html
Note: Minimum Terraform version required 0.12
On Mac OS X via brew using tfenv:
brew install tfenv && tfenv install
This terraform module can be either used standalone if you already have:
- a Kubernetes cluster
- helm installed and configured with the
tiller
service account by default (can be customised setting thehelm_service_account
variable) - load balancer with DNS entries and SSL certificates if HTTPS
- a Docker registry
or included in another terraform script as in the examples which takes care of creating all of the above.
-
Clone this repo and go to the root folder of the repo (where this README is located)
-
Initialize terraform:
terraform init
-
Create your terraform variables file from the template file
terraform_template.tfvars
:cp terraform_template.tfvars terraform.tfvars
- edit
terraform.tfvars
and populate the variables following their description invariables.tf
to customise your installation
NB the terraform state is not managed and goes to the local file
terraform.tfstate
, you might want to set a terraform backend and store it for example on S3, see https://learn.hashicorp.com/terraform/getting-started/remote.html -
Execute the following commands to populate the Kubernetes variables in the
terraform.tfvars
:NAMESPACE=kube-system SERVICEACCOUNT=alfresco-deployment-service kubectl create serviceaccount -n kube-system ${SERVICEACCOUNT} kubectl create clusterrolebinding ${SERVICEACCOUNT}-admin-binding --clusterrole cluster-admin --serviceaccount=${NAMESPACE}:${SERVICEACCOUNT} echo "kubernetes_token = \"$(kubectl -n ${NAMESPACE} get secret $(kubectl -n ${NAMESPACE} get serviceaccount ${SERVICEACCOUNT} -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}' | base64 --decode)\"" >> terraform.tfvars
-
Then from now on you can just complete the installation everything (in case of errors with this step, please try to execute again only this step):
terraform apply
-
To uninstall everything:
terraform destroy
Some module usage examples are provided in the examples
directory:
- eks creates a full environment on AWS with an EKS cluster and AAE
- rancher_eks creates a full environment on AWS via Rancher2 with an EKS cluster and AAE
Generated using pre-commit-terraform, run pre-commit run -a
to update manually.
Name | Description | Type | Default | Required |
---|---|---|---|---|
aae_license | location of your AAE license file | string | n/a | yes |
acs_enabled | install Alfresco Content Services as part of the Alfresco Process Infrastructure | string | "true" |
no |
aws_efs_dns_name | EFS DNS name to be used for ACS file storage (optional AWS only) | string | "" |
no |
cluster_name | name for your cluster, if not set it will be a concatenation of project_name and project_environment | string | "" |
no |
gateway_host | gateway host name | string | n/a | yes |
helm_service_account | service account used by helm | string | "tiller" |
no |
http | use http rather than https for urls | string | "false" |
no |
kubernetes_api_server | Kubernetes API server URL | string | "https://kubernetes" |
no |
kubernetes_token | Kubernetes API token | string | "" |
no |
project_environment | project environment like dev/prod/staging | string | n/a | yes |
project_name | project name | string | n/a | yes |
quay_password | quay user password | string | n/a | yes |
quay_url | quay url in docker registry format, defaults to "quay.io" | string | "quay.io" |
no |
quay_user | quay user name | string | n/a | yes |
registry_host | docker registry host name | string | n/a | yes |
registry_password | password for the deployment docker registry | string | "password" |
no |
registry_user | username for the deployment docker registry | string | "registry" |
no |
zone_domain | Zone domain | string | n/a | yes |