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 > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
If it is normal, when we switch the computer room in the background, if there are no free machines in the computer room, for example, Region is full will appear when we switch to DC8 CN2. The problem with Please try again in a few hours, because DC8 has been out of stock at present. However, some netizens mentioned that you can use the script to use the bricklayer API for automatic search switching, which is actually using the constant requests of the script. If someone switches or deletes or expires the DC8 at this time, you can jump the queue quickly.
Through this principle, you can switch the computer room much faster and automatically than yourself by hand, and the success rate is high. This script and solution will be shared in this article.
First, prepare API
Here enter the background of the current bricklayer VPS host KIWIVM, and then see the menu of API on the left. We can see Your VEID and Your API KEY on the right. For API KEY, click the button above to get it. So we can get two parameters.
Second, modify script editing
Script address: https://www.52banwagong.com/shells/dc8.sh
We can download this script.
1 、 CentOS
Yum-y install wget vim screen & & wget-- no-check-certificate https://www.52banwagong.com/shells/dc8.sh
2 、 Debian/Ubuntu
Apt-get install-y wget screen & & wget-- no-check-certificate https://www.52banwagong.com/shells/dc8.sh
Then edit the script:
Here, fill in the two parameter information of API that we have obtained.
Third, run the script
Chmod + x dc8.sh
Screen-S dc8
. / dc8.sh
Run the script.
If we have "{" error ": 734104," message ":" Region is full. Please try again in a few hours. "}", indicating that there is no machine in DC8 currently, we can use the following script to mount automatically and wait for any error to be reported.
Nohup. / dc8.sh &
This will be done all the time, the server will be restarted when the migration is complete, and an email will be sent to us. After the migration is complete, the script will not be running.
Fourth, attach all the scripts
#! / bin/bash
B=USCA_8
# Please fill in the following information before running the script #
VEID= # # Please find the VEID in the backend API of the bricklayer and fill in it here. Write it directly after the equal sign without any spaces.
API_KEY= # # Please find the API_KEY in the backend API of the bricklayer and fill in it here. Write it directly after the equal sign without any spaces.
# Please fill in the above information before running the script #
Info () {
A = (`wget-qO- "https://api.64clouds.com/v1/migrate/getLocations?&veid=${VEID}&api_key=${API_KEY}" | cut-d": "- f3 | cut-d", "- F1 | sed's /\" / / g``)
}
Info
While [[$A! = $B]]
Do
Wget-qO- "https://api.64clouds.com/v1/migrate/start?location=${B}&veid=${VEID}&api_key=${API_KEY}"
Sleep 10s
Info
Done
All the scripts are posted here, and we can copy them directly and modify our own definition names.
Originally available at: https://www.52banwagong.com/523.html
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
© 2024 shulou.com SLNews company. All rights reserved.