BackPropagationVisualization includes a Jenkins pipeline/job for dependency resolution and build, running unit tests, and deploying the package web page to AWS Elastic Beanstalk. The configuration for the pipeline/job is included in the 'Deploy' folder in the source code. This page gives an overview of how to setup Jenkins and other dependencies in order to deploy BackPropagationVisualization to Elastic Beanstalk.

Basic Software Dependencies

Jenkins - Jenkins version 2.89.3 was used to create the pipeline.

Visual Studio - Both the MSBuild and MSTest executables are required to compile the code and run unit tests. These can be potentially be installed through the Build Tools and Agents for Visual Studio, but the simplest way to get them running properly is by installing Visual Studio itself.

Nuget - The nuget command line interface is required to resolve .NET package dependencies.

AWS Toolkit for Visual Studio - This toolkit is needed for the 'awsdeploy' utility, which allows deploying to Elastic Beanstalk from the command line.

Jenkins Plugins and Configuration

The following Jenkins plugins are required by the BackPropagationVisualization pipeline...

After installing the plugins, the following configuration should be set through the 'Manage Jenkins' > 'Global Tool Configuration' screen...

Configuration Section Parameter Name Parameter Sample Value
MSBuild > MSBuild installations Name VS2013 Community*
MSBuild > MSBuild installations Path to MSBuild C:\Program Files\MSBuild\12.0\Bin\
MSTest > MSTest installations Name VS2013 Community*
MSTest > MSTest installations Path to MSTest C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe

* These values can be adjusted to represent the version of Visual Studio being used, but must also be updated in the pipeline/job configuration.

These locations will vary between Visual Studio versions.

To import the BackPropagationVisualization pipeline/job into a local Jenkins instance, first download the jenkins-cli.jar file by following the instructions here. Then download the JenkinsBuildDeployJobConfiguration.xml file and run the following Java command from the folder where both files are located...

java -jar jenkins-cli.jar -s http://localhost:8080 create-job "BackPropagationVisualization Build-Deploy" --username [Jenkins username] --password [Jenkins password] < JenkinsBuildDeployJobConfiguration.xml

Creating the Elastic Beanstalk Application / Environment

Follow the steps below to setup an Elastic Beanstalk application and environment...

  • Create a new Application using the link in the Elastic Beanstalk console.
  • Create a new Environment within the Application, selecting the type as 'Web Server Environment'.
  • Select '.NET (Windows/IIS)' and 'Single Instance' for the Environment type.
  • As the initial deployment package either select the default option, or use Visual Studio to create a deployment package via the 'Build > Publish' menu.
  • Specify the Environment name as 'backpropogationvisualization-env'.
  • Select the specific configuration details like instance type, root volume type, root volume size (depending on how powerful you want the underlying server instance to be).

Then create an AWS IAM user with the following permissions/policies...

  • AWSElasticBeanstalkEnhancedHealth
  • AWSElasticBeanstalkWebTier
  • AWSElasticBeanstalkMulticontainerDocker
  • AWSElasticBeanstalkService
  • AWSElasticBeanstalkWorkerTier

...the keys for this IAM user should then be used to create a local AWS profile (in the AWS 'credentials' file). The name of the local profile should then be configured in the 'AWSProfileName' parameter of the Jenkins pipeline/job.

Finally (for Windows installations), the account running the Jenkins service needs to be the same account which holds the AWS 'credentials' file, otherwise Jenkins will not be authorized to run awsdeploy.exe as part of the pipeline/job.

Jenkins Parameters

The following parameters must be defined in the imported 'BackPropagationVisualization Build-Deploy' pipeline/job. For parameters which have default values, check the default values are correct for your environment, and update if necessary. For parameters without default values, these will need to be set to the correct values for your AWS profile and Elastic Beanstalk configuration...

Parameter Name Default Value Description
GitHubTagName master The tag to use to retrieve the source code
WorkspaceSourceCodeFolder Source The folder in the Jenkins workspace in which the source code is stored
WorkspaceDeploymentPackageFolder DeploymentPackage The folder in the Jenkins workspace in which the IIS deployment package is stored
ProjectName BackPropagationVisualization The name of the project in GitHub, source code, etc...
PathToNugetExecutable C:\Temp\ The full path to the folder where nuget.exe is located
PathToAWSDeployExecutable C:\Program Files\AWS Tools\Deployment Tool\ The full path to the folder where awsdeploy.exe is located
AWSProfileName The AWS profile to use when interacting with Elastic Beanstalk. This parameter should match one of the profiles defined in the AWS credentials file (stored in '%UserProfile%\.aws' folder for Windows systems), and this profile should be linked with an AWS IAM user which has the permissions/policies listed above.
AWSRegion The AWS region in which the Elastic Beanstalk instance exists or should be created
AWSUploadBucket The AWS S3 bucket where the IIS deployment package should be uploaded to
AWSElasticBeanstalkApplicationName BackPropogationVisualization The AWS Elastic Beanstalk application to deploy to
AWSElasticBeanstalkEnvironmentName backpropogationvisualization-env The AWS Elastic Beanstalk application environment to deploy to


Once all the required parameters are configured, the pipeline/job can be executing using the 'Build with Parameters' option in Jenkins.