File: install_client.rst

package info (click to toggle)
murano 1%3A6.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,644 kB
  • sloc: python: 34,127; sh: 717; pascal: 269; makefile: 83
file content (119 lines) | stat: -rw-r--r-- 3,610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.. _install-client:

Install and use the murano client
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Application Catalog project provides a command-line client,
python-muranoclient, which enables you to access the project API.
For prerequisites, see `Install the prerequisite software <http://docs.openstack.org/cli-reference/common/cli_install_openstack_command_line_clients.html#install-the-prerequisite-software>`_.

To install the latest murano CLI client, run the following command in your
terminal:

.. code-block:: console

   $ pip install python-muranoclient

Discover the client version number
----------------------------------

To discover the version number for the python-muranoclient, run the following
command:

.. code-block:: console

   $ murano --version

To check the latest version, see `Client library for Murano API <https://git.openstack.org/cgit/openstack/python-muranoclient>`_.


Upgrade or remove the client
----------------------------

To upgrade or remove the python-muranoclient, use the corresponding commands.

**To upgrade the client:**

.. code-block:: console

   $ pip install --upgrade python-muranoclient

**To remove the client:**

.. code-block:: console

   $ pip uninstall python-muranoclient

Set environment variables
-------------------------

To use the murano client, you must set the environment variables. To do this,
download and source the OpenStack RC file. For more information, see
`Download and source the OpenStack RC file <http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html#download-and-source-the-openstack-rc-file>`_.

Alternatively, create the ``PROJECT-openrc.sh`` file from scratch. For this,
perform the following steps:

#. In a text editor, create a file named ``PROJECT-openrc.sh`` containing the
   following authentication information:

   .. code-block:: console

      export OS_USERNAME=user
      export OS_PASSWORD=password
      export OS_TENANT_NAME=tenant
      export OS_AUTH_URL=http://auth.example.com:5000
      export MURANO_URL=http://murano.example.com:8082/

#. In the terminal, source the ``PROJECT-openrc.sh`` file. For example:

   .. code-block:: console

      $ . admin-openrc.sh

Once you have configured your authentication parameters, run
:command:`murano help` to see a complete list of available commands and
arguments. Use :command:`murano help <sub_command>` to get help on a specific
subcommand.

.. seealso::

   `Set environment variables using the OpenStack RC file <http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html>`_.

Bash completion
---------------

To get the latest bash completion script, download
`murano.bash_completion <https://git.openstack.org/cgit/openstack/python-muranoclient/plain/tools/murano.bash_completion>`_
from the source repository and add it to your completion scripts.

If you are not aware of the completion scripts location, perform the following
steps:

#. Create a new directory:

   .. code-block:: console

      $ mkdir -p ~/.bash_completion/

#. Create a file containing the bash completion script:

   .. code-block:: console

      $ curl https://git.openstack.org/cgit/openstack/python-muranoclient/plain/tools/murano.bash_completion > ~/.bash_completion/murano.sh

#. Add the following code to the ``~/.profile`` file:

   .. code-block:: bash

      for file in $HOME/.bash_completion/*.sh; do
          if [ -f "$file" ]; then
              . "$file"
          fi
      done

#. In the current terminal, run:

   .. code-block:: console

      $ . ~/.bash_completion/murano.sh