platform9/express-cli

pf9 cli installation failed

Closed this issue · 23 comments

Hello,

I recently trying the Pf9 solution by creating 2 cluster of 3 nodes each, with kubernetes on baremetal (on prem) solution.
Today, I've deauthorized nodes and deleted both of clusters (my idea was to create a new cluster to create a new one for advanced production testing).

I've uninstall on each nodes / masters the pf9cli following this documentation : https://docs.platform9.com/kubernetes/PMK-CLI/cli-installation

Everything was ok and all seems well uninstaled, then I tried to reinstall pf9 cli. The installation hangs each time, with this error :
image

I've tried to reinstall with older script version (cli-setup.sh).
I've even reinstall a new VM, and tried to install from scratch (as its a new node) the pf9 cli, unsucessfully.

Maybe I'm wrong (I'm trying this solution since only a couple days) or I missed a step ?

Thanks for your time and your powerfull solution (when cli willing works 😄)

@BloodMotion which OS and release version? It will be helpful If you could share the output of cat /etc/os-release.

@sarun87 it's on ubuntu 16.04 xenial:

root@srv-k8s-master1:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

I dont know if it's related to python, I tried with pip and python 2.7 (manually executing the script) but same issue.

Tried again today, from scratch with a new VM and still same issue, maybe I can test with another OS?
image

@BloodMotion could you give Ubuntu 18 a try? We found the same error internally as well but it seems to be happening for a few specific VM images. I'm looking into this.

Hi @sarun87, unfortunatly, even with Ubuntu server 18.04.4 LTS the installation hang ...
I used this image (server): https://releases.ubuntu.com/18.04.4/

How can I help you through this issue?

image

Same issue here with Bare metal 18.04 :

root@was-prd-k8s-master3:~# cat /etc/issue
Ubuntu 18.04.4 LTS \n \l

root@was-prd-k8s-master3:~# bash <(curl -sL http://pf9.io/get_cli)
Validating and installing package dependencies
INFO: using exising virtual environment
Upgrading pip
Installing Platform9 CLI
ASSERT: Installation of Platform9 CLI Failed




Installation failed, Here are the last 10 lines from the log
The full installation log is available at /root/pf9/log/cli_install.log
If more information is needed re-run the install with --debug
DEBUGGING: 15:06:52 : 63 : CLFs:
DEBUGGING: 15:06:52 : 63 : Setting environment variables to be passed to installers
DEBUGGING: 15:06:52 : 63 : branch: master
DEBUGGING: 15:06:52 : 63 : cli_url: git+git://github.com/platform9/express-cli.git@master#egg=express-cli
DEBUGGING: 15:06:52 : 63 : Configuring virtualenv
DEBUGGING: 15:06:53 : 63 : INFO: using exising virtual environment
DEBUGGING: 15:06:53 : 63 : Upgrading pip
DEBUGGING: 15:06:54 : 63 : pip install express-cli completed
DEBUGGING: 15:06:54 : 63 : Installing Platform9 CLI
DEBUGGING: 15:06:55 : 63 : ASSERT: Installation of Platform9 CLI Failed
root@was-prd-k8s-master3:~#

16.04 also fails on bare metal.

root@was-prd-k8s-master1:~# cat /etc/issue
Ubuntu 16.04.6 LTS \n \l

root@was-prd-k8s-master1:~# bash <(curl -sL http://pf9.io/get_cli)
Validating and installing package dependencies
Python Version Selected: python3
Initializing Virtual Environment using Python 3
Collecting pip
  Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
     |################################| 1.5 MB 26.7 MB/s
Collecting setuptools
  Downloading setuptools-46.4.0-py3-none-any.whl (583 kB)
     |################################| 583 kB 79.8 MB/s
Collecting wheel
  Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Installing collected packages: pip, setuptools, wheel
  WARNING: The scripts pip, pip3 and pip3.5 are installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts easy_install and easy_install-3.5 are installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script wheel is installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.1.1 setuptools-46.4.0 wheel-0.34.2
Upgrading pip
Installing Platform9 CLI
ASSERT: Installation of Platform9 CLI Failed




Installation failed, Here are the last 10 lines from the log
The full installation log is available at /root/pf9/log/cli_install.log
If more information is needed re-run the install with --debug
DEBUGGING: 17:17:44 : 63 : Initializing Virtual Environment using Python 3
DEBUGGING: 17:17:44 : 63 : Validating pip
DEBUGGING: 17:17:44 : 63 : ERROR: missing package: pip (attempting to install using get-pip.py)
DEBUGGING: 17:17:47 : 63 : ERROR: missing python package: virtualenv (attempting to install via 'pip install virtualenv')
DEBUGGING: 17:17:49 : 63 : INFO: /root/.local/bin/virtualenv -p python3 --system-site-packages /root/pf9/pf9-venv > /dev/null 2>&1
DEBUGGING: 17:17:49 : 63 : venv_python: /root/pf9/pf9-venv/bin/python
DEBUGGING: 17:17:49 : 63 : Upgrading pip
DEBUGGING: 17:17:51 : 63 : pip install express-cli completed
DEBUGGING: 17:17:51 : 63 : Installing Platform9 CLI
DEBUGGING: 17:17:52 : 63 : ASSERT: Installation of Platform9 CLI Failed

@haimari @BloodMotion the command this is failing for you is:
/root/pf9/pf9-venv/bin/python -m pip install --upgrade --ignore-installed git+git://github.com/platform9/express-cli.git@master#egg=express-cli

Could you run this manually on the machines with the issue and share the o/p?

These were not being logged. (See line below):
https://github.com/platform9/express-cli/blob/master/cli-setup.sh#L415

I'm changing this today so that we have logs for errors such as this. I think one difference is that we test this as non-root but user with sudo privileges (ubuntu in case of Ubuntu server cloud-init images). I'll give this a try with root.

root@was-prd-k8s-master1:~# /root/pf9/pf9-venv/bin/python -m pip install --upgrade --ignore-installed git+git://github.com/platform9/express-cli.git@master#egg=express-cli
Collecting express-cli
  Cloning git://github.com/platform9/express-cli.git (to revision master) to /tmp/pip-install-bplex32m/express-cli
  Running command git clone -q git://github.com/platform9/express-cli.git /tmp/pip-install-bplex32m/express-cli
Collecting click
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
     |################################| 82 kB 2.1 MB/s
Collecting prettytable
  Downloading prettytable-0.7.2.tar.bz2 (21 kB)
Collecting requests
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
     |################################| 58 kB 7.1 MB/s
Collecting netifaces
  Downloading netifaces-0.10.9-cp35-cp35m-manylinux1_x86_64.whl (32 kB)
Collecting colorama
  Downloading colorama-0.4.3-py2.py3-none-any.whl (15 kB)
Collecting urllib3
  Downloading urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
     |################################| 126 kB 13.2 MB/s
Collecting paramiko
  Downloading paramiko-2.7.1-py2.py3-none-any.whl (206 kB)
     |################################| 206 kB 40.3 MB/s
Collecting fabric
  Downloading fabric-2.5.0-py2.py3-none-any.whl (51 kB)
     |################################| 51 kB 1.3 MB/s
Collecting invoke
  Downloading invoke-1.4.1-py3-none-any.whl (210 kB)
     |################################| 210 kB 86.7 MB/s
Collecting ansible
  Downloading ansible-2.9.9.tar.gz (14.2 MB)
     |################################| 14.2 MB 71.2 MB/s
Collecting idna<3,>=2.5
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
     |################################| 58 kB 11.8 MB/s
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
     |################################| 133 kB 96.7 MB/s
Collecting certifi>=2017.4.17
  Downloading certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
     |################################| 157 kB 92.4 MB/s
Collecting pynacl>=1.0.1
  Downloading PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
     |################################| 961 kB 85.4 MB/s
Collecting bcrypt>=3.1.3
  Downloading bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl (56 kB)
     |################################| 56 kB 9.0 MB/s
Collecting cryptography>=2.5
  Downloading cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB)
     |################################| 2.7 MB 80.2 MB/s
Collecting jinja2
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
     |################################| 125 kB 95.2 MB/s
Collecting PyYAML
  Downloading PyYAML-5.3.1.tar.gz (269 kB)
     |################################| 269 kB 85.5 MB/s
Collecting cffi>=1.4.1
  Downloading cffi-1.14.0-cp35-cp35m-manylinux1_x86_64.whl (399 kB)
     |################################| 399 kB 76.6 MB/s
Collecting six
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl (27 kB)
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |################################| 112 kB 98.3 MB/s
Building wheels for collected packages: express-cli, prettytable, ansible, PyYAML
  Building wheel for express-cli (setup.py) ... done
  Created wheel for express-cli: filename=express_cli-0.2.2-py2.py3-none-any.whl size=44727 sha256=d17b89bf6333b77e0e02ad473f74e278d687bc0063654803bbf926f339f18a73
  Stored in directory: /tmp/pip-ephem-wheel-cache-0brbvjjk/wheels/b0/6a/d1/f8128c18a4ddd82f94254fd284bccde039c68be5e7c5a2ea5b
  Building wheel for prettytable (setup.py) ... done
  Created wheel for prettytable: filename=prettytable-0.7.2-py3-none-any.whl size=13698 sha256=36c0ffab30b26154e071a25bfe43485123efc281a2dcf72413766f25f3805f76
  Stored in directory: /root/.cache/pip/wheels/d6/32/2e/336de55091b6c1a736f3e21d0cb74283f56ed266b57dd9f98d
  Building wheel for ansible (setup.py) ... done
  Created wheel for ansible: filename=ansible-2.9.9-py3-none-any.whl size=16168981 sha256=7ecf75221ec34a54a8a41178b1d2a100a20ddf34d8e3dab170612c73432ff0dd
  Stored in directory: /root/.cache/pip/wheels/75/ce/dc/73b553b9149557eac92ead72ba99e4b30ce98ee1bb85af38a1
  Building wheel for PyYAML (setup.py) ... done
  Created wheel for PyYAML: filename=PyYAML-5.3.1-cp35-cp35m-linux_x86_64.whl size=44619 sha256=0d30125dbcc764e9f5bf9a2917f7499b8f702db9aca289c171540161a5b9ce0f
  Stored in directory: /root/.cache/pip/wheels/57/d0/2c/e2003abb5bc1a94c2e8a6fe1c03b8055d074e34c13672e7eb7
Successfully built express-cli prettytable ansible PyYAML
Installing collected packages: click, prettytable, idna, chardet, urllib3, certifi, requests, netifaces, colorama, pycparser, cffi, six, pynacl, bcrypt, cryptography, paramiko, invoke, fabric, MarkupSafe, jinja2, PyYAML, ansible, express-cli
Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 ansible-2.9.9 bcrypt-3.1.7 certifi-2020.4.5.1 cffi-1.14.0 chardet-3.0.4 click-7.1.2 colorama-0.4.3 cryptography-2.9.2 express-cli-0.2.2 fabric-2.5.0 idna-2.9 invoke-1.4.1 jinja2-2.11.2 netifaces-0.10.9 paramiko-2.7.1 prettytable-0.7.2 pycparser-2.20 pynacl-1.4.0 requests-2.23.0 six-1.15.0 urllib3-1.25.9
root@was-prd-k8s-master1:~#

@haimari I've added additional logs to the CLI. If you see this again, please share the o/p from the logfile here.

I run the same command on the same node and it works.
b.t.w i has to install git & curl manually

root@was-prd-k8s-master3:~# bash <(curl -sL http://pf9.io/get_cli)
Validating and installing package dependencies
INFO: using exising virtual environment
Upgrading pip
Installing Platform9 CLI

Please provide your Platform9 Credentials
Platform9 Account URL: https://pmkft-1589784399-36588.platform9.io
Username: haim@startapp.com
Password:
Enter Region & Tenant Details (Freedom Plan requires RegionOne and service)
Region [RegionOne]:
Tenant [service]:
Successfully wrote CLI configuration
Successfully validated the Platform9 account details

Platform9 CLI installation completed successfully

To start building a Kubernetes cluster you can execute:
        /root/pf9/bin/pf9ctl cluster --help

Usage: pf9ctl cluster [OPTIONS] COMMAND [ARGS]...

  Platform9 Managed Kubernetes cluster operations. Read more at
  http://pf9.io/cli_clhelp.

Options:
  --help  Show this message and exit.

Commands:
  attach-node  Attach provided nodes the specified cluster.
  bootstrap    Bootstrap a single node Kubernetes cluster with your current...
  create       Create a Kubernetes cluster.
  prep-node    Prepare a node to be ready to be added to a Kubernetes...
root@was-prd-k8s-master3:~# cat /etc/issue
Ubuntu 18.04.4 LTS \n \l

That's the weird part. I haven't been able to reproduce this in-house but some of my colleagues have as well. The added logs should help pin-point the issue.

b.t.w i has to install git & curl manually

Ubuntu18 should come with curl and git, does it not? I know CentOS doesn't come with git and so we have code to install that explicitly (https://github.com/platform9/express-cli/blob/master/cli-setup.sh#L338)

As far they i know ubuntu does not come with git & curl.
Please note the the installation is stuck on the exact same point on 2 different nodes


root@was-prd-k8s-master2:~# pf9ctl cluster prep-node
No IPs provided. Proceed with preparing the current node to be added to a Kubernetes cluster [y/n]? [y]: y
Preparing the local node to be added to Platform9 Managed Kubernetes
Preparing nodes  [##################################--]   95%  00:00:09

I reinstalled fresh ubuntu 16.04 on bare metal

This is the error i'm facing now:



cat /root/pf9/log/cli_install.log
DEBUGGING: 20:27:15 : 63 : Validating and installing package dependencies
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libhavege1
The following NEW packages will be installed:
  haveged libhavege1
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 49.8 kB of archives.
After this operation, 196 kB of additional disk space will be used.
Get:1 http://mirror.servers.com/ubuntu xenial/universe amd64 libhavege1 amd64 1.9.1-3 [21.8 kB]
Get:2 http://mirror.servers.com/ubuntu xenial/universe amd64 haveged amd64 1.9.1-3 [28.0 kB]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LC_TERMINAL_VERSION = "3.3.4",
	LC_TERMINAL = "iTerm2",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Fetched 49.8 kB in 0s (0 B/s)
Selecting previously unselected package libhavege1:amd64.
(Reading database ... 55623 files and directories currently installed.)
Preparing to unpack .../libhavege1_1.9.1-3_amd64.deb ...
Unpacking libhavege1:amd64 (1.9.1-3) ...
Selecting previously unselected package haveged.
Preparing to unpack .../haveged_1.9.1-3_amd64.deb ...
Unpacking haveged (1.9.1-3) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.28) ...
Setting up libhavege1:amd64 (1.9.1-3) ...
Setting up haveged (1.9.1-3) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.28) ...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  sshpass
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.5 kB of archives.
After this operation, 56.3 kB of additional disk space will be used.
Get:1 http://mirror.servers.com/ubuntu xenial/universe amd64 sshpass amd64 1.05-1 [10.5 kB]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LC_TERMINAL_VERSION = "3.3.4",
	LC_TERMINAL = "iTerm2",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Fetched 10.5 kB in 0s (0 B/s)
Selecting previously unselected package sshpass.
(Reading database ... 55639 files and directories currently installed.)
Preparing to unpack .../sshpass_1.05-1_amd64.deb ...
Unpacking sshpass (1.05-1) ...
Setting up sshpass (1.05-1) ...
DEBUGGING: 20:27:19 : 63 : CLFs:
DEBUGGING: 20:27:19 : 63 : Setting environment variables to be passed to installers
DEBUGGING: 20:27:19 : 63 : branch: master
DEBUGGING: 20:27:19 : 63 : cli_url: git+git://github.com/platform9/express-cli.git@master#egg=express-cli
DEBUGGING: 20:27:19 : 63 : Configuring virtualenv
DEBUGGING: 20:27:19 : 63 : Virtualenv: /root/pf9/pf9-venv doesn't not exist, Configuring.
DEBUGGING: 20:27:19 : 63 : Checking Python3: /usr/bin/python3
DEBUGGING: 20:27:19 : 63 : Python Version Selected: python3
DEBUGGING: 20:27:19 : 63 : Initializing Virtual Environment using Python 3
DEBUGGING: 20:27:19 : 63 : Validating pip
DEBUGGING: 20:27:19 : 63 : ERROR: missing package: pip (attempting to install using get-pip.py)
DEBUGGING: 20:27:22 : 63 : ERROR: missing python package: virtualenv (attempting to install via 'pip install virtualenv')
DEBUGGING: 20:27:24 : 63 : INFO: /root/.local/bin/virtualenv -p python3 --system-site-packages /root/pf9/pf9-venv > /dev/null 2>&1
DEBUGGING: 20:27:24 : 63 : venv_python: /root/pf9/pf9-venv/bin/python
DEBUGGING: 20:27:24 : 63 : Upgrading pip
Collecting pip
  Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Collecting setuptools
  Using cached setuptools-46.4.0-py3-none-any.whl (583 kB)
Collecting wheel
  Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-20.1.1 setuptools-46.4.0 wheel-0.34.2
DEBUGGING: 20:27:26 : 63 : pip install express-cli completed
DEBUGGING: 20:27:26 : 63 : Installing Platform9 CLI
Collecting express-cli
  Cloning git://github.com/platform9/express-cli.git (to revision master) to /tmp/pip-install-9sxlqt6x/express-cli
  Running command git clone -q git://github.com/platform9/express-cli.git /tmp/pip-install-9sxlqt6x/express-cli
Collecting click
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting prettytable
  Downloading prettytable-0.7.2.tar.bz2 (21 kB)
Collecting requests
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
Collecting netifaces
  Downloading netifaces-0.10.9-cp35-cp35m-manylinux1_x86_64.whl (32 kB)
Collecting colorama
  Downloading colorama-0.4.3-py2.py3-none-any.whl (15 kB)
Collecting urllib3
  Downloading urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
Collecting paramiko
  Downloading paramiko-2.7.1-py2.py3-none-any.whl (206 kB)
Collecting fabric
  Downloading fabric-2.5.0-py2.py3-none-any.whl (51 kB)
Collecting invoke
  Downloading invoke-1.4.1-py3-none-any.whl (210 kB)
Collecting ansible
  Downloading ansible-2.9.9.tar.gz (14.2 MB)
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
Collecting idna<3,>=2.5
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting cryptography>=2.5
  Downloading cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB)
Collecting pynacl>=1.0.1
  Downloading PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
Collecting bcrypt>=3.1.3
  Downloading bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl (56 kB)
Collecting jinja2
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting PyYAML
  Downloading PyYAML-5.3.1.tar.gz (269 kB)
Collecting cffi!=1.11.3,>=1.8
  Downloading cffi-1.14.0-cp35-cp35m-manylinux1_x86_64.whl (399 kB)
Collecting six>=1.4.1
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl (27 kB)
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: express-cli, prettytable, ansible, PyYAML
  Building wheel for express-cli (setup.py): started
  Building wheel for express-cli (setup.py): finished with status 'done'
  Created wheel for express-cli: filename=express_cli-0.2.2-py2.py3-none-any.whl size=44727 sha256=89c1784ff7baedd972396d14ba8974acc22b91260509d10a96018fff852d02cf
  Stored in directory: /tmp/pip-ephem-wheel-cache-wfpzrwbe/wheels/b0/6a/d1/f8128c18a4ddd82f94254fd284bccde039c68be5e7c5a2ea5b
  Building wheel for prettytable (setup.py): started
  Building wheel for prettytable (setup.py): finished with status 'done'
  Created wheel for prettytable: filename=prettytable-0.7.2-py3-none-any.whl size=13698 sha256=8ff883707caa281fbdc9906093a6fe7fab09e83c21aeaf4be605be7d40638aab
  Stored in directory: /root/.cache/pip/wheels/d6/32/2e/336de55091b6c1a736f3e21d0cb74283f56ed266b57dd9f98d
  Building wheel for ansible (setup.py): started
  Building wheel for ansible (setup.py): finished with status 'done'
  Created wheel for ansible: filename=ansible-2.9.9-py3-none-any.whl size=16168979 sha256=9b516169677ab0d78f529651869909ce28c8bb3172a9ec2e987f882a69f1040f
  Stored in directory: /root/.cache/pip/wheels/75/ce/dc/73b553b9149557eac92ead72ba99e4b30ce98ee1bb85af38a1
  Building wheel for PyYAML (setup.py): started
  Building wheel for PyYAML (setup.py): finished with status 'done'
  Created wheel for PyYAML: filename=PyYAML-5.3.1-cp35-cp35m-linux_x86_64.whl size=44619 sha256=73f449bdaac231fbe1be459910f9c123937629605129cb9b02d8ed5b0952d2eb
  Stored in directory: /root/.cache/pip/wheels/57/d0/2c/e2003abb5bc1a94c2e8a6fe1c03b8055d074e34c13672e7eb7
Successfully built express-cli prettytable ansible PyYAML
Installing collected packages: click, prettytable, chardet, certifi, idna, urllib3, requests, netifaces, colorama, pycparser, cffi, six, cryptography, pynacl, bcrypt, paramiko, invoke, fabric, MarkupSafe, jinja2, PyYAML, ansible, express-cli
Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 ansible-2.9.9 bcrypt-3.1.7 certifi-2020.4.5.1 cffi-1.14.0 chardet-3.0.4 click-7.1.2 colorama-0.4.3 cryptography-2.9.2 express-cli-0.2.2 fabric-2.5.0 idna-2.9 invoke-1.4.1 jinja2-2.11.2 netifaces-0.10.9 paramiko-2.7.1 prettytable-0.7.2 pycparser-2.20 pynacl-1.4.0 requests-2.23.0 six-1.15.0 urllib3-1.25.9
Traceback (most recent call last):
  File "/root/pf9/pf9-venv/bin/express", line 8, in <module>
    sys.exit(cli())
  File "/root/pf9/pf9-venv/lib/python3.5/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/root/pf9/pf9-venv/lib/python3.5/site-packages/click/core.py", line 760, in main
    _verify_python3_env()
  File "/root/pf9/pf9-venv/lib/python3.5/site-packages/click/_unicodefun.py", line 130, in _verify_python3_env
    " mitigation steps.{}".format(extra)
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/python3/ for mitigation steps.

This system supports the C.UTF-8 locale which is recommended. You might be able to resolve your issue by exporting the following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

Click discovered that you exported a UTF-8 locale but the locale system could not pick up from it because it does not exist. The exported locale is 'en_US.UTF-8' but it is not supported
DEBUGGING: 20:27:46 : 63 : ASSERT: Base Installation of Platform9 CLI Failed

@haimari the additional logs proved helpful.
Looks like there is a locale problem on your host.

perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LC_TERMINAL_VERSION = "3.3.4",
	LC_TERMINAL = "iTerm2",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Try setting locale before running the script, i.e.

export LC_ALL=C.UTF-8
export LANG=C.UTF-8

You can check the supported locale on a system using: locale -a. The exported locale should be supported by the system to work.
Note that since the command used to install cli creates a new BASH shell, these args would need to be part of the bashrc file.

If this works for you, we may be able to add code to override system locale settings as part of the CLI installation although it has the potential of breaking the OS.

This worked,
however preping node, or creating a cluster stuck:

root@was-prd-k8s-master3:~# pf9ctl cluster bootstrap was-prd
Proceed with creating a Kubernetes cluster with the current node as the Kubernetes master [y/n]? [y]: y
Preparing the local node to be added to Platform9 Managed Kubernetes
Preparing nodes [##################################--] 95% 00:00:09

@haimari the additional logs proved helpful.
Looks like there is a locale problem on your host.

perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LC_TERMINAL_VERSION = "3.3.4",
	LC_TERMINAL = "iTerm2",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Try setting locale before running the script, i.e.

export LC_ALL=C.UTF-8
export LANG=C.UTF-8

You can check the supported locale on a system using: locale -a. The exported locale should be supported by the system to work.
Note that since the command used to install cli creates a new BASH shell, these args would need to be part of the bashrc file.

If this works for you, we may be able to add code to override system locale settings as part of the CLI installation although it has the potential of breaking the OS.

Somes OSes probably come with a faulty locale. The locale seems to be updated to the right value when people using a Mac and iTerm, ssh to their linux machine where the CLI is being installed. (https://askubuntu.com/a/778672). Looking into it further. In the meantime, the "quoted"
workaround should help
Screen Shot 2020-05-26 at 12 25 29 PM

This worked,
however preping node, or creating a cluster stuck:

root@was-prd-k8s-master3:~# pf9ctl cluster bootstrap was-prd
Proceed with creating a Kubernetes cluster with the current node as the Kubernetes master [y/n]? [y]: y
Preparing the local node to be added to Platform9 Managed Kubernetes
Preparing nodes [##################################--] 95% 00:00:09

@haimari I missed your earlier comment on this issue. This could be due to other problems and reaching out on PMKFT slack will get you quicker responses :) Link if you aren't' already on it: pmkft.slack.com

I get a similar error when trying to install pf9 cli in terminal. Here is my system if it helps: Macbook pro running 10.15.3

~ bash <(curl -sL http://pf9.io/get_cli)
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
/dev/fd/11: line 288: /etc/os-release: No such file or directory
Unsupported Linux distribution
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N

@4ndrewHarri5 The CLI doesn't work on MacOS today. The supported Operating systems are Ubuntu 16.04, 18.04 and CentOS7.7+

PR #81 Adds a warning message if system locale is not Unicode supported (UTF-8). Closing this issue.

@sarun87 I'm able to reproduce this with Ubuntu 18.04.4 LTS (Server) installed within a VirtualBox VM following the guide for Creating a Single Node Cluster on Windows (substituting 18.04 for 16.04). I performed no updates outside of the initial install.

I verified that the locale is set to C-UTF-8 as directed.

mroark@pmkft-node-0:~$ locale -a
C
C.UTF-8
POSIX

It complains of wanting pip and virtualenv even if either of the two are manually installed (via apt).

Edit: I was not able to reproduce on Mac OS X 10.15.5 using VirtualBox 6.0.22 and the same ubuntu-1804 server image.

@mattroark locale -a tells you all of the locales compatible with the OS installation. Not the one that's configured.

Run env | grep LC and env | grep LANG to see what is configured on your system..