|
| 1 | +# Setup Jenkins Server |
| 2 | + |
| 3 | +The DevOps team at xFusionCorp Industries is initiating the setup of CI/CD pipelines and has decided to utilize Jenkins as their server. Execute the task according to the provided requirements: |
| 4 | + |
| 5 | +1. Install jenkins on jenkins server using yum utility only, and start its service. You might face timeout issue while starting the Jenkins service, please refer this link for help. |
| 6 | + |
| 7 | +2. Jenkin's admin user name should be `theadmin`, password should be `Adm!n321`, full name should be `Siva` and email should be `siva@jenkins.stratos.xfusioncorp.com`. |
| 8 | + |
| 9 | +Note: |
| 10 | + |
| 11 | +1. For this task, access the Jenkins server by SSH using the `root` user and password `S3curePass` from the jump host. |
| 12 | + |
| 13 | +2. After Jenkins server installation, click the Jenkins button on the top bar to access the Jenkins UI and follow on-screen instructions to create an admin user. |
| 14 | + |
| 15 | +## Steps |
| 16 | + |
| 17 | +1. Login into server |
| 18 | + |
| 19 | +2. Install `wget` and Download `jenkins repo` |
| 20 | + |
| 21 | + ```sh |
| 22 | + sudo yum install -y wget |
| 23 | + sudo wget -O /etc/yum.repos.d/jenkins.repo \ |
| 24 | + https://pkg.jenkins.io/redhat-stable/jenkins.repo |
| 25 | + sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key |
| 26 | + ``` |
| 27 | + |
| 28 | +3. Install JDK and Jenkins |
| 29 | + |
| 30 | + ```sh |
| 31 | + sudo yum upgrade |
| 32 | + # Add required dependencies for the jenkins package |
| 33 | + sudo yum install -y fontconfig java-21-openjdk |
| 34 | + sudo yum install -y jenkins |
| 35 | + sudo systemctl daemon-reload |
| 36 | + ``` |
| 37 | + |
| 38 | +4. Start Jenkins Service |
| 39 | + |
| 40 | + ```sh |
| 41 | + sudo systemctl enable jenkins |
| 42 | + sudo systemctl start jenkins |
| 43 | + ``` |
| 44 | + |
| 45 | +5. Login Into Jenkins Using initalPassword |
| 46 | + |
| 47 | + ```sh |
| 48 | + cat /var/lib/jenkins/secrets/initialAdminPassword |
| 49 | + ``` |
| 50 | + |
| 51 | +6. Select Suggested plugin to install and make sure email extension is installed. Otherwise you won't be able to add user's email. |
| 52 | + |
| 53 | +7. Create Admin User with given credential |
| 54 | + |
| 55 | +8. `Save and Continue` |
| 56 | + |
| 57 | +9. Jenkins URL: Set An URL or go with default one |
| 58 | +10. SAVE and Finish. |
0 commit comments