Giter VIP home page Giter VIP logo

azure-slave-plugin's Introduction

azure-slave-plugin

#The Azure Slave plugin is deprecated in favor of the Azure VM Agents plugin (GitHub).

Jenkins Plugin to create Azure slaves.

Supports creating

  1. Windows slave on Azure Cloud using SSH and JNLP
  • For windows images to launch via SSH, the image needs to be preconfigured with ssh. For preparing custom windows image, refer to Azure documentation
  1. Linux slaves on Azure Cloud using SSH

How to install the Azure Slave plugin

  1. Within the Jenkins dashboard, click Manage Jenkins.
  2. In the Manage Jenkins page, click Manage Plugins.
  3. Click the Available tab.
  4. In the "Cluster Management and Distributed Build" section, select the Azure Slave plugin.
  5. Click either “Install without restart” or “Download now and install after restart”.
  6. Restart Jenkins if necessary.

Configure the plugin : Azure profile configuration

  1. Within the Jenkins dashboard, click Manage Jenkins --> Configure System --> Scroll to the bottom of the page and find the section with the dropdown "Add new cloud" --> click on it and select "Microsoft Azure"
  2. Enter the subscription ID and the management certificate from your publish settings file. If you don’t have a publish settings file, click on the help button and follow the directions to download the publish settings file.
  3. Click on “Verify configuration” to make sure that the profile configuration is done correctly.
  4. Save and continue with the template configuration (See instructions below)

Configure the plugin : Template configuration.

  1. Click on the "Add" option to add a template. A template is used to define an Azure slave configuration, like its VM size, its region, or its retention time.
  2. For the template name, provide a valid DNS name. Jenkins will create a cloud service with same name if one does not already exists.
  3. For the description, provide any remarks you wish about this template configuration. This field is not used for slave provisioning.
  4. For the label, provide any valid string. E.g. “windows” or “linux”. The label defined in a template can be used during a job configuration.
  5. Select the desired region from the combo box.
  6. Select the desired VM size.
  7. Specify the Azure Storage account name. Please note that the storage account and cloud service should use the same region. Alternatively you can leave it blank to let Jenkins create a storage account automatically if needed.
  8. Specify the retention time in minutes. This defines the number of minutes Jenkins can wait before automatically deleting an idle slave. Specify 0 if you do not want idle slaves to be deleted automatically.
  9. Select a usage option:
  • If "Utilize this node as much as possible" is selected, then Jenkins may run any job on the slave as long as it is available.
  • If "Leave this node for tied jobs only" is selected, Jenkins will only build a project (or job) on this node when that project specifically was tied to that node.This allows a slave to be reserved for certain kinds of jobs.
  1. For the Image Family or ID , enter either an available image family name or a specific image ID.
  • If you want to specify an image family, then just enter the first character with the proper case to see an automatically generated list of available families. Jenkins will use the latest image within the selected family.
  • If you want to specify a specific image ID, enter the name of the image. Note that since image ID’s are not auto populated, the exact name needs to be entered manually. Also, if you are referring to an image using an image ID from the public Azure image gallery rather than your own account, note that such public images with specific IDs are available in Azure only for a limited time as they eventually get deprecated in favor of newer images in the same family. For this reason, it is recommended that you use the image family to refer to public platform images, and image ID’s for your own custom-prepared images.
  1. For the launch method, select SSH or JNLP.
  • Linux slaves can be launched using SSH only.
  • Windows slaves can be launched using SSH or JNLP. For Windows slaves, if the launch method is SSH then image needs to be custom-prepared with an SSH server pre-installed.

When using the JNLP launch option, ensure the following:

  • Jenkins URL (Manage Jenkins --> configure system --> Jenkins Location)
    • The URL needs to be reachable by the Azure slave, so make sure to configure any relevant firewall rules accordingly.
  • TCP port for JNLP slave agents (Manage Jenkins --> configure global security --> Enable security --> TCP port for JNLP slaves).
    • The TCP port needs to be reachable from the Azure slave launched using JNLP. It is recommended to use a fixed port so that any necessary firewall exceptions can be made.

      If the Jenkins master is running on Azure, then open an endpoint for "TCP port for JNLP slave agents" and, in case of Windows, add the necessary firewall rules inside virtual machine (Run --> firewall.cpl).

  1. For the Init script, provide a script to install at least a Java runtime if the image does not have Java pre-installed.

    For the JNLP launch method, the init script must be in PowerShell. If the init script is expected to take a long time to execute, it is recommended to prepare custom images with the necessary software pre-installed.

    For more details about how to prepare custom images, refer to the below links:

  2. Specify a user name and a password as per the rules explained in the help text.

  3. Make sure to validate the template configuration by clicking on the link “Verify Template”. This will connect to your Azure account to verify the correctness of the supplied information.

Template Configuration for Ubuntu images.

  1. Configure an Azure profile and Template as per the above instructions.
  2. If the init script is expected to take a long time to complete, it is recommended to use a custom-prepared Ubuntu image that has the required software pre-installed, including a Java runtime
  3. For platform images, you may specify an Init script as below to install Java, Git and Ant:
      #Install Java
      sudo apt-get -y update
      sudo apt-get install -y openjdk-7-jdk
      sudo apt-get -y update --fix-missing
      sudo apt-get install -y openjdk-7-jdk

      # Install Git
      sudo apt-get install -y git

      #Install Ant
      sudo apt-get install -y ant
      sudo apt-get -y update --fix-missing
      sudo apt-get install -y ant

Template configuration for Windows images with launch method JNLP.

  1. Make sure to follow the instructions specified above for JNLP.

  2. If the Jenkins master does not have a security configuration, leave the Init script blank for the default script to execute on the slave.

  3. If the Jenkins master has a security configuration, then refer to the script at https://gist.github.com/snallami/5aa9ea2c57836a3b3635 and modify the script with the proper Jenkins credentials.

    At a minimum, the script needs to be modified with the Jenkins user name and API token. To get the API token, click on your username --> configure --> show api token

    The below statement in the script needs to be modified: $credentails="username:apitoken"

Create a Jenkins job that runs on a Linux slave node on Azure

  1. In the Jenkins dashboard, click New Item/Job.
  2. Enter a name for the task/Job you are creating.
  3. For the project type, select Freestyle project and click OK.
  4. In the task configuration page, select Restrict where this project can be run.
  5. In the Label Expression field, enter label given during template configuration.
  6. In the Build section, click Add build step and select Execute shell.
  7. In the text area that appears, paste the following script.
 # Clone from git repo
 currentDir="$PWD"
 if [ -e sample ]; then
   cd sample
   git pull origin master
 else
   git clone https://github.com/snallami/sample.git
 fi

# change directory to project
cd $currentDir/sample/ACSFilter

#Execute build task
ant
  1. Save Job and click on Build now.
  2. Jenkins will create a slave node on Azure cloud using the template created in the previous section and execute the script you specified in the build step for this task.
  3. Logs are available @ Manage Jenkins --> System logs --> All Jenkins logs.
  4. Once the node is provisined in Azure, which typically takes about 5 to 7 minutes, node gets added to Jenkins.

azure-slave-plugin's People

Contributors

akirakw avatar carstenwickner avatar clguiman avatar jpoon avatar jyrmyx avatar mmitche avatar snallami avatar ydubreuil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-slave-plugin's Issues

VM created through Jenkins is not shutting down after Retention time

Steps:

  1. Manage Jenkins ->Configure system -> Add new cloud
  2. Enter valid subscription details and Verify subscription
  3. Enter Name,label, Image reference values, Launch method,username and password
  4. Set Retention time to 10 mins and check the checkbox " Shutdown only(do not delete) after retention time"
  5. Create a freestyle project with the above label expression as reference
  6. Build the project

Result: The VM is in running status even after retention time

Plugin should be able to dynamically change cloud services

If more than 50 VMs are necessary on a single image, or if a single cloud service is shared among multiple images, then the plugin runs out of space in the cloud service. Plugin should be able to dynamically allocate a new cloud service if this happens.

ARM version should use the credentials plugin

I noticed this code when I experienced issues with Jenkins inside of a Docker container.

It appears that the legacy version of the plugin is improperly storing credentials in a computed path. Instead the plugin should use more recent credentials storage best practices via the 'credentials' APIs.

Deadlock/Infinite wait in verifyTemplateAsync

I've seen a deadlock in verifyTemplateAsync a few times. It blocks with the following callstack.

I was under the impression this couldn't happen because of the timeout on the get call

"jenkins.util.Timer [#2]" Id=74 Group=main WAITING on java.util.concurrent.FutureTask@1954eb31
    at sun.misc.Unsafe.park(Native Method)
    -  waiting on java.util.concurrent.FutureTask@1954eb31
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:425)
    at java.util.concurrent.FutureTask.get(FutureTask.java:187)
    at java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:243)
    at com.microsoftopentechnologies.azure.AzureManagementServiceDelegate.verifyTemplateAsync(AzureManagementServiceDelegate.java:1631)
    at com.microsoftopentechnologies.azure.AzureManagementServiceDelegate.verifyTemplate(AzureManagementServiceDelegate.java:1579)
    at com.microsoftopentechnologies.azure.AzureSlaveTemplate.verifyTemplate(AzureSlaveTemplate.java:345)
    at com.microsoftopentechnologies.azure.AzureCloud.provision(AzureCloud.java:178)
    at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:701)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:305)
    at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:58)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:798)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

    Number of locked synchronizers = 2
    - java.util.concurrent.ThreadPoolExecutor$Worker@7ecfce3f
    - java.util.concurrent.locks.ReentrantLock$NonfairSync@1d6fd628

Only 1 slave provisioned per template

It is a little unclear what the expected outcome is, however the actual behaviour differs from what I expected.

Given that I have the max Virtual machines set to a high number ie 5, when I start a job that is restricted to run on a configured Azure template label, the Azure plugin provisions a new slave. However if I start two jobs that are restricted to run on the same Azure template label, one job will start on the provisioned slave and the other one will just queue. What I expected to happen was that a new slave is provisioned to cater for the second job as the number of virtual machines in the subscription is less than my configured max.

Edit: After further investigation I did manage to get a second slave to be provisioned but it is not clear why.

With the azure slaves configured to only run 1 job at a time.

  • If I use the Buildflow plugin to schedule 2 builds in parallel, all being restricted to run on the Azure label, only 1 slave will be provisioned.
  • If I manually start 2 jobs that are all restricted on the same Azure slave, again only 1 slave will be provisioned.
  • If I manually start 3 jobs, or use the Buildflow plugin to schedule 3 jobs then a second slave is provisioned. The Jenkins log showed the following reference to starting based on workload.
    Apr 24, 2016 12:09:31 PM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply
    Started provisioning rqa-swarm-linux from Azure-c55e2022-bc1f-46be-ab45-654433cca28f with 1 executors. Remaining excess workload: -0.197

It seems that the workload value is the crucial part in initiating a new slave to be provisioned.
But why this isn't triggered when there is a queued job or from the Buildflow plugin I'm not sure.

I want to avoid queuing jobs, when there is room for more azure slaves to be provisioned.

Upon upgrade to 1.0.0 SDK, rework locations/vm sizes code

The code for VM sizes and locations was made static in the ARM-dev branch because those APIs require the certificate authentication (which that branch has removed). The 1.0.0 SDK has a different way of doing this altogether, so when the branch is upgraded to that version, rework and remove hard coded values.

cannot start the existing vms on vm limit reach

If I provisioned the slaves and shutdown them on retention time I face the situation that when limit is reached existing vms didn't not start with error in logs:

Azure Cloud: provision: template jenk-win-slavehas validation errors , cannot provision slaves with this configuration [The current number of virtual machines in this Azure subscription is 40, which is more than or equal to the default value 40 
.Consider increasing Max Virtual Machines Limit value or delete existing virtual machines from your subscription.

That's because this validation happens and prevent further check.
This should be changed to check after existing vms check.

ARM support

When does the azure slave plugin will be available as is in the jenkins plugins repository?
Are there any instructions to use it meantime?

Q: default slave init script?

From plugin config settings:

Help for feature: Init Script
Ensure image is pre-configured with a Java runtime or provide a script to install Java in headless (silent) mode. If using JNLP, you can leave this blank for default script to execute or refer here for a sample script.

Thanks for the sample.

  1. Am I right that this DEFAULT_INIT_SCRIPT is the default?
  2. Maybe link to this from that help message. I am happy with default just want one change. Probably others in the same position.

Image reference selecting field is missing

Steps:

  1. After Verifying Azure configuration
  2. Select Add Template
  3. Under Image configuration, There is no text field or dropdown for user to select the Image Reference or Custom user image

untitled1

Not able to add a new Could - Microsoft Azure in Jenkins configuration

I am evaluating Jenkins for CI/CD . Currently installed Jenkins in my local machine:
Windows 7 Enterprise - 64 bit OS - 16 GB RAM
Installed Jenkins as a service
JDK installed - java version "1.8.0_74"
Jenkins version - Jenkins ver. 1.654
Azure slave plugin version - 0.3.3 -After installing the plugin i had restarted Jenkins multiple times
The issue is that I am not able to add new cloud in Jenkins Configuration. If i select Add new cloud > Microsoft Azure nothing happens.

Any resolution/workaround is much appreciated.

I Checked the Jenkins error log and this is what i saw:

Mar 23, 2016 2:27:02 PM hudson.ExpressionFactory2$JexlExpression evaluate
WARNING: Caught exception evaluating: descriptor.settings.addresses in /configure. Reason: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:134)
at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:131)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:125)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.deleteCharAt(Unknown Source)
at java.lang.StringBuilder.deleteCharAt(Unknown Source)
at org.jenkinsci.plugins.detection.unreliable.slave.UnreliableSlaveDetection.getAddresses(UnreliableSlaveDetection.java:69)
... 166 more

Mar 23, 2016 2:27:48 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Azure slave clean task
Mar 23, 2016 2:27:48 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Azure slave clean task. 16 ms

All Tooltips are showing up Error message

  1. Create a freestyle project
  2. Click on Add post build action
  3. Click on tool-Tips under Azure profiel configuration,ACS profile configuration and Marathon Profile Configuration
    error

Allow customisation of time it takes to spin up VM's

If I create a template with no configurations, Azure is able to provision the vm in reasonable time (10-15 mins or so) and connect it with Jenkins. However, if I require some customisation to the initi script, the azure slave plugin usually times out trying to connect to the new slave and ends up marking the slave as offline. It would be great to be able to customise the amount of time that azure slave plugin should continue to try connect to the new slave, especially as Azure can sometimes take a long time to provision a vm.

As a work around I have had to install the jenkins slave jar, then set my custom install script to be run at next boot and then reboot the machine. It is a very messy configuration as when the vm reboots it is still installing required software.

Suffix "0" is added to all the VM's created through jenkins

Steps:

  1. Manage Jenkins ->Configure system -> Add new cloud
  2. Enter valid subscription details and Verify subscription
  3. Enter Name,label, Image reference values, Launch method,username and password
  4. Create a freestyle project with the above label expression as reference
  5. Build the project

Result: A suffix"0" is getting added to all the VM's created

zero

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.