-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DevOps Tools - Added Jenkins Installation script
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Jenkins Installation | ||
|
||
The bash script in `install-jenkins` files automates the installation of the Jenkins (LTS) version on a Debian-based Linux system that includes Ubuntu and more.<br> | ||
The script will first request for updates, then install Java which is a prerequisite for Jenkins after that it: | ||
- Installs Jenkins | ||
- Starts the service | ||
- Displays the initial admin password. | ||
|
||
# How to use the Installation script | ||
|
||
1. Open your terminal by pressing the `ctrl + alt + t` command on your keyboard. | ||
2. You can then clone this repo using the command: | ||
|
||
``` | ||
git clone https://github.com/the-1Riddle/packageInstallationHub.git | ||
``` | ||
3. Move to the directory where the script is, you can use this command: | ||
|
||
``` | ||
cd packageInstallationHub/DevOps-Tools/Jenkins | ||
``` | ||
4. Execute the file to install the package. | ||
|
||
``` | ||
sudo ./install-jenkins.sh | ||
``` | ||
|
||
Lastly, when the execution is done, the initial admin password will be displayed in the terminal.<br> | ||
Go to `http://<your_server_ip>:8080` to complete the initial setup using the displayed admin password. | ||
Then you can configure Jenkins according to your requirements after the initial setup. | ||
|
||
|
||
> **Option**\ | ||
> Feel free to delete the cloned directory when you are done with the installation | ||
**Good Luck** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# Update the system | ||
sudo apt-get update | ||
|
||
# Install Java (required for Jenkins) | ||
sudo apt-get install -y openjdk-11-jdk | ||
|
||
# Add the Jenkins repository to the system | ||
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - | ||
|
||
# Add the Jenkins repository to the sources list | ||
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | ||
|
||
# Update the system after adding the repository | ||
sudo apt-get update | ||
|
||
# Install Jenkins | ||
sudo apt-get install -y jenkins | ||
|
||
# Start Jenkins | ||
sudo systemctl start jenkins | ||
|
||
# Enable Jenkins to start on boot | ||
sudo systemctl enable jenkins | ||
|
||
# Display the status of Jenkins | ||
sudo systemctl status jenkins | ||
|
||
# Output initial admin password | ||
echo "Initial Admin Password:" | ||
sudo cat /var/lib/jenkins/secrets/initialAdminPassword |