SuperNimbusKnowledge Base

AWS Code Pipeline & Jenkins – The Basics

Introduction

We will set up a build pipeline in the AWS cloud to handle building a UE5 project.

The cloud allows us to scale our pipeline as it gives us the ability to quickly provision additional resources when we need them.

Before we go into the specifics of how to set up the pipeline, let’s cover the basic architecture and some terms that will be used throughout this doc.

Architecture

We will be hosting a Jenkins Controller on an AWS EC2 instance and exposing the Jenkins admin portal to the Internet so that we can login and configure our controller.
Once configured, the controller will dynamically provision agents to perform build tasks. 

We will then configure a Windows AMI which will be used as the base to set up the custom Unreal Engine AMI for our builds.

We can then use that to build, package and distribute artifacts to S3 and GameLift.

We will pull various build resources and the project source code from Perforce.

We will also poll perforce to trigger builds from the controller on a per changelist submission basis.

Terms

As there are a lot of steps to this setup, and we use a handful of different technologies, so we thought it would be useful to clarify the terms we are using at the start of this tutorial.

Please use this guide if you need clarification on any terms we are using further along in this tutorial.

Jenkins Controller

This is an EC2 instance that will run Jenkins. This instance is responsible for hosting the Portal. It will use the EC2 plugin to dynamically provision build agents to perform builds. This instance can be a weaker instance type since it won’t be performing any heavy-duty tasks itself

Jenkins Agent

This is an EC2 instance that will run build-tasks.

It will be spun up using AMIs that have required software preinstalled.

Windows agents will connect to the controller using SSH.

AMI

Stands for Amazon Machine Image. It is a snapshot of a computer system that you can use on AWS EC2 instances. It holds information about the computer’s entire OS, its applications and data.

They can be used when provisioning EC2 instances to launch instances with specific OS configurations and software preinstalled.

SSH

Stands for Secure Shell and is a network protocol that provides administrators with a secure way to access a remote computer.

We will use it to connect to our Jenkins controllers and agents if needed.

RDP

Stands for Remote Desktop Protocol. It’s a technology that allows you to remotely connect to, and control another computer over a network.

You will be able to see the remote computer’s desktop when using RDP.

We will use it to easily configure our AMIs.

Plugins

Jenkins has some basic functionality by itself, but we sometimes need additional features to make it easier to work with specific software or add additional features to Jenkins itself.

Jenkins plugins are an easy way of achieving this.

We will be installing Jenkins plugins on the Jenkins controller instance

Elastic IP

This is an AWS service that allows you to assign a static, public IP addresses to your AWS resources such as EC2 instances.

Unlike regular public IP addresses assigned at instance launch which may change when you stop or restart your instances, an Elastic IP remains the same, even if you stop or start your resources.

Security Group

A security group acts as a virtual firewall for your EC2 instances.

It controls inbound and outbound traffic by defining rules that determine what network traffic is allowed to access your instances.

IAM Role

Roles are a way to grant permissions and access rights to AWS resources.

Instead of assigning permissions to individual users, you can create roles and assign them to users, groups, or even AWS services.

We will assign roles to our build agent instances, which will grant them permission to use AWS resources such as S3 to store build artifacts

IAM Policy

A policy is a set of statements that specify what actions are allowed or denied on specific resources.

These policies can be attached to IAM users, groups, or roles to control their level of access to AWS services.

We will be creating several policies to grant specific permissions to our build agents.

Summary

In this section we covered some of the basic terminology and the flow of how our pipeline is going to work and execute tasks.

In the next tutorial we are going take a look at setting up the Jenkins controller which will become the controller for our UE5 build pipeline.

Jump to section