Deployment guide

Jenkins

Overview

Jenkins is an open source automation server for building, deploying and automating software projects through continuous integration and continuous delivery (CI/CD) pipelines.

This SecureAnyCloud AMI runs Jenkins Server on Linux from AWS Marketplace. It includes a web-based management console on port 8080 and a preconfigured systemd service, so Jenkins starts on boot.

What you get:

  • Jenkins 2.361.1 with a web-based management console on port 8080
  • Java 11.0.15 (OpenJDK)
  • A preconfigured systemd service for automatic startup on boot
  • An OS package update script that keeps the system current
  • AWS CLI v2 for AWS service integration
  • Systems Manager Agent (SSM) for remote management
  • CloudWatch Agent for monitoring
  • Latest security patches applied at build time
  • 24/7 SecureAnyCloud support with a guaranteed 24 hour response SLA

Prerequisites

Before you launch this AMI, make sure you have:

  • An active AWS account
  • An active subscription to the Jenkins listing on AWS Marketplace
  • An EC2 key pair for SSH access
  • Familiarity with EC2 instance management and SSH

Recommended instance type: t3.medium (2 vCPU, 4 GB RAM) or larger for production workloads. The minimum requirements are 1 vCPU, 1 GB RAM and 20 GB of disk space. Jenkins with plugins and build jobs benefits from additional memory.

1

Launch the AMI

Launch the AMI from AWS Marketplace:

  • Open AWS Marketplace and search for "Jenkins SecureAnyCloud".
  • Click Continue to Subscribe, accept the terms, then click Continue to Configuration.
  • Select your Region and Software Version.
  • Click Continue to Launch.
  • Choose Launch through EC2 for full control over instance configuration.
  • Select your instance type (t3.medium is recommended).
  • Configure storage with a minimum of 20 GB gp3. Use 50 GB for active build environments.
  • Configure your Security Group with the inbound rules listed below.
  • Select your EC2 key pair and launch the instance.

Inbound rules for the security group:

  • Port 22, TCP, source: your IP. Purpose: SSH access.
  • Port 8080, TCP, source: your IP. Purpose: Jenkins web interface.

Important: Restrict port 8080 to trusted IP addresses. Do not open the Jenkins web interface to 0.0.0.0/0 unless you have configured authentication and are using HTTPS.

2

Connect via SSH

When your instance is running and has passed both status checks (2/2), connect over SSH:

ssh -i your-key.pem ec2-user@<public-ip-address>

Replace your-key.pem with the path to your EC2 key pair and <public-ip-address> with the public IP of your instance.

Important: Wait until the instance reaches 2/2 successful status checks before you connect. If you connect too early, you may see an error such as:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

This is expected during the initial boot. Wait for both status checks to pass, then try again.

To switch to the root user, run:

sudo su -
3

Unlock Jenkins

The Jenkins service starts automatically on boot. Open the Jenkins web interface in your browser:

http://<public-ip-address>:8080

The Unlock Jenkins screen appears. Retrieve the initial administrator password from the instance:

cat /var/lib/jenkins/secrets/initialAdminPassword

The output looks like this example:

7d3a6676bf72419bb4d00f6143a456a7

Copy the password, paste it into the Administrator password field in your browser, then click Continue.

4

Install plugins

After you unlock Jenkins, the Customize Jenkins screen offers two options:

  • Install suggested plugins is recommended for most use cases. It installs commonly used plugins, including Git, Pipeline and other essentials.
  • Select plugins to install lets you choose your own plugins.

Click the option you prefer. Installation can take 30 to 60 seconds, depending on your instance type and network speed. The screen may appear blank for a moment during installation, which is normal.

5

Create the admin user

When plugin installation completes, the Create First Admin User screen appears. Complete the form:

  • Enter a Username for your admin account.
  • Set a strong Password and confirm it.
  • Enter your Full name and Email address.
  • Click Save and Continue.
6

Configure the instance URL

The Instance Configuration screen shows the Jenkins URL. Set it to the URL where your users will access Jenkins. The default is the current IP address and port.

For production use, consider setting it to your DNS hostname, for example http://jenkins.yourdomain.com:8080.

Click Save and Finish, then click Start using Jenkins. Jenkins is now ready to use.

Server Components

Component versions and install paths:

  • Jenkins 2.361.1, install path /etc/sysconfig/jenkins
  • Java (OpenJDK) 11.0.15, install path /bin/java

Note: The automatic OS package update script can update component versions on first boot.

Filesystem Layout

Mount points:

  • /: root filesystem (38 GB)
  • /boot: operating system kernel files (2 GB)

Key Jenkins directories:

  • /var/lib/jenkins: Jenkins home directory (jobs, configs, plugins)
  • /var/lib/jenkins/workspace: build workspace for jobs
  • /var/lib/jenkins/plugins: installed plugins
  • /var/log/jenkins: Jenkins application logs
  • /etc/sysconfig/jenkins: Jenkins service configuration

Managing the Jenkins Service

Jenkins is managed by systemd and starts automatically on boot.

Check the service status:

systemctl status jenkins

Stop Jenkins:

systemctl stop jenkins

Start Jenkins:

systemctl start jenkins

Restart Jenkins:

systemctl restart jenkins

View the Jenkins logs:

journalctl -u jenkins -f

Scripts and Log Files

Both files are in /stage/scripts:

  • initial_boot_update.sh updates the OS with the latest packages on first boot.
  • initial_boot_update.log is the output log of the boot update script.

On Startup

An OS package update script runs on first boot to bring the image fully up to date. To disable it, remove the script and its crontab entry:

rm -f /stage/scripts/initial_boot_update.sh crontab -e
# Delete the following line, save and exit: @reboot /stage/scripts/initial_boot_update.sh

Troubleshooting

Cannot access Jenkins web interface on port 8080

  • Verify the Jenkins service is running: systemctl status jenkins
  • Check that your security group allows inbound traffic on port 8080 from your IP.
  • Make sure the instance has passed 2/2 status checks.
  • Check the Jenkins logs for errors: journalctl -u jenkins --no-pager -n 50

Jenkins is slow or unresponsive

  • Check available memory: free -m. Jenkins needs at least 1 GB RAM and benefits from 4 GB or more.
  • Consider a larger instance type if you run multiple concurrent builds.
  • Review the number of executors in Manage Jenkins > System Configuration.

Lost the initial admin password

After the initial setup completes, the initialAdminPassword file is deleted. To reset access, run:

sudo su - systemctl stop jenkins
# Edit /var/lib/jenkins/config.xml and set <useSecurity>false</useSecurity> systemctl start jenkins
# Access Jenkins without auth, then re-enable security from Manage Jenkins

Plugin installation fails

  • Verify the instance has outbound internet access. Check your security group and route table.
  • Check proxy settings if the instance runs behind a corporate firewall.
  • Install the plugins manually from Manage Jenkins > Manage Plugins > Available.

Security Recommendations

  • Restrict access. Allow port 8080 only from trusted IP addresses in your security group.
  • Enable HTTPS. Run Jenkins behind a reverse proxy, such as NGINX, with an SSL certificate.
  • Configure authentication. Use the built-in Jenkins user database or integrate with LDAP or Active Directory.
  • Keep plugins updated. Regularly update Jenkins and its plugins from Manage Jenkins > Manage Plugins.
  • Use role-based access. Install the Role Based Authorization Strategy plugin for granular permissions.
  • Secure the Jenkins home directory. Make sure /var/lib/jenkins is accessible only by the jenkins user.
  • Keep CSRF protection enabled. It is enabled by default in modern Jenkins versions. Do not disable it.

Support

If you have any issues with this product, contact SecureAnyCloud support:

  • Email: sales@secureanycloud.com
  • Website: secureanycloud.com
  • Support hours: 24/7, with a guaranteed 24 hour response SLA

Deploy on AWS

Launch Jenkins with 24/7 support from SecureAnyCloud.

View on Marketplace

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com