How to use the OpenStack CLI-5 minutes a day to play with OpenStack (22)

Source: Internet
Author: User

This section first discusses the image delete operation, then describes how the OpenStack CLI is used, and finally how to troubleshoot.

Web UI Delete image
  1. After admin login, Project--Compute-Images

    In the list, select the image formatted as ARI and AKI, and click

  2. Click Confirm to delete

  3. Operation succeeded

CLI Delete Image
    1. Setting environment variables

    2. Querying an existing image


    3. Delete image

How to use the OpenStack CLI

The OpenStack service has its own CLI. Commands are good to remember, is the name of the service, such as Glance is Glance,nova is Nova.

But Keystone is more special, now is using OpenStack instead of the old version of the Keystone command. such as querying the user list, if using Keystone User-list

Will prompt Keystone has been deprecated. Use the OpenStack command instead

The commands used by different services are different, but these commands are very similar and can be extrapolate.

1. Before executing the command, you need to set the environment variable.

These variables include the user name, Project, password, and so on, and if not set, each execution command must set the relevant command-line arguments

2. The orders of each service are increased, deleted, changed, checked operation

Its format is

CMD <obj>-create [Parm1] [Parm2] ... CMD <obj>-delete [Parm]cmd <obj>-update [Parm1] [Parm2] ... CMD <obj>-listcmd <obj>-show [Parm]

For example, Glance manages the image, then: CMD is Glance;obj is the image corresponding to the command there is

Glance image-createglance image-deleteglance image-updateglance image-listglance image-show

Again, such as neutron management is the network and subnet, then: CMD is Neutron;obj is net and subnet corresponding commands have

Network-related operations

Neutron Net-createneutron net-deleteneutron Net-updateneutron Net-listneutron net–show

Subnet-related operations

Neutron Subnet-createneutron subnet-deleteneutron Subnet-updateneutron Subnet-listneutron subnet–show

Some of the commands <obj> can be omitted, such as Nova's actions are for instance

Nova Bootnova Deletenova Listnova show

3. Each object has an ID

Delete,show and so on are ID parameters, such as

4. Use Help to see how commands are used

In addition to delete,show and other operations only need an ID one parameter, other operations may require more parameters, with help to see the required parameters, the format is

CMD Help [Sub-cmd]

For example, see what glance have Sub-cmd

See the usage of glance image-update

How to Troubleshooting

The main way OpenStack can troubleshoot problems is through the logs, and the Service has its own separate logs. Glance mainly has two logs, Glance_api.log and Glance_registry.log, which are stored in the/var/log/apache2/directory.

Devstack's screen window has opened these two logs for us to view directly

G-api window displays GLANCE-API logs, records REST API calls G-reg window displays glance-registry logs, records the process of Glance service processing requests, and database operations

If you need to get the most detailed log information, you can open the debug option in/etc/glance/*.conf. Devstack Debug is already turned on by default.

In a non-devstack installation, the log is in the/var/log/glance/directory.

Next we begin to learn Nova.

How to use the OpenStack CLI-5 minutes a day to play with OpenStack (22)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.