Before starting with end-to-end automation and orchestration, we need to configure SSH authentication using a key. The objective behind it is to allow the Jenkins VM to connect to the Chef workstation. Then, we can issue SSH commands from the Jenkins dashboard on the Chef workstation VM to create an instance in AWS or Azure cloud and install a runtime environment on it to deploy the PetClinic application:
If we try to access the SSH Chef workstation from Jenkins, it won't work as we still need to configure password less configuration for security:
Let's configure virtual machine where Jenkins is installed to access virtual machine where Chef Workstation is installed.
Open a terminal in Jenkins. Use
ssh-keygento create a new key:
Verify the newly generated key on the local filesystem:
Copy the key to the remote host using
Now try to access the Chef workstation using the Jenkins build job:
If it fails, then try to access it from...