.. _ocli-setup:
Installation
=============================
Before installing the CLI client for Orchestra Manager make sure you have the Orchestra Manager app and have App Admin role for it. See :ref:`orchestra-quickstart`.
Depending on your operating system choose the instructions:
- :ref:`ocli-install-linux`
- :ref:`ocli-install-windows`
- :ref:`ocli-install-windows-native`
- :ref:`ocli-install-macos`
Video Tutorial
-------------------
.. raw:: html
.. _ocli-install-linux:
Linux
--------
System requirements:
- tar
- curl
- python3
have to be installed in system.
1. Install Orchestra CLI:
.. tab-set::
.. tab-item:: Command
.. code:: console
$ curl https://content.cthings.co/static/orchestracli/ocli-install.sh | bash -
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ curl https://content.cthings.co/static/orchestracli/ocli-install.sh | bash -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 101M 100 101M 0 0 44.1M 0 0:00:02 0:00:02 --:--:-- 44.1M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1095 100 1095 0 0 13007 0 --:--:-- --:--:-- --:--:-- 13035
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2068 100 2068 0 0 28583 0 --:--:-- --:--:-- --:--:-- 2872
ocli, version 2.0.4 94240d2 Linux
2. You can now verify the installation by logging in:
Launch orchestra by typing ``ocli``, **help** message should appear.
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli
Usage: ocli [OPTIONS] COMMAND [ARGS]...
Options:
-v, --version Show the version and exit.
--help Show this message and exit.
Commands:
auth
manager
ssh
Log in by typing ``ocli auth login`` and following the instructions in your terminal.
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli auth login
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli auth login
Please go to https://login.cthings.co/login/ocli and enter the code
VWRRQPQG
Successfully logged in to Orchestra!
Paste the link to your web browser and enter the code provided in the terminal.
.. figure:: images/ocli-install-7.1.png
:alt: Example response
:width: 100%
:align: left
The successful authorization message will be displayed both in the browser and in the terminal.
.. figure:: images/ocli-install-7.2.png
:alt: Example response
:width: 100%
:align: left
.. _ocli-install-windows:
Windows (WSL)
---------------
Preffered way of installing OCLI in Windows is via WSL.
You need to have Windows Subsystem for Linux (WSL) installed.
If you do not have WSL installed, please follow these steps to set it up:
1. Open the Windows Start menu and type "PowerShell".
2. Right-click on Windows PowerShell and select "Run as administrator".
3. In the PowerShell window, enter the following command to enable WSL:
.. code:: bash
wsl --install -d Ubuntu
4. Restart your computer if prompted.
.. admonition:: Detailed instructions
:class: tip
Please refer to the official `Microsoft guide `_.
5. Once WSL is installed, you can proceed with the installation of the Orchestra CLI using the :ref:`ocli-install-linux` guide.
.. _ocli-install-windows-native:
Windows (native)
-------------------
Native support of Windows CLI is in development. Preferred way of installing OCLI in Windows is via WSL (:ref:`ocli-install-windows`).
1. Install Orchestra CLI:
Download: https://content.cthings.co/static/orchestracli/orchestracli-setup.exe
2. Allow the application to run:
Depends of the antivirus software you are using, you may need to allow the application to run (create a firewall rule).
3. You can now verify the installation by logging in:
Launch orchestra by typing ``ocli``, **help** message should appear.
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli
Usage: ocli [OPTIONS] COMMAND [ARGS]...
Options:
-v, --version Show the version and exit.
--help Show this message and exit.
Commands:
auth
manager
ssh
.. _ocli-install-macos:
MacOS
--------
MacOS version is available in Alpha version - contact support at support@cthings.co to gain access.
Common problems
---------------
- **tcgetpgrp failed: Not a tty**
If you are running WSL and see the warning ``tcgetpgrp failed: Not a tty`` - don't worry, it is coming from the default package ``wslu`` but it does not disturb the proper auth flow. The problem is further described `here `_.