-
AWS account, REF
-
Domain name
Dependencies to be prepared before the workshop,REF
-
Prepare an EC2 instance
-
Use Ubuntu 18.04
-
Use default ssh key
-
Command to login:
ssh ubuntu@PUBLIC_IP
-
Enable the 8080 port
-
-
Prepare Jenkins
A. Install Java
``` sudo apt update sudo apt install openjdk-8-jdk ```
B. Install repository
``` wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt update sudo apt install jenkins ```
C. Start Jenkins
``` sudo systemctl start jenkins sudo systemctl status jenkins ```
-
Use nginx as reverse proxy and enable https
A. install nginx
sudo apt install nginx
B. Configure subdomain pointing to the PUBLIC_IP
C. enable ssl with certbot
sudo add-apt-repository ppa:certbot/certbot sudo apt update sudo apt install python-certbot-nginx sudo certbot --nginx -d jenkins-ci.coderbunker.com sudo nginx -t sudo systemctl reload nginx
D. check
https://jenkins-ci.coderbunker.com/
URL -
Configure Jenkins
A. Access Jenkins from PUBLIC_IP:8080
B. Get the token for login
``` sudo cat /var/lib/jenkins/secrets/initialAdminPassword ```
C. Choose Install suggested plugins
D. Create admin user
-
Fix creating Jenkins Job page keeps loading problem, with installing Warnings Plugin
-
Generate your github token, and add to credential
-
Create a new instance for slave node
sudo apt update sudo apt install openjdk-8-jdk sudo apt install nodejs npm sudo npm install -g n sudo n latest sudo apt install awscli
-
Add slave ssh key to credential
-
Connect Slave Node
Remote root directory: /home/ubuntu/jenkins
Labels: jenkins-slave
Host: PUBLIC_IP
-
Create an IAM user
-
Create S3 bucket for static site hosting, REF
-
Set DNS pointing to the S3 bucket
-
Create a react app as Github repo
-
Add Jenkins configuration
-
Setup the Github Webhook
- Upgrade Jenkins on Ubuntu 18.04:
sudo apt install --only-upgrade jenkins