This terraform code will install Jenkins in cloud and get you IP and URL details on terminal.
-
Please modify your provider section with your lab specific detais
-
Run following command
terraform init
terraform plan
terraform apply
You should get IP add from the terminal where terraform was executed. Note that it takes time.
-
Get initial admin password, use this command
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
above command are run in EC2 VM. there are various ways to connect to VM terminal.
-
Install Following plugins after you login to jenkins
- docker pipeline
- delivery pipeline
- docker common plugins
- Delivery details
- VM EC2 Created
- Ansible installed
- Jenkins installed using Ansbile