Você está na página 1de 22

OpenStack Client

Installation
Installation Client (Windows Environment)

• Make Sure Python Software Should be Installed on your Machine


• https://www.python.org/downloads/windows/

• Ensure that you have installed Git Bash by installing git for Windows.
• http://gitforwindows.org/

• C:\Python27 : This is Location of my Python Software


Enter the following Commands
• C:\Users\Administrator>pip install virtualenv

• C:\Users\Administrator>virtualenv openstack-cli

• C:\Users\Administrator>.\openstack-cli\Scripts\activate

• (openstack-cli) C:\Users\Administrator> pip install python-


openstackclient
Installation Client (Linux Environment)
• yum install python-devel python-pip

• pip install python-openstackclient


Download and source the OpenStack RC file

• To set the required environment variables for the OpenStack


command-line clients, you must create an environment file called an
OpenStack rc file, or openrc.sh file.

• If your OpenStack installation provides it, you can download the file
from the OpenStack dashboard as an administrative user or any other
user. This project-specific environment file contains the credentials
that all OpenStack services use.
Values in the RC File
• export OS_PROJECT_DOMAIN_NAME=default
• export OS_USER_DOMAIN_NAME=default
• export OS_PROJECT_NAME=projectName
• export OS_USERNAME=username
• export OS_PASSWORD=password
• export OS_AUTH_URL=http://identityHost:portNumber/v3
• export OS_IDENTITY_API_VERSION=3
• export OS_IMAGE_API_VERSION=2
Troubleshooting with OpenStack

• Here are the services that must be running on Controller node(s), if


any one of them is failing

systemctl status httpd.service


systemctl status memcached.service
systemctl status mariadb
systemctl status ntpd
Log Locations at OS Level:
• /var/log/keystone/keystone.log > Check this file is you are facing
authentication related errors on different services.
• /var/log/nova/nova-api.log > This log file is located on both
controller and compute nodes. Open this file to see whats exactly
error your compute component is throwing when using compute
related operation from horizon or command line.
• /var/log/nova/nova-cert.log > Check this file if you compute node is
throwing errors related to secure layer protocol. This file will be
available on controller node only.
• /var/log/nova/nova-novncproxy.log > If you are able to launch
instances but can not access their VNC console, then this is the
correct log file to look for. It is located on Controller node only.

• /var/log/nova/nova-compute.log > This is the most important log file


and is located on Compute nodes only. If you are unable to launch
new instances, use this log file to identify the exact source of
problem.
• Following compute related services should be in “Running” status on
Controller nodes.

• systemctl status openstack-nova-api.service


• systemctl status openstack-nova-cert.service
• systemctl status openstack-nova-consoleauth.service
• systemctl status openstack-nova-scheduler.service
• systemctl status openstack-nova-conductor.service
• Following services should be in “Running” status on Compute nodes.

• systemctl status libvirtd.service


• systemctl status openstack-nova-compute.service
Compute service sample configuration files

Files in this section can be found in /etc/nova.

• api-paste.ini : The Compute service stores its API configuration


settings in the api-paste.ini file.

• policy.yaml : Each OpenStack service, Identity, Compute,


Networking, and so on, has its own role-based access policies. They
determine which user can access which objects in which way, and are
defined in the service’s policy.yaml file.
• rootwrap.conf
The rootwrap.conf file defines configuration values used by the
rootwrap script when the Compute service needs to escalate its
privileges to those of the root user.

nova.conf contains most of the Compute configuration options and


resides in the /etc/nova directory.
Neutron
• /var/log/neutron/server.log > If you are unable to create networks or
routers, this is the very first log file to check. It is located on
Neutron/Network node

• /var/log/neutron/openvswitch-agent.log > It is located on both


Network and Compute nodes. If your virtual machines are failing to
reach external network or virtual routers, you should check this file
for identifying the exact errors.
• /var/log/neutron/metadata-agent.log > This file can be found on
either Controller or Compute node. It stores common neutron errors
with respect to metadata.
• The log for the DHCP agent (neutron-dhcp-agent).
On Controller node, make sure following command returns service status as
“Running”:
• systemctl status neutron-server.service

Following are the commands to verify that all neutron related services are running
fine on Network Node. If any one of the followings returns failed status, Neutron is
likely to not function to its fullest.
• systemctl status neutron-openvswitch-agent.service
• systemctl status neutron-l3-agent.service
• systemctl status neutron-dhcp-agent.service neutron-metadata-agent.service

Following are the services that must be in “Running” state on Compute nodes.
• systemctl status openvswitch.service
• systemctl status neutron-openvswitch-agent.service
• The neutron.conf file contains the majority of Networking service options
common to all components.

• The api-paste.ini file contains configuration for the web services gateway
interface (WSGI).

• The policy.json defines API access policy.

• The rootwrap.conf file contains configuration for system utilities that require
privilege escalation to execute.

• The plugins/ml2/ml2_conf.ini file contains configuration for the ML2 plug-in.


• The Modular Layer 2 (ml2) plugin is a framework allowing OpenStack
Networking to simultaneously utilize the variety of layer 2 networking
technologies found in complex real-world data center
How to Start and Stop the Openstack
• Either we have to stop all the services running on Linux Manually one
by one.

• openstack-utils package does not come pre-installed with OSP10, and


has to be installed separately enabling the repository rhel-7-server-
openstack-10-devtools-rpms.

Você também pode gostar