Wednesday, March 8, 2017

Horizon External IP Fix





[root@cloud surinder_kumar_432]# curl "http://metadata.google.internal/computeMetadata/v1/instance/" -H "Metadata-Flavor: Google"
attributes/
cpu-platform
description
disks/
hostname
id
image
licenses/
machine-type
maintenance-event
name
network-interfaces/
scheduling/
service-accounts/
tags
virtual-clock/
zone
[root@cloud surinder_kumar_432]#

To get external-ip from within instance

[root@cloud surinder_kumar_432]# curl "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" -H "Metadata-Flavor: Google"
104.198.34.142
[root@cloud surinder_kumar_432]#


Internal-ip
$ curl "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip" -H "Metadata-Flavor: Google"
10.128.0.2
$


horizon-fix.sh


[root@cloud surinder_kumar_432]# cat horizon-ip-fix.sh #!/bin/shexternal_ip=`curl "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" -H "Metadata-Flavor: Google"`echo external ip : $external_ip
perl -p -i -e "s/ServerAlias localhost.*/ServerAlias localhost $external_ip/g" /etc/httpd/conf.d/15-horizon_vhost.conftail /etc/httpd/conf.d/15-horizon_vhost.confservice httpd restart[root@cloud surinder_kumar_432]#

Tuesday, March 7, 2017

Horizon Dashboard on Google Console

To get the horizon dashboad on Google Console (cloud)

1> Modify following file

/etc/httpd/conf.d/15-horizon_vhost.conf

Add ServerAlias for public ip address (similar to private ip address)
&
Restart httpd

# service httpd restart

2> This needs to be done for every start.

3> Sample file

<VirtualHost *:80>
  ServerName cloud.centos.lan

  ## Vhost docroot
  DocumentRoot "/var/www/"
  ## Alias declarations for resources outside the DocumentRoot
  Alias /dashboard/static "/usr/share/openstack-dashboard/static"

  ## Directories, there should at least be a declaration for /var/www/

  <Directory "/var/www/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Require all granted
  </Directory>

  ## Logging
  ErrorLog "/var/log/httpd/horizon_error.log"
  ServerSignature Off
  CustomLog "/var/log/httpd/horizon_access.log" combined

  ## RedirectMatch rules
  RedirectMatch permanent  ^/$ /dashboard

  ## Server aliases
  ServerAlias 10.128.0.2
  ServerAlias cloud.centos.lan
  ServerAlias localhost
  Serveralias 104.154.48.28
  WSGIDaemonProcess apache group=apache processes=3 threads=10 user=apache
  WSGIProcessGroup apache
  WSGIScriptAlias /dashboard "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi"
</VirtualHost>

4> Now access it

http://104.154.48.28/dashboard

User & password is OS_USERNAME (admin) and OS_PASSWORD in /root/keystonerc_admin

Openstack CentOS : RDO & packstack

Openstack on CentOS

1>

$ sudo yum install -y centos-release-openstack-newton
$ sudo yum update -y
$ sudo yum install -y openstack-packstack

$ sudo packstack --allinone


2> SSH Failure:


The installation log file is available at: /var/tmp/packstack/20170227-044407-0KWx7J/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub
Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                 [ ERROR ]
ERROR : Failed to run remote script, stdout:
stderr: Warning: Permanently added '10.128.0.2' (ECDSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Please check log file /var/tmp/packstack/20170227-044407-0KWx7J/openstack-setup.log for more information
Additional information:
 * A new answerfile was created in: /root/packstack-answers-20170227-044408.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might
 be problem for some OpenStack components.
[surinder_kumar_432@instance-2 ~]$ packstack --allinone
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20170227-044517-2PtJZS/openstack-setup.log
Packstack changed given value  to required value /home/surinder_kumar_432/.ssh/id_rsa.pub
Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                               [ ERROR ]
ERROR : Failed to run remote script, stdout:
stderr: Warning: Permanently added '10.128.0.2' (ECDSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Please check log file /var/tmp/packstack/20170227-044517-2PtJZS/openstack-setup.log for more information
Additional information:
 * A new answerfile was created in: /home/surinder_kumar_432/packstack-answers-20170227-044517.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might
 be problem for some OpenStack components.
[surinder_kumar_432@instance-2 ~]$



3> Fix:

# systemctl stop postfix firewalld NetworkManager
# systemctl disable postfix firewalld NetworkManager
# systemctl mask NetworkManager
# yum remove postfix NetworkManager NetworkManager-libnm

# setenforce 0
# getenforce
# vi /etc/selinux/config

disabled

# hostnamectl set-hostname cloud.centos.lan


# grep PermitRoot /etc/ssh/sshd_config
PermitRootLogin yes
# the setting of "PermitRootLogin without-password".
[root@instance-2 surinder_kumar_432]# systemctl restart sshd


[surinder_kumar_432@instance-2 ~]$ sudo su
[root@instance-2 surinder_kumar_432]# id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[root@instance-2 surinder_kumar_432]# setenforce 0
[root@instance-2 surinder_kumar_432]# vi /etc/selinux/config
[root@instance-2 surinder_kumar_432]# systemctl stop postfix firewalld NetworkManager
[root@instance-2 surinder_kumar_432]# systemctl disable postfix firewalld NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/postfix.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@instance-2 surinder_kumar_432]# systemctl mask NetworkManager
Created symlink from /etc/systemd/system/NetworkManager.service to /dev/null.
[root@instance-2 surinder_kumar_432]# yum remove postfix NetworkManager NetworkManager-libnm
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package NetworkManager.x86_64 1:1.4.0-14.el7_3 will be erased
--> Processing Dependency: NetworkManager = 1:1.4.0-14.el7_3 for package: 1:NetworkManager-tui-1.4.0-14.el7_3.x86_64
--> Processing Dependency: NetworkManager(x86-64) = 1:1.4.0-14.el7_3 for package: 1:NetworkManager-bluetooth-1.4.0-14.el7_3.x86_64
--> Processing Dependency: NetworkManager(x86-64) = 1:1.4.0-14.el7_3 for package: 1:NetworkManager-adsl-1.4.0-14.el7_3.x86_64
--> Processing Dependency: NetworkManager(x86-64) = 1:1.4.0-14.el7_3 for package: 1:NetworkManager-team-1.4.0-14.el7_3.x86_64
--> Processing Dependency: NetworkManager(x86-64) = 1:1.4.0-14.el7_3 for package: 1:NetworkManager-wifi-1.4.0-14.el7_3.x86_64
--> Processing Dependency: NetworkManager(x86-64) = 1:1.4.0-14.el7_3 for package: 1:NetworkManager-wwan-1.4.0-14.el7_3.x86_64
---> Package NetworkManager-libnm.x86_64 1:1.4.0-14.el7_3 will be erased
---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased
--> Running transaction check
---> Package NetworkManager-adsl.x86_64 1:1.4.0-14.el7_3 will be erased
---> Package NetworkManager-bluetooth.x86_64 1:1.4.0-14.el7_3 will be erased
---> Package NetworkManager-team.x86_64 1:1.4.0-14.el7_3 will be erased
---> Package NetworkManager-tui.x86_64 1:1.4.0-14.el7_3 will be erased
---> Package NetworkManager-wifi.x86_64 1:1.4.0-14.el7_3 will be erased
---> Package NetworkManager-wwan.x86_64 1:1.4.0-14.el7_3 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================
 Package                             Arch              Version                       Repository            Size
================================================================================================================
Removing:
 NetworkManager                      x86_64            1:1.4.0-14.el7_3              @updates              10 M
 NetworkManager-libnm                x86_64            1:1.4.0-14.el7_3              @updates             1.1 M
 postfix                             x86_64            2:2.10.1-6.el7                @anaconda             12 M
Removing for dependencies:
 NetworkManager-adsl                 x86_64            1:1.4.0-14.el7_3              @updates              49 k
 NetworkManager-bluetooth            x86_64            1:1.4.0-14.el7_3              @updates             103 k
 NetworkManager-team                 x86_64            1:1.4.0-14.el7_3              @updates              53 k
 NetworkManager-tui                  x86_64            1:1.4.0-14.el7_3              @updates             266 k
 NetworkManager-wifi                 x86_64            1:1.4.0-14.el7_3              @updates             144 k
 NetworkManager-wwan                 x86_64            1:1.4.0-14.el7_3              @updates             123 k

Transaction Summary
================================================================================================================
Remove  3 Packages (+6 Dependent packages)

Installed size: 24 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : 1:NetworkManager-tui-1.4.0-14.el7_3.x86_64                                                   1/9
  Erasing    : 1:NetworkManager-bluetooth-1.4.0-14.el7_3.x86_64                                             2/9
  Erasing    : 1:NetworkManager-wwan-1.4.0-14.el7_3.x86_64                                                  3/9
  Erasing    : 1:NetworkManager-wifi-1.4.0-14.el7_3.x86_64                                                  4/9
  Erasing    : 1:NetworkManager-adsl-1.4.0-14.el7_3.x86_64                                                  5/9
  Erasing    : 1:NetworkManager-team-1.4.0-14.el7_3.x86_64                                                  6/9
  Erasing    : 1:NetworkManager-1.4.0-14.el7_3.x86_64                                                       7/9
  Erasing    : 1:NetworkManager-libnm-1.4.0-14.el7_3.x86_64                                                 8/9
  Erasing    : 2:postfix-2.10.1-6.el7.x86_64                                                                9/9
  Verifying  : 1:NetworkManager-wwan-1.4.0-14.el7_3.x86_64                                                  1/9
  Verifying  : 1:NetworkManager-bluetooth-1.4.0-14.el7_3.x86_64                                             2/9
  Verifying  : 1:NetworkManager-1.4.0-14.el7_3.x86_64                                                       3/9
  Verifying  : 1:NetworkManager-team-1.4.0-14.el7_3.x86_64                                                  4/9
  Verifying  : 1:NetworkManager-adsl-1.4.0-14.el7_3.x86_64                                                  5/9
  Verifying  : 1:NetworkManager-wifi-1.4.0-14.el7_3.x86_64                                                  6/9
  Verifying  : 2:postfix-2.10.1-6.el7.x86_64                                                                7/9
  Verifying  : 1:NetworkManager-tui-1.4.0-14.el7_3.x86_64                                                   8/9
  Verifying  : 1:NetworkManager-libnm-1.4.0-14.el7_3.x86_64                                                 9/9

Removed:
  NetworkManager.x86_64 1:1.4.0-14.el7_3              NetworkManager-libnm.x86_64 1:1.4.0-14.el7_3            
  postfix.x86_64 2:2.10.1-6.el7                    

Dependency Removed:
  NetworkManager-adsl.x86_64 1:1.4.0-14.el7_3          NetworkManager-bluetooth.x86_64 1:1.4.0-14.el7_3        
  NetworkManager-team.x86_64 1:1.4.0-14.el7_3          NetworkManager-tui.x86_64 1:1.4.0-14.el7_3              
  NetworkManager-wifi.x86_64 1:1.4.0-14.el7_3          NetworkManager-wwan.x86_64 1:1.4.0-14.el7_3            

Complete!


4>

[root@instance-2 surinder_kumar_432]# ss -tulpn
Netid  State      Recv-Q Send-Q                                                                        Local Address:Port                                                                                       Peer Address:Port            
udp    UNCONN     0      0                                                                                         *:49355                                                                                                 *:*                
 users:(("avahi-daemon",pid=369,fd=13))
udp    UNCONN     0      0                                                                                         *:5353                                                                                                  *:*                
 users:(("avahi-daemon",pid=369,fd=12))
udp    UNCONN     0      0                                                                                         *:17931                                                                                                 *:*                
 users:(("dhclient",pid=538,fd=20))
udp    UNCONN     0      0                                                                                         *:68                                                                                                    *:*                
 users:(("dhclient",pid=538,fd=6))
udp    UNCONN     0      0                                                                                10.128.0.2:123                                                                                                   *:*                
 users:(("ntpd",pid=597,fd=19))
udp    UNCONN     0      0                                                                                 127.0.0.1:123                                                                                                   *:*                
 users:(("ntpd",pid=597,fd=18))
udp    UNCONN     0      0                                                                                         *:123                                                                                                   *:*                
 users:(("ntpd",pid=597,fd=16))
udp    UNCONN     0      0                                                                                        :::10080                                                                                                :::*                
 users:(("dhclient",pid=538,fd=21))
udp    UNCONN     0      0                                                                                       ::1:123                                                                                                  :::*                
 users:(("ntpd",pid=597,fd=21))
udp    UNCONN     0      0                                                                                        :::123                                                                                                  :::*                
 users:(("ntpd",pid=597,fd=17))
tcp    LISTEN     0      128                                                                                       *:22                                                                                                    *:*                
 users:(("sshd",pid=889,fd=3))
tcp    LISTEN     0      128                                                                                      :::22                                                                                                   :::*                
 users:(("sshd",pid=889,fd=4))
[root@instance-2 surinder_kumar_432]# uname -a
Linux instance-2 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed Jan 18 13:06:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@instance-2 surinder_kumar_432]# hostnamectl set-hostname cloud.centos.lan
[root@instance-2 surinder_kumar_432]#
[root@instance-2 surinder_kumar_432]#




5> Memory error :
=============

1 vCPU and 3.75GB of RAM

Error: Could not set 'present' on ensure: Cannot allocate memory - fork(2)



Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron LBaaS Agent entries                [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing MongoDB entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Nagios server entries                      [ DONE ]
Preparing Nagios host entries                        [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 10.128.0.2_controller.pp
10.128.0.2_controller.pp:                         [ ERROR ]        
Applying Puppet manifests                         [ ERROR ]
ERROR : Error appeared during Puppet run: 10.128.0.2_controller.pp
Error: Could not set 'present' on ensure: Cannot allocate memory - fork(2)
You will find full trace in log /var/tmp/packstack/20170227-045650-grKA0n/manifests/10.128.0.2_controller.pp.log
Please check log file /var/tmp/packstack/20170227-045650-grKA0n/openstack-setup.log for more information
Additional information:
 * A new answerfile was created in: /root/packstack-answers-20170227-045651.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * File /root/keystonerc_admin has been created on OpenStack client host 10.128.0.2. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://10.128.0.2/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * To use Nagios, browse to http://10.128.0.2/nagios username: nagiosadmin, password: 4be6e28e123046db


6> Next:
Instance with memory of 2 vCPU and 6.5 GB memory


[root@instance-1 surinder_kumar_432]# packstack --allinone
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20170227-052947-027Z4T/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron LBaaS Agent entries                [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing MongoDB entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Nagios server entries                      [ DONE ]
Preparing Nagios host entries                        [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 10.128.0.2_controller.pp
10.128.0.2_controller.pp:                            [ DONE ]      
Applying 10.128.0.2_network.pp
10.128.0.2_network.pp:                               [ DONE ]  
Applying 10.128.0.2_compute.pp
10.128.0.2_compute.pp:                               [ DONE ]  
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

 **** Installation completed successfully ******

Additional information:
 * A new answerfile was created in: /root/packstack-answers-20170227-052948.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * File /root/keystonerc_admin has been created on OpenStack client host 10.128.0.2. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://10.128.0.2/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * To use Nagios, browse to http://10.128.0.2/nagios username: nagiosadmin, password: 7499218eb25a4808
 * Because of the kernel update the host 10.128.0.2 requires reboot.
 * The installation log file is available at: /var/tmp/packstack/20170227-052947-027Z4T/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20170227-052947-027Z4T/manifests
[root@instance-1 surinder_kumar_432]#


openstack commands



Openstack Commands


(openstack) project list
+----------------------------------+----------+
| ID                               | Name     |
+----------------------------------+----------+
| 1a413581c60548cfb4078f978a3a0417 | demo     |
| 26455217ea32458a86bffb831cfbe3ee | admin    |
| 3931fce101a048aab61db712b241dfeb | services |
+----------------------------------+----------+
(openstack) project show admin
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | admin tenant                     |
| enabled     | True                             |
| id          | 26455217ea32458a86bffb831cfbe3ee |
| name        | admin                            |
| properties  |                                  |
+-------------+----------------------------------+
(openstack) user list
+----------------------------------+------------+
| ID                               | Name       |
+----------------------------------+------------+
| c955e4236a3b48b29cacb7be07cbfd25 | admin      |
| d2afb0b607854a40bd5b84269549029b | neutron    |
| c2547f765edd442280ab81e0e63bea9b | gnocchi    |
| 164d4286a9e44136a8c952d734f3afb4 | aodh       |
| c2cebc51f44344d998c8a872cb3fbc90 | nova       |
| 0f64513128a84ecc9f73f5e518b2deaf | glance     |
| ee4708cfa8674a2fbdfc501323c33019 | ceilometer |
| 39eeff56e2bd4532bceb0c434250826a | cinder     |
| da668217e8c14aa7b98bf3b27d003737 | demo       |
| 667c82492c8a40bc8ac19b16002a7745 | swift      |
+----------------------------------+------------+
(openstack) network list
+--------------------------------------+---------+--------------------------------------+
| ID                                   | Name    | Subnets                              |
+--------------------------------------+---------+--------------------------------------+
| 6b24c6f2-b518-43b2-9bf7-e63c1762b2f7 | public  | 7b826944-f86b-4b12-80ac-2e9ecccf20ba |
| 6e6dbfce-c24b-434f-9a43-32ffcc14b6ec | private | f0f949ff-1b25-4086-9428-5c872f58757d |
+--------------------------------------+---------+--------------------------------------+
(openstack) network show public
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | UP                                   |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2017-02-27T05:49:29Z                 |
| description               |                                      |
| id                        | 6b24c6f2-b518-43b2-9bf7-e63c1762b2f7 |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | False                                |
| mtu                       | 1450                                 |
| name                      | public                               |
| project_id                | 26455217ea32458a86bffb831cfbe3ee     |
| project_id                | 26455217ea32458a86bffb831cfbe3ee     |
| provider:network_type     | vxlan                                |
| provider:physical_network | None                                 |
| provider:segmentation_id  | 93                                   |
| revision_number           | 5                                    |
| router:external           | External                             |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   | 7b826944-f86b-4b12-80ac-2e9ecccf20ba |
| tags                      | []                                   |
| updated_at                | 2017-02-27T05:49:32Z                 |
+---------------------------+--------------------------------------+
(openstack) port list
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------+
| ID                                   | Name | MAC Address       | Fixed IP Addresses                                                          |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------+
| 58e4584f-cc13-4f6a-ac9a-703fa9aeb6b0 |      | fa:16:3e:59:67:5a | ip_address='172.24.4.234', subnet_id='7b826944-f86b-4b12-80ac-2e9ecccf20ba' |
| 7968105a-4644-4247-9d77-011b65864e2e |      | fa:16:3e:1f:ac:de | ip_address='10.0.0.1', subnet_id='f0f949ff-1b25-4086-9428-5c872f58757d'     |
| d8c4a074-418d-4c80-bedc-f9461fdce769 |      | fa:16:3e:19:70:7b | ip_address='10.0.0.2', subnet_id='f0f949ff-1b25-4086-9428-5c872f58757d'     |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------+
(openstack) ip availability list
+--------------------------------------+--------------+-----------+----------+
| Network ID                           | Network Name | Total IPs | Used IPs |
+--------------------------------------+--------------+-----------+----------+
| 6e6dbfce-c24b-434f-9a43-32ffcc14b6ec | private      |       253 |        2 |
| 6b24c6f2-b518-43b2-9bf7-e63c1762b2f7 | public       |        13 |        1 |
+--------------------------------------+--------------+-----------+----------+
(openstack) ip availability show private
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                  | Value                                                                                                                                             |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| network_id             | 6e6dbfce-c24b-434f-9a43-32ffcc14b6ec                                                                                                              |
| network_name           | private                                                                                                                                           |
| project_id             | 1a413581c60548cfb4078f978a3a0417                                                                                                                  |
| subnet_ip_availability | cidr='10.0.0.0/24', ip_version='4', subnet_id='f0f949ff-1b25-4086-9428-5c872f58757d', subnet_name='private_subnet', total_ips='253', used_ips='2' |
| total_ips              | 253                                                                                                                                               |
| used_ips               | 2                                                                                                                                                 |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
(openstack) server list

(openstack) volume list

(openstack) zone list
public endpoint for dns service in RegionOne region not found
(openstack) subnet list
+--------------------------------------+----------------+--------------------------------------+-----------------+
| ID                                   | Name           | Network                              | Subnet          |
+--------------------------------------+----------------+--------------------------------------+-----------------+
| 7b826944-f86b-4b12-80ac-2e9ecccf20ba | public_subnet  | 6b24c6f2-b518-43b2-9bf7-e63c1762b2f7 | 172.24.4.224/28 |
| f0f949ff-1b25-4086-9428-5c872f58757d | private_subnet | 6e6dbfce-c24b-434f-9a43-32ffcc14b6ec | 10.0.0.0/24     |
+--------------------------------------+----------------+--------------------------------------+-----------------+
(openstack) service list
+----------------------------------+------------+--------------+
| ID                               | Name       | Type         |
+----------------------------------+------------+--------------+
| 32a0a4c1cf664c2da14e87b07c3fe9f1 | neutron    | network      |
| 41681a39c22b49b4bd043f4f28d08f5f | keystone   | identity     |
| 45cf642796514d208d6ccb21352f50ae | swift      | object-store |
| 53c775c68174450c93d2bba5b8d0238c | cinderv3   | volumev3     |
| 6186951bc505498399faba6eb8273345 | aodh       | alarming     |
| 6afaca34ca644d7fb02db1e5a1ad6d96 | gnocchi    | metric       |
| 83382cfd076b4c98a0fc4ebb596d280e | nova       | compute      |
| a7088b0367d64d6ca81f0e432921f0bf | ceilometer | metering     |
| b546470b4a0140c4a1898e3f8a32774e | cinder     | volume       |
| bb8c26f1d81940d5b55556f4f7c25006 | glance     | image        |
| e60d89acd01e434689a7bf62cfc4078b | cinderv2   | volumev2     |
+----------------------------------+------------+--------------+
(openstack) snapshow list
openstack: 'snapshow' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  snapshot create
  snapshot delete
  snapshot list
  snapshot set
  snapshot show
  snapshot unset
(openstack) snapshot list

(openstack) router list
+--------------------------------------+---------+--------+-------+-------------+-------+----------------------------------+
| ID                                   | Name    | Status | State | Distributed | HA    | Project                          |
+--------------------------------------+---------+--------+-------+-------------+-------+----------------------------------+
| b2bd45dd-e5cf-45e4-b33b-e79cefe18ab9 | router1 | ACTIVE | UP    | False       | False | 1a413581c60548cfb4078f978a3a0417 |
+--------------------------------------+---------+--------+-------+-------------+-------+----------------------------------+
(openstack) router show router1
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                   | Value                                                                                                                                                                                    |
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up          | UP                                                                                                                                                                                       |
| availability_zone_hints |                                                                                                                                                                                          |
| availability_zones      | nova                                                                                                                                                                                     |
| created_at              | 2017-02-27T05:49:37Z                                                                                                                                                                     |
| description             |                                                                                                                                                                                          |
| distributed             | False                                                                                                                                                                                    |
| external_gateway_info   | {"network_id": "6b24c6f2-b518-43b2-9bf7-e63c1762b2f7", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "7b826944-f86b-4b12-80ac-2e9ecccf20ba", "ip_address": "172.24.4.234"}]} |
| flavor_id               | None                                                                                                                                                                                     |
| ha                      | False                                                                                                                                                                                    |
| id                      | b2bd45dd-e5cf-45e4-b33b-e79cefe18ab9                                                                                                                                                     |
| name                    | router1                                                                                                                                                                                  |
| project_id              | 1a413581c60548cfb4078f978a3a0417                                                                                                                                                         |
| project_id              | 1a413581c60548cfb4078f978a3a0417                                                                                                                                                         |
| revision_number         | 7                                                                                                                                                                                        |
| routes                  |                                                                                                                                                                                          |
| status                  | ACTIVE                                                                                                                                                                                   |
| updated_at              | 2017-02-27T05:50:04Z                                                                                                                                                                     |
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
(openstack) secret list
public endpoint for key-manager service in RegionOne region not found
(openstack) security group list
+--------------------------------------+---------+------------------------+----------------------------------+
| ID                                   | Name    | Description            | Project                          |
+--------------------------------------+---------+------------------------+----------------------------------+
| 7020c233-0160-4718-bb32-84b517944b84 | default | Default security group | 1a413581c60548cfb4078f978a3a0417 |
| a811426e-92d3-4e19-8403-637fb7532d9e | default | Default security group | 26455217ea32458a86bffb831cfbe3ee |
+--------------------------------------+---------+------------------------+----------------------------------+
(openstack) security group show defaul
ResourceNotFound: No SecurityGroup found for defaul
(openstack) security group show default
More than one security_group exists with the name 'default'.
(openstack) resource member list
usage: resource member list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
                            [--max-width <integer>] [--noindent]
                            [--quote {all,minimal,none,nonnumeric}]
                            resource_id resource_type
resource member list: error: too few arguments
(openstack) object list
usage: object list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
                   [--max-width <integer>] [--noindent]
                   [--quote {all,minimal,none,nonnumeric}] [--prefix <prefix>]
                   [--delimiter <delimiter>] [--marker <marker>]
                   [--end-marker <end-marker>] [--limit <limit>] [--long]
                   [--all]
                   <container>
object list: error: too few arguments
(openstack) keypair list

(openstack) image list
+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| ca216848-7cbd-49be-ace1-a6105a817fa0 | cirros | active |
+--------------------------------------+--------+--------+
(openstack) image show cirros
+------------------+------------------------------------------------------+
| Field            | Value                                                |
+------------------+------------------------------------------------------+
| checksum         | ee1eca47dc88f4879d8a229cc70a07c6                     |
| container_format | bare                                                 |
| created_at       | 2017-02-27T05:48:38Z                                 |
| disk_format      | qcow2                                                |
| file             | /v2/images/ca216848-7cbd-49be-ace1-a6105a817fa0/file |
| id               | ca216848-7cbd-49be-ace1-a6105a817fa0                 |
| min_disk         | 0                                                    |
| min_ram          | 0                                                    |
| name             | cirros                                               |
| owner            | 3931fce101a048aab61db712b241dfeb                     |
| protected        | False                                                |
| schema           | /v2/schemas/image                                    |
| size             | 13287936                                             |
| status           | active                                               |
| tags             |                                                      |
| updated_at       | 2017-02-27T05:48:41Z                                 |
| virtual_size     | None                                                 |
| visibility       | public                                               |
+------------------+------------------------------------------------------+
(openstack) flavor list
+----+-----------+-------+------+-----------+-------+-----------+
| ID | Name      |   RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+-----------+-------+------+-----------+-------+-----------+
| 1  | m1.tiny   |   512 |    1 |         0 |     1 | True      |
| 2  | m1.small  |  2048 |   20 |         0 |     1 | True      |
| 3  | m1.medium |  4096 |   40 |         0 |     2 | True      |
| 4  | m1.large  |  8192 |   80 |         0 |     4 | True      |
| 5  | m1.xlarge | 16384 |  160 |         0 |     8 | True      |
+----+-----------+-------+------+-----------+-------+-----------+
(openstack) flavor show m1.tiny
+----------------------------+---------+
| Field                      | Value   |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled   | False   |
| OS-FLV-EXT-DATA:ephemeral  | 0       |
| access_project_ids         | None    |
| disk                       | 1       |
| id                         | 1       |
| name                       | m1.tiny |
| os-flavor-access:is_public | True    |
| properties                 |         |
| ram                        | 512     |
| rxtx_factor                | 1.0     |
| swap                       |         |
| vcpus                      | 1       |
+----------------------------+---------+
(openstack) host list
+------------------+-------------+----------+
| Host Name        | Service     | Zone     |
+------------------+-------------+----------+
| cloud.centos.lan | cert        | internal |
| cloud.centos.lan | consoleauth | internal |
| cloud.centos.lan | scheduler   | internal |
| cloud.centos.lan | conductor   | internal |
| cloud.centos.lan | compute     | nova     |
+------------------+-------------+----------+
(openstack) endpoint list
+----------------------------------+-----------+--------------+--------------+
| ID                               | Region    | Service Name | Service Type |
+----------------------------------+-----------+--------------+--------------+
| 320147d6f0b24737b4140232e3c2a6b4 | RegionOne | swift        | object-store |
| 32034f72d5d14517bf1f1a556f2ec0de | RegionOne | aodh         | alarming     |
| 5334d3908fab4bc1bda5982568e5fa35 | RegionOne | keystone     | identity     |
| ce86728f932e4065b7c57a27d9c64669 | RegionOne | cinder       | volume       |
| 060afc0d0b854b478c419cbb01f15fff | RegionOne | cinderv2     | volumev2     |
| 4187600a2f7a41a4a6e948c54bf38106 | RegionOne | cinderv3     | volumev3     |
| d6ad670d2110455b8b45e932bebec3c8 | RegionOne | nova         | compute      |
| 24171fb26e8343d8befdb8a91b548a7a | RegionOne | glance       | image        |
| ccf23cff4045416f871b32a78c8f1534 | RegionOne | neutron      | network      |
| 1fbd219dfb4640bb81266ee8b93f4b78 | RegionOne | gnocchi      | metric       |
| b423822a59e649edbb46fd9e03f2e8b0 | RegionOne | ceilometer   | metering     |
+----------------------------------+-----------+--------------+--------------+
(openstack) container list

(openstack) console url show
usage: console url show [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN]
                        [--max-width <integer>] [--noindent] [--prefix PREFIX]
                        [--novnc | --xvpvnc | --spice | --rdp | --serial | --mks]
                        <server>
console url show: error: too few arguments
(openstack) compute agent list

(openstack) console url admin
openstack: 'console' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  console log show
  console url show
  catalog list
  catalog show
  compute agent create
  compute agent delete
  compute agent list
  compute agent set
  compute service delete
  compute service list
  compute service set
  container create
  container delete
  container list
  container save
  container set
  container show
  container unset
(openstack) console url show admin
No server with a name or ID of 'admin' exists.
(openstack) server list

(openstack)

openstack-status

openstack-status

1> openstack-status

is part of rpm openstack-utils

openstack-status
openstack-service
openstack-config


2>

# cat keystonerc_admin
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD=8cd100be71a64df8
    export OS_AUTH_URL=http://10.128.0.2:5000/v2.0
    export PS1='[\u@\h \W(keystone_admin)]\$ '
   
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

# source /root/keystonerc_admin


3>

# yum install openstack-utils


4>

[root@cloud ~(keystone_admin)]# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-compute:                 active
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-cert:                    active
openstack-nova-conductor:               active
openstack-nova-console:                 inactive  (disabled on boot)
openstack-nova-consoleauth:             active
openstack-nova-xvpvncproxy:             inactive  (disabled on boot)
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     inactive  (disabled on boot)
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     active
neutron-l3-agent:                       active
neutron-metadata-agent:                 active
neutron-openvswitch-agent:              active
neutron-metering-agent:                 active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                active
openstack-cinder-backup:                active
== Ceilometer services ==
openstack-ceilometer-api:               inactive  (disabled on boot)
openstack-ceilometer-central:           active
openstack-ceilometer-compute:           active
openstack-ceilometer-collector:         active
openstack-ceilometer-notification:      active
== Support services ==
mariadb:                                active
openvswitch:                            active
dbus:                                   active
target:                                 active
rabbitmq-server:                        active
memcached:                              active
== Keystone users ==
/bin/openstack-status: line 267: keystone: command not found
== Glance images ==
+--------------------------------------+--------+
| ID                                   | Name   |
+--------------------------------------+--------+
| ca216848-7cbd-49be-ace1-a6105a817fa0 | cirros |
+--------------------------------------+--------+
== Nova managed services ==
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host             | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-cert        | cloud.centos.lan | internal | enabled | up    | 2017-03-07T09:04:25.000000 | -               |
| 2  | nova-consoleauth | cloud.centos.lan | internal | enabled | up    | 2017-03-07T09:04:24.000000 | -               |
| 5  | nova-scheduler   | cloud.centos.lan | internal | enabled | up    | 2017-03-07T09:04:26.000000 | -               |
| 6  | nova-conductor   | cloud.centos.lan | internal | enabled | up    | 2017-03-07T09:04:24.000000 | -               |
| 7  | nova-compute     | cloud.centos.lan | nova     | enabled | up    | 2017-03-07T09:04:26.000000 | -               |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
== Nova networks ==
WARNING: Command network-list is deprecated and will be removed after Nova 15.0.0 is released. Use python-neutronclient or python-openstackclient instead.
+--------------------------------------+---------+------+
| ID                                   | Label   | Cidr |
+--------------------------------------+---------+------+
| 6b24c6f2-b518-43b2-9bf7-e63c1762b2f7 | public  | -    |
| 6e6dbfce-c24b-434f-9a43-32ffcc14b6ec | private | -    |
+--------------------------------------+---------+------+
== Nova instance flavors ==
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1  | m1.tiny   | 512       | 1    | 0         |      | 1     | 1.0         | True      |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
== Nova instances ==
+----+------+-----------+--------+------------+-------------+----------+
| ID | Name | Tenant ID | Status | Task State | Power State | Networks |
+----+------+-----------+--------+------------+-------------+----------+
+----+------+-----------+--------+------------+-------------+----------+
[root@cloud ~(keystone_admin)]#