In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Opesntack tranning labs provide an easy way to deploy virtualized OpenStack in desktop environments. Training Labs supports all modern Linux, Windows and macOS platforms. Before running Training Labs, you need to install VirtualBox or KVM / libvirt. Unzip the compressed files into a folder and prepare to deploy your own OpenStack Training Labs cluster with one click.
Download address: docs.openstack.org/training_labs/
Documentation: wiki.openstack.org/wiki/Documentation/training-labs#Building_the_cluster
installation preparation
For installation and test methods, refer to Huawei's HCIP-Cloud_Computing-OpenStack_V1.0_Lab Manual.
Test method, using x86 server, server brand is second-hand HP, hard disk 500G, 4-way CPU, 40G memory, single gigabit network card, address is 172.31.208.31/24. Install unbuntu18.04LTS, use virtualbox 5.2,openstack-labs version is Stein, the following is the recommended experimental environment
Network Description
Experiment environment Install ubuntu operating system on the server, install virtualBox software on ubuntu, deploy openstack experiment environment in virtualbox through openstack automatic installation script, including a controller node and a compute node
ubuntu configuration
After installing ubuntu18 with gnome, we need to update the software source and enable remote desktop login configuration
By default ubuntu does not have a root password, and there is no SSH service. By default, root users are not allowed to log in ssh. need to configure themselves.
sudo passwd #create root password sudo apt-get install opensh-server #install ssh service sudo systemctl start ssh #Open SSHsudo systemctl enable sshsudo systemctl stop ufw #close firewall sudo systemcll disable ufw
In order to speed up software downloads, it is necessary to configure domestic software sources
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #Backup software sources sudo gedit /etc/sources.list #Edit
Add at the beginning of the file
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
Update system after saving
sudo apt-get updatesudo apt-get upgrade
Patience waiting for update complete
Next, use xrdp to enable remote login.
sudo apt install xrdp
edit the configuration file
sudo vim /etc/xrdp/startwm.sh
Comment out the bottom two lines of test and exec and add one line
gnome-session
And then ubuntu settings to open sharing
Configure Screen Sharing
After configuration, restart ubuntu. Then you can log in using windows remote desktop
As follows:
Then configure virtualbox
Recommended to use unbuntu gnome software store search download
Confirm installation after download
sudo dpkg-query -l virtualbox
Install opesntack labs
Complete the openstack installation in virtualbox by running the openstack automated installation script.
The controller node and compute node of openstack are both ubuntu operating system (during script installation, the Ubuntu operating system image file will be automatically pulled down, and two virtual machine network cards will be automatically created for ubuntu
vboxnet0:10.0.0.1/24
vboxnet1:203.0.113.1/24
The process is as follows:
First, download openstack, visit docs.openstack.org/training_labs/
After downloading, save to desktop
and then decompress it.
sudo tar -xvf labs-master.tgz
After decompression, the directory structure is as follows:
To avoid insufficient openstack environment, open the config file config.compute1 and modify it as follows
sudo cd labssudo vim labs/config/config.compute1
Install Python
sudo apt install python
Once done, go to the/labs directory and run the st.py script
cd labs./ st.py -b cluster
If there is an error during installation, try running the script again. If there is still a problem, you can view the corresponding log file under/labs/log. After troubleshooting, run the script again.
Wait for the system to automatically install openstack in virtualbox, this process takes about 3 hours. until the following message appears, indicating successful installation
The results that appear represent the default login information for the lab environment.
the problems encountered
During the installation process, you will get a "ERROR vm_ssh:Aborting" card, as follows:
Query the official website documentation, https://wiki.openstack.org/wiki/Documentation/training-labs#Building_the_cluster, below are instructions on using virtualbox to build clusters
The control node and compute node communicate in virtualbox using tcp2230 and 2232 of ssh protocol. I suspect that ssh protocol login does not obtain each other's key.
So I tried the following
ssh -p 2230 osbash@localhost #Password osbash
Then run the openstack installation script again, and it doesn't get stuck here. problem solved
it's amazing
Update:
Later, when deploying, it repeatedly appeared that compute node compute1 could not be installed successfully. This was a bug, and the specific reason was unknown. Later, I found the relevant bug description on foreign forums. The post address is as follows:
https://bugs.launchpad.net/labs/+bug/1803819
I summarized the following, and queried some stackoverflow documents, this is probably python2 subproc module in the shell command call bug, the phenomenon is to use the ssh command will throw an exception, there is a certain probability of occurrence
I'm going to use the following method
That is, manually upload SSH keys and associated configuration files to controller and compute nodes
This is done by:
After the first deployment failure, manually upload the installation script from the host to the controller and compute nodes using ssh when rerunning the installation script.
ssh -q -i /home/yangchao/labs/lib/osbash-ssh-keys/osbash_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ControlPath=none -p 2230 osbash@127.0.0.1 mkdir -p autostart && ssh -q -i /home/yangchao/labs/lib/osbash-ssh-keys/osbash_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ControlPath=none -p 2232 osbash@127.0.0.1 mkdir -p autostart
Note that the above command must be run multiple times while the installation script is running, because the controller and compute nodes will restart and configure the virtual network when the deployment script is re-run
After completion, it will be as follows:
At this time, enter http://127.0.0.1:8888/horizon in the browser of the host machine to enter the dashboard of openstack, and at the same time, you can create an instance normally.
Log in to the controller node and check that the nova service is running normally. The compute node has been added.
ssh osbash@127.0.0.1 -p 2230 #Login controller node, password osbash. admin-openrc.sh #Import openstack environment variable to use opnstack command nova service-list #Check the service status of controller node and compute node nova
Remember, only the host can log in to openstack.
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.