SonarQube Packer for AWS AMI
Packer Ansible script for provisioning a SonarQube AWS AMI.
Installs SonarQUbe version 7.4.
This project's Ansible was lifted from these geerlingguy
's Ansible roles:
Prerequisites
- Install HashiCorp Packer.
- Set AWS account key and secret. Do this in one of two ways:
- Use a tool like aws-vault.
- Export your IAM user's
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
.
- Run
export AMI_USERS=YOU_AWS_ACCOUNT_ID
to grant your AWS account permission to use the AMI.
Usage
packer build sonarqube.json
Use the AMI ID (printed in the output) when you create the SonarQube AWS EC2 instance.
Testing
Ansible
The Ansible is linted using Molecule. Molecule does much more than lint. To learn more, see Testing Ansible roles with Molecule.
Packer
Packer file syntax of sonarqube.json
is tested using Packer's validate
command.