Most of the examples in this guide will use this client. The unified OpenStack client (openstack) is the recommended command line interface. Using the Openstack CLI clients.
Openstack Client How To Perform CommonThough aimed at Mirantis OpenStack Express, many of the techniques discussed here will also work on a private OpenStack cloud deployed using Mirantis OpenStack. This series of short tutorials shows how to perform common cloud operations tasks in MOX, and offers links to documentation and learning resources. The CLI is available for Linux, Mac OS X, and Windows.Mirantis OpenStack Express — Mirantis’ “Private Cloud as a Service” — is the fastest way to get your hands on a fully-functional, optimally-configured, private OpenStack cloud, running on hosted bare metal and able to scale on demand. There are also versions available for standalone Mac, Windows and Linux machines.The Cloudbreak Command Line Interface (CLI) is a tool to help you manage your Cloudbreak cluster.PC/MAC Admin rights Basic computer skills We assume you know how to utilise SSH and SSH keys.OpenStackClient is a command-line client for OpenStack that brings the command set for many services (for example, Compute, Identity, Image, Object Storage and others) together in a single shell with a uniform command structure. Install latest OpenStack command line client and required plugins Prerequisites. With the OpenStack CLI you can manage and monitor your stacks.Your Controller node is critical infrastructure, so it’s inconvenient and potentially dangerous to build a development environment there (not to mention that — if you redeploy your cloud — that server goes away).Putting the CLI elsewhere is easy to do, and gives you much more freedom. That means they can’t access the CLI clients pre-installed on the OpenStack Controller Node, as we described in an earlier tutorial ( Mirantis OpenStack Express – Running OpenStack from the Command Line).That’s not a bad thing, either! While access to the Controller’s CLI can be convenient (in some cases, critical), it’s not a good idea to use that CLI for regular work. Developer Edition users are running inside an OpenStack Tenant (Project) on a shared cloud, rather than managing their own private cluster. But it’s especially aimed at new users of Mirantis OpenStack Express Developer Edition. Automating VM Launch and Apache InstallationThis tutorial should work for any user of Mirantis OpenStack Express, or for anyone who’s built a private cloud with Mirantis OpenStack. Running OpenStack from the Command Line The clients have names like novaclient and glanceclient (the associated package names are of the form python-novaclient, python-glanceclient, etc.). Intro to OpenStack CLIOpenStack’s CLI — often referred to in the singular — is actually provided by a set of Python client modules, one for each OpenStack component. You can also administer multiple clouds from the same machine. The client shell scripts can be called by other shell scripts (e.g, bash), and the client modules can be included in your own Python scripts, letting you create sophisticated tooling. So, when using the CLI, you can type something like ‘nova list’ (component – command) into your terminal, and the nova script will hand off to the novaclient module which calls parts of the REST interface (in this case, Keystone to authenticate and Nova-Compute) to hand you back a nice table listing all your active servers.CLI inputs and outputs are much easier to read and manage than the web headers, JSON or XML objects the REST interface likes to communicate with, directly. Most clients implement all the functionality of the corresponding REST interface.Each client has a corresponding shell script to call it — named after the component, and called as (component) (command) (optional arguments). Obtain and source your Project/Tenant’s OpenStack RC file, putting values into your shell environment enabling authentication to your cloud. Use pip to install the clients from PyPI, the Python Package Index. Install pip, the most commonly-used Python package manager. Install Python setuptools, which is a distribution/package manager used by pip. Make sure you have Python 2.6 or later (not Python 3!) installed. Details can be found in OpenStack’s official documentation, here. Luckily, they have a quick solution to steps 1 and 2 above, provided by Christoph Gohlke, who created and maintains unofficial binary installers for setuptools and pip (see and ). Installing setuptoolsWindows users are the outliers in installing setuptools. Windows users can install from the version 2.7.8 downloadable available at python.org. To be absolutely sure, open a terminal and enter python -V (any version 2 python with 6+ as a sub-version number will do you). keystone – Identity service API and extensionsYour job is to install them in sequence by typing commands of the form: # sudo pip install python-(project)client… again and again and again. cinder – Block Storage API and extensions Here’s the full list of clients: Installing the CLI ClientsNow that pip is installed, this is simple. They can just open a terminal and type: # easy_install pipUs Linux types will enter: # sudo apt-get install python-pipNote that the ‘universe’ software source will need to be enabled on Ubuntu/Debian clients for this command to work as expected. Just go to Project -> Compute -> Access & Security, click the API Access tab, and click the button labeled Download OpenStack RC File. You could create the needed environment variables manually, but it’s much easier to download a complete OpenStack RC script containing all the necessary info (except your password).You can obtain your RC file through your Mirantis OpenStack Developer (or other edition) Horizon console. Getting your OpenStack RC FileThe CLI clients look for environment variables to point themselves towards your cloud’s REST API entry points, and to derive other info (like your username) needed to authenticate transactions. The clients will install and (in some cases) install other clients (e.g., Keystone) to resolve their own dependencies. Mackeeper vs advanced mac cleanerNote the ID of your private network. Now let’s try: # neutron net-list… which shows available networks. Note the ID of the Ubuntu 14.04 LTS dev image. A good first test is to try: # nova image-list… which returns a list of boot images available to you. Let’s Test!You should now be able to issue OpenStack CLI commands. Enter your password when requested — this is the same password you use to log into Horizon, and can be found (in Developer Edition) in your Dashboard’s Credentials popup (Mirantis OpenStack Express Team Edition users will find it on the main Dashboard page in the area describing your cluster. ![]()
0 Comments
Leave a Reply. |
AuthorJamey ArchivesCategories |