The provisioning process will incur costs and do not use following configuration for production setup.
Below are the following AWS resources to be created during provisioning process.
AWS Resources
Type | Description |
---|---|
EC2 | AWS EC2 Instance t3.medium (Jenkins Server) |
EC2 | AWS EC2 Instance t3.small (Jenkins Slave) |
EBS Root Volume | 50GB gp3 for Jenkins Server |
EBS Root Volume | 50GB gp3 for Jenkins Slave |
Public IP | Dynamic Public ip address for Jenkins Server |
Public IP | Dynamic Public ip address for Jenkins Slave |
Security Group | jenkins-server-cloud-workshop allow ports 80/443/22 |
Security Group | jenkins-slave-cloud-workshop allow ports 22 |
Key Pair | RSA Algorithm for SSH connection |
Tools Used for this workshop
Tools |
---|
Bash Script |
Terraform |
Ansible |
AWSCLI |
To start the provisioning process.
Note: Make sure you are in ap-southeast-1
region on AWS console
lab-src
where our script is located.## Clone the repository
git clone https://github.com/redopsbay/cloudworkshop-lab-source.git
cd cloudworkshop-lab-source//AWS/cicd/jenkins/jenkins-setup-ec2
workshop.sh
as executable file. So, we can execute it.chmod +x workshop.sh
workshop.sh
via:./workshop.sh
============= Choose target action =============
1) Setup CLI Binaries
2) Provision Jenkins
3) Cleanup Terraform Resources
Choose action:
1
as desired action to install necessary package dependencies such as terraform
cli.============= Choose target action =============
1) Setup CLI Binaries
2) Provision Jenkins
3) Cleanup Terraform Resources
Choose action: 1
./workshop.sh
============= Choose target action =============
1) Setup CLI Binaries
2) Provision Jenkins
3) Cleanup Terraform Resources
Choose action: 2
The provisioning process will use your AWS default VPC for the sake of this workshop.
just wait for a few minutes. The Jenkins initial admin password will be provided at the console.
Here, After a few minutes, the jenkins initial admin password has been displayed.
server_public_dns
value from terraform output. In my case http://ec2-13-212-62-187.ap-southeast-1.compute.amazonaws.comClick Install Suggested Plugin.
Then, setup your new Admin account.
To avoid such costs. We have to cleanup our AWS resources.
Navigate again to your cloudshell and navigate to the cloudworkshop-lab-source/AWS/cicd/jenkins/jenkins-setup-ec2
directory.
Next, run the workshop.sh
script via:
./workshop.sh
3
to cleanup terraform resources.