In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
How does Jenkins solve the slow and offline problems of downloading plug-ins? I believe that many inexperienced people are at a loss about this. This article summarizes the solutions to these two problems. Through this article, I hope you can solve this problem.
The first problem is that offline jenkins is usually encountered when installing jenkins. At present, most of them have some problems because of many visits to foreign servers, but some will not affect or even operate normally, but some will appear offline, so we still need some ways to deal with this problem.
At present, to solve this problem, whether it is k8s or traditional deployment, these configurations have to be modified in the working directory.
Replace this https with http.
That is, under the default working directory, this directory depends on where you put it when you deploy jenkins. If you don't set it, it is in the file / root/.jenkins/hudson.model.UpdateCenter.xml.
Because I deployed it in k8s, I changed it in the persistent directory here, but it's all the same.
[root@k8s-node3 kubernetes] # cd default-jenkins-home-pvc-c6e2ac7d-c2fc-4b8c-87c4-d73ea176049e/ [root@k8s-node3 default-jenkins-home-pvc-c6e2ac7d-c2fc-4b8c-87c4-d73ea176049e] # cat hudson.model.UpdateCenter.xml default http://updates.jenkins.io/update-center.json
Like here need to restart, I directly delete pod, this default K8s will automatically help you start another one, data will not be lost, because of the use of persistence
Check if it is normal, and the test is ready to download the plug-in.
The second problem is to install plug-ins. The server of jenkins is abroad, so some will cause slow downloading of plug-ins, so it is necessary to change the address of jenkins plug-ins to domestic access addresses.
Mine is deployed by K8s, so the working directory of persisting this directory is put here. If it is traditional, the working directory is not modified by default in / root/.jenkins/updates/default.json.
If you modify it, replace the foreign address according to your own working directory.
[root@k8s-node3 ~] # cd / ifi/kubernetes/
Enter the persistence directory and go to the default default
[root@k8s-node3 kubernetes] # cd default-jenkins-home-pvc-9d58c2b2-e325-4fae-a83a-808f3d5175ef/updates [root@k8s-node3 updates] # cat default.json
If you modify this directory, you will see the google address by default, and the download plug-in is also the update address, so the download will be slow. Of course, this plug-in usually goes to the web page to see the files under the updates, and the default download will load this address, so you need to replace all the configurations with the Tsinghua source, and many of them do not take effect before. So the ultimate solution is to replace the json here, and restart restart under the jenkins directory to let it take effect, or the traditional way to deploy war is to restart the war package.
To replace, here, because many foreign countries need to replace domestic ones with sed.
[root@k8s-node3 updates] # sed-I 's/http:\ /\ / updates.jenkins-ci.org\ / download/https:\ / mirrors.tuna.tsinghua.edu.cn\ / jenkins/g' default.json & &\ sed-I' s/http:\ /\ / www.google.com/https:\ /\ / www.baidu.com/g' default.json
It is no problem to install the plug-in now.
It is also easy to test the speed of installing plug-ins now.
After reading the above, can you independently solve the problem of slow and offline downloading of Jenkins plug-ins? If you want to know more about the content of the article, welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
After downloading and installing the GHOST software
© 2024 shulou.com SLNews company. All rights reserved.