The tasks are:
The xFusionCorp development team added updates to the project that is maintained under /opt/official.git repo and cloned under /usr/src/kodekloudrepos/official. Recently some changes were made on Git server that is hosted on Storage server in Stratos DC. The DevOps team added some new Git remotes, so we need to update remote on /usr/src/kodekloudrepos/official repository as per details mentioned below:
a. In /usr/src/kodekloudrepos/official repo add a new remote dev_official and point it to /opt/xfusioncorp_official.git repository.
b. There is a file /tmp/index.html on same server; copy this file to the repo and add/commit to master branch.
c. Finally push master branch to this new remote origin.
Which lab is this? Is this from “100 Days of Devops” (in which case, which day is this?) or is this regular KK Engineer (in which case I’d need topic, level, and task).
Hi @rob_kodekloud,
It is “100 Days of Devops” “Git manage remotes” “Day 26”. It has kept me stranded for couple of days.
This one is not too hard.
- You need to be on ststor01 (
ssh natasha@ ststor01).
- All of the repos belong to root, so
sudo -i to do that.
- I didn’t do any of the action as user natasha, which may be your error.
- Create the new remote (dev_official in your version of the task).
- Make sure you’re in branch master in the downstream repo (i.e., the one under /usr/src/kodekloudrepos).
- Add the index.html file to the branch.
-
git push dev_official master.
This sufficed for me to pass the task.
Thanks a lot @rob_kodekloud. It worked. I really appreciate.
Hi @rob_kodekloud. Here is the question. The path you provided doesn’t resonate with the question. The DevOps team was looking for a solution where they want to restart Apache service on all app servers if the deployment goes fine on these servers in Stratos Datacenter. After having a discussion, they came up with a solution to use Jenkins chained builds so that they can use a downstream job for services which should only be triggered by the deployment job. So as per the requirements mentioned below configure the required Jenkins jobs.
Click on the Jenkins button on the top bar to access the Jenkins UI. Login using username admin and Adm!n321 password.
Similarly you can access Gitea UI on port 8090 and username and password for Git is sarah and Sarah_pass123 respectively. Under user sarah you will find a repository named web.
Apache is already installed and configured on all app server so no changes are needed there. The doc root /var/www/html on all these app servers is shared among the Storage server under /var/www/html directory.
-
Create a Jenkins job named nautilus-app-deployment and configure it to pull change from the master branch of web repository on Storage server under /var/www/html directory, which is already a local git repository tracking the origin web repository. Since /var/www/html on Storage server is a shared volume so changes should auto reflect on all apps.
-
Create another Jenkins job named manage-services and make it a downstream job for nautilus-app-deployment job. Things to take care about this job are:
a. This job should restart httpd service on all app servers.
b. Trigger this job only if the upstream job i.e nautilus-app-deployment is stable.
LB server is already configured. Click on the App button on the top bar to access the app. You should be able to see the latest changes you made. Please make sure the required content is loading on the main URL https://<LBR-URL> i.e there should not be a sub-directory like https://<LBR-URL>/web etc.