-
Type:
Bug
-
Resolution: Not A Defect
-
Priority:
Minor
-
Component/s: configuration-as-code-plugin
I'm trying to configure EC2 plugin but for some reason it doesn't work and the I can't see the new cloud after I'm running CasC
Â
Jenkins version:Â 2.154
This is the content of the file that I'm running the CasC with:
plugins:
required:
ec2: 1.40.1
sites:
- id: "default"
url: "https://updates.jenkins.io/update-center.json"jenkins:
agentProtocols:
- "JNLP4-connect"
- "Ping"
clouds:
- amazonEC2:
cloudName: "ec2"
instanceCapStr: 20
region: "us-west-2"
# this shouldn't be needed, since without explicit creds this should already be used
# but let's be explicit to avoid issues.
useInstanceProfileForCredentials: true
# Reminder: the following key has multiple lines
privateKey: "PRIVATE_KEY"
templates:
- description: "Auto configured EC2 Agent, yay again"
zone: "us-west-2"
ami: "ami-0c6bb742864ffa3f3"
labelString: "test yey"
type: "T2Xlarge"
securityGroups: "some-group"
remoteFS: "/home/ec2-user"
remoteAdmin: "ec2-user"
mode: "NORMAL"
primaryView:
all:
name: "all"
quietPeriod: 5
scmCheckoutRetryCount: 0unclassified:
location:
url: "http://localhost:8080/"
tool:
git:
installations:
- home: "git"
name: "Default"
jdk:
defaultProperties:
- installSource:
installers:
- jdkInstaller:
acceptLicense: false
But unfortunately after running - nothing happens
:

Â
This is the log output of my master container:
Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.cloudName = ec2 Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.useInstanceProfileForCredentials = true Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.region = us-west-2 Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.privateKey = PRIVATE_KEY Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.instanceCapStr = 20 Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.ami = ami-0c6bb742864ffa3f3 Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.zone = us-west-2 Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.securityGroups = some-group Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.remoteFS = /home/ec2-user Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.type = T2Xlarge Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.labelString = test yey Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.mode = NORMAL Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.description = Auto configured EC2 Agent, yay again Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.remoteAdmin = ec2-user Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.templates = [{}] Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.model.AllView.name = all Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.tools.JDKInstaller.acceptLicense = false Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.tools.InstallSourceProperty.installers = [{jdkInstaller={}}] Jan 31, 2019 6:01:56 PM io.jenkins.plugins.casc.ConfigurationAsCode doReplace INFO: Provided sources could not be applied Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.cloudName = ec2 Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.useInstanceProfileForCredentials = true Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.region = us-west-2 Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.privateKey = PRIVATE_KEY Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.instanceCapStr = 20 Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.ami = ami-0c6bb742864ffa3f3 Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.zone = us-west-2 Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.securityGroups = some-group Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.remoteFS = /home/ec2-user Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.type = T2Xlarge Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.labelString = test yey Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.mode = NORMAL Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.description = Auto configured EC2 Agent, yay again Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.SlaveTemplate.remoteAdmin = ec2-user Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.plugins.ec2.AmazonEC2Cloud.templates = [{}] Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.model.AllView.name = all Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.tools.JDKInstaller.acceptLicense = false Jan 31, 2019 6:01:59 PM io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator tryConstructor INFO: Setting class hudson.tools.InstallSourceProperty.installers = [{jdkInstaller={}}]
Any idea?
Â
Thanks!