0
0
Jenkinsdevops~20 mins

Cloud agent provisioning (EC2, Azure) in Jenkins - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud Agent Provisioning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Jenkins EC2 Plugin: Agent Launch Output
You configure Jenkins to launch EC2 agents using the EC2 plugin. After triggering a build, which output indicates the agent was successfully launched?
AINFO: Launching a new EC2 instance for agent 'build-agent-1' succeeded
BERROR: EC2 instance launch failed due to invalid credentials
CWARN: Agent 'build-agent-1' disconnected unexpectedly
DINFO: Jenkins master started without EC2 agent configuration
Attempts:
2 left
💡 Hint
Look for messages indicating success in launching EC2 instances.
Configuration
intermediate
2:00remaining
Azure VM Agent Configuration in Jenkins
Which Jenkins pipeline snippet correctly provisions an Azure VM agent using the Azure VM Agents plugin?
A
agent {
  azure {
    vmImage 'UbuntuLTS'
    vmAgentName 'azure-agent-01'
  }
}
B
agent {
  label 'azure-vm-agent'
}
C
agent {
  docker {
    image 'mcr.microsoft.com/azure-cli'
  }
}
D
agent {
  node {
    cloud 'Azure'
    vmName 'agent-01'
  }
}
Attempts:
2 left
💡 Hint
Azure VM Agents plugin uses the 'azure' agent block with vmImage and vmAgentName.
Troubleshoot
advanced
2:00remaining
EC2 Agent Fails to Connect: Cause Identification
A Jenkins EC2 agent instance launches but fails to connect back to the master. Which is the most likely cause?
AAgent label does not match any job
BJenkins master is offline
CEC2 instance type is too small
DSecurity group does not allow inbound traffic on the Jenkins agent port
Attempts:
2 left
💡 Hint
Think about network connectivity between the agent and master.
🔀 Workflow
advanced
2:00remaining
Azure VM Agent Provisioning Workflow
What is the correct order of steps Jenkins follows to provision an Azure VM agent?
A2,1,3,4
B1,2,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint
Think about provisioning before configuration and job assignment.
Best Practice
expert
3:00remaining
Secure Credentials Management for EC2 Agent Provisioning
Which method is the most secure and recommended way to manage AWS credentials for Jenkins EC2 agent provisioning?
AStore AWS access keys directly in Jenkins global credentials with restricted permissions
BEmbed AWS access keys in Jenkins pipeline scripts as environment variables
CUse IAM roles assigned to the Jenkins master EC2 instance with least privilege
DHardcode AWS credentials in the EC2 plugin configuration file on Jenkins master
Attempts:
2 left
💡 Hint
Consider AWS best practices for credential management and least privilege.