terraform-jenkins:
- This module includes creation of necessary resources like "VPC", "Subnet", "Firewall-rules", "Service-Account", "Jenkins-VM".
terraform-desktop:
- This module includes creation of "Desktop-VM" utilizing other resources like network, service-account created in "terraform-jenkins"
Dockerfile:
- This file sets-up a runtime environment for a "Docker-Container" to perform all the tasks like running "Terraform", running "Ansible-Playbook" etc.
Playbook:
- This has all the "Packages" and "Softwares" to be installed in "Desktop-VM"
Jenkinsfile:
- This Jenkinsfile has the "Pipeline" which includes different stages to be performed like "Create" and "Configure" the "Desktop-VM".
- Clone terraform code from GitHub: git clone https://github.com/summu97/ASSESMENT.git
- docker build -t docker-desktop:v1 /Path/to/Dockerfile.
- Push image to "Docker Hub" or any "Artifactory repository".
- Login to "Jenkins-server" and get password to login to "Jenkins-UI".
- Now login to "Jenkins-UI" and configure Jenkins to get pipeline from "Jenkinsfile" from repository and use "Docker-image" as agent.
- Plugin required: Docker
- Start the build-job by providing appropriate action(apply, destroy) to trigger terraform.
- Make the changes according to your environment.