I think the best way to start messing with openstack is to install openstack using devstack.
7. If anything in the installation process goes wrong one can check the logs from /opt/logs/stack.sh.log.
If you get any error about permission of the file, change the permission of that file to executable.
10. Some basic commands to work with the screens.
a. ctrl a and then ' is used to switch b.w windows one can use ctrl a and then " also.
b. To quickly scroll through the window, one can enter the copy mode by pressing ctrl a and then [ . Use arrow keys to move up and down.
c. To restart any of the services one can simply kill the that particular service by ctrl c and then run it again. Note: to restart horizon one has to restart the apache.
sudo service apache2 restart
d. ctrl a and then d exit the screen, but won't kill the openstack, screen -x will get back the screens again.
11. To restart.
./unstack.sh
./rejoin.sh
12. To uninstall.
./unstack.sh
to remove it completely
./unstack.sh
./clean.sh
Its easy, customizable, easy to debug and the best part is one can simply discard the installed one and install new one in no time !
So I'll be giving you the steps to install openstack on a physical box.
i.e all the component of the openstack will be installed on a single machine.
Steps to follow.
1. Create a user as 'stack'.
adduser stack
2.Install sudo and give the user 'stack' the sudo permission as most of the installation requires sudo permission.
apt-get install sudo -y || yum install -y sudo
echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
2a. Once done with that, one can assign a password by doing
passwd stack
and then logout as root and login back as stack for all of the below steps.
2a. Once done with that, one can assign a password by doing
passwd stack
and then logout as root and login back as stack for all of the below steps.
3.Get the openstack code. The steps are install git and clone the code from github.
sudo apt-get install git -y || yum install -y git
git clone https://github.com/openstack-dev/devstack.git
4.Here is the little complicated part of the process. Go to devstack folder and copy the local.conf or localrc file from sample to current location.
cd devstack
cp devstack/samples/local.conf or localrc .
5. One can add the following configurations to the file. Floating_range is for floating ips. Floating IP is the IP which is visible outside the openstack, its like external IPs, one should be careful to avoid the ip conflicts. Fixed IP are visible within the openstack. Change passwords to whatever you feel like. ( this is my working copy )
Go to this link for completely working sample
Go to this link for completely working sample
6. Just run the below file , sit back and relax.
./stack.sh
7. If anything in the installation process goes wrong one can check the logs from /opt/logs/stack.sh.log.
If you get any error about permission of the file, change the permission of that file to executable.
8. Once the script is done executing enter the IP address of the machine in the browser to access the horizon dashboard.
9. Once you are done with it , your new shiny openstack is ready to mess with. All the services will be running in screen.
screen -x
will open up the openstack screen.
If you want to see the individual logs for each of services head to /opt/stack/logs/screen.
9. Once you are done with it , your new shiny openstack is ready to mess with. All the services will be running in screen.
screen -x
will open up the openstack screen.
If you want to see the individual logs for each of services head to /opt/stack/logs/screen.
10. Some basic commands to work with the screens.
a. ctrl a and then ' is used to switch b.w windows one can use ctrl a and then " also.
b. To quickly scroll through the window, one can enter the copy mode by pressing ctrl a and then [ . Use arrow keys to move up and down.
c. To restart any of the services one can simply kill the that particular service by ctrl c and then run it again. Note: to restart horizon one has to restart the apache.
sudo service apache2 restart
d. ctrl a and then d exit the screen, but won't kill the openstack, screen -x will get back the screens again.
11. To restart.
./unstack.sh
./rejoin.sh
12. To uninstall.
./unstack.sh
to remove it completely
./unstack.sh
./clean.sh
Nice blog... This blog is complete guide on how to install Openstack. Can you please share install openstack swift in your next blog
ReplyDeleteThank you.
ReplyDelete