Spinnaker is an open-source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence. This is the terraform module to build and install spinnaker on AWS. This module will create Amazon EKS, Amazon Aurora, Amazon S3 resources for spinnaker and utilise Helm chart to install spinnaker application on kubernetes. And it will also create a VPC to place an EKS and an Aurora cluster for the spinnaker. If you want to know how to use this module, please check below examples for more details.
- Spinnaker
- CodeBuild
- Amazon VPC
- Spinnaker managed AWS
- Spinnaker managed ECS
- Spinnaker managed EKS
- Chaos Monkey
Follow the official guide to install and configure profiles.
Infrastructure Engineering team is using terraform to build and manage infrastucure for DevOps. And we have a plan to migrate cloudformation termplate to terraform.
To install Terraform, find the appropriate package (https://www.terraform.io/downloads.html) for your system and download it. Terraform is packaged as a zip archive and distributed as a single binary. Install Terraform by unzipping it and moving it to a directory included in your system's PATH
.
And there is an another option for easy install. The tfenv is very useful solution. You can use this utility to make it ease to install and switch terraform binaries in your workspace like below.
tfenv install 0.12.18
tfenv use 0.12.18
Also this tool is helpful to upgrade terraform v0.12. It is a major release focused on configuration language improvements and thus includes some changes that you'll need to consider when upgrading. But the version 0.11 and 0.12 are very different. So if some codes are written in older version and others are in 0.12 it would be great for us to have nice tool to support quick switching of version.
tfenv list
tfenv use 0.12.18
tfenv use 0.11.14
tfenv install latest
tfenv use 1.0.3
module "spinnaker" {
source = "Young-ook/spinnaker/aws"
version = "~> 2.0"
name = "spinnaker"
stack = "test"
tags = { env = "test" }
}
Run terraform:
terraform init
terraform apply
This terraform module provides users a shell script that extracts the kubeconfig file of the EKS cluster. For more details, please visit the terraform eks module.
export KUBECONFIG=<path-to-spinnaker-kubeconfig-file>
kubectl -n spinnaker port-forward svc/spin-deck 9000:9000
Users can add AWS account to spinnaker using halyard which is the command-line tool for spinnaker management. To enable AWS account in the spinnaker, please follow the instructions in the Spinnaker Managed AWS example.
And users can enable ECS account in the spinnaker using halyard. Please follow the instructions in the Spinnaker Managed ECS example.
And users can enable Kubernetes account in the spinnaker using halyard. Please follow the instructions in the Spinnaker Managed EKS example.
Users can set up AWS CodeBuild as a Continuous Integration (CI) system within spinnaker for cloud backed build system. For more details about codebuild project registration with spinnaker, please visit the Enable AWS CodeBuild account.
You will see error message followings when attempting to run terraform apply in the spinnaker example if you deleted the default vpc on your account:
╷
│ Error: no matching VPC found
│
│ with module.spinnaker.module.eks.data.aws_vpc.default,
│ on .terraform/modules/spinnaker.eks/network.tf line 4, in data "aws_vpc" "default":
│ 4: data "aws_vpc" "default"
This module uses eks module inside that requires default vpc on your aws account. This is the related issue. For more details, please refer to the source.