Code Monkey home page Code Monkey logo

jenkins-ec2-https's Introduction

jenkins-ec2-https

How to setup Jenkins CI on EC2 (Ubuntu 22.04 LTS) with https access and self-signed certificates.

This task took me three hours ages ago with Ubuntu 16.04 (and probably still painful with 22.04) by reading a lot of web pages and lots of trial and error. To make your life easier this is what you need to do to setup a Jenkins CI instance using your AWS account.

I've tested this process and it took exactly 5 minutes to get to the https login screen of the new jenkins instance. Most of that time is waiting for the scripted installation of components on the AWS instance.

Create an EC2 instance

  • open AWS Console in browser
  • go to EC2
  • select Launch Instance
  • select Ubuntu Server 22.04 LTS
  • select t2.micro (I use t2.small to get more memory for my greedy build)
  • choose or create a Key Pair
  • go to Network settings - Firewall
  • allow SSH Traffic
  • allow HTTPS traffic from the internet
  • go to Storage
  • change size to preferred (I use 100GB for our large enterprise builds)
  • go to Advanced Details
  • enable Termination Protection (because you will have useful job configuration on that instance that you probably don't want to lose by accident)
  • select Launch
  • In EC2 go to instances, once instance running then select instance and click Connect
  • copy ssh command in the example to terminal and run (you'll need your referenced key file present in that directory)

Deploy jenkins

Login to the instance using the ssh command mentioned above. Then run:

wget --no-cache https://raw.githubusercontent.com/davidmoten/jenkins-ec2-https/master/setup.sh && chmod +x setup.sh

Now edit the file setup.sh and edit the top block of parameters with the values you want to see in the generated certificate for jenkins website.

# I use vi, you might use nano or anything else you're comfortable with
vi setup.sh

Now run setup:

./setup.sh

Now go to https://your_instance in the browser and paste in the last line output by the setup.sh script into the administration password in the browser. If the browser times out go to the same url again (make sure it's https). That's it!

Sources

jenkins-ec2-https's People

Contributors

davidmoten avatar vanhumbeecka avatar

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.