Skip to content

Latest commit

 

History

History
257 lines (193 loc) · 12 KB

cli-private-endpoints.md

File metadata and controls

257 lines (193 loc) · 12 KB
copyright lastupdated keywords subcollection
years
2021
2021-09-22
IBM Cloud CLI, ibmcloud cli, ibmcloud, ibmcloud dev, cli, command line, command-line, developer tools, private endpoints, shell
cli

{:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre} {:note: .note} {:deprecated: .deprecated} {:important: .important} {:tip: .tip} {:external: target="_blank" .external}

Installing and using private endpoints

{: #cli-private-endpoints}

To ensure that you have enhanced control and security over your data when you use the {{site.data.keyword.cloud_notm}} Command Line Interface (CLI), you have the option of using private routes to {{site.data.keyword.cloud_notm}} endpoints. Private routes are not accessible or reachable over the internet. By using the {{site.data.keyword.cloud_notm}} private endpoints feature, you can protect your data from threats from the public network and logically extend your private network. {: shortdesc}

The CLI uses the private endpoint support that is provided by the {{site.data.keyword.cloud_notm}} platform. Platform services that are used by the core CLI provide private endpoint support.

Before you begin

{: #cli-private-endpoints-prereqs}

You must first enable virtual routing and forwarding in your account, and then you can enable the use of {{site.data.keyword.cloud_notm}} private service endpoints. For more information about setting up your account to support the private connectivity option, see Enabling VRF and service endpoints. In addition to enabling VRF, you must be on a private network on ibmcloud with classic infrastructure. For more information, see how to connect to the {{site.data.keyword.cloud_notm}} VPN.

To learn more about private connections on {{site.data.keyword.cloud_notm}}, see Secure access to services by using service endpoints.

The core CLI is supported only on classic infrastructure when the private endpoints feature is enabled. Certain core features and commands are currently not supported on VPC infrastructure. {: important}

Installing from the shell

{: #cli-private-endpoints-shell}

To install the latest CLI for your OS from the shell manually, use the following command for your OS:

If you don't want to install from the shell because it might use root permissions, you can download and run the installer. {: tip}

  • For Mac, copy and paste the following command to a command line and run it:

    curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/osx_private | sh
    

    {: codeblock}

  • For Linux™, copy and paste the following command to a command line and run it:

    curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/linux_private | sh
    

    {: codeblock}

  • For Windows™, copy and paste the following command to a Windows™ PowerShell{: external} command prompt and run it:

    iex(New-Object Net.WebClient).DownloadString('https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/powershell_private')
    

    {: codeblock}

    If you encounter errors like The underlying connection was closed: An unexpected error occurred on a send, make sure you have .Net Framework 4.5 or later installed. Also, try to enable TLS 1.2 protocol by running the following command:

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    

    {: codeblock}

Downloading installation packages with private endpoints

{: #cli-private-endpoints-download}

Use the following steps to install the latest stand-alone {{site.data.keyword.cloud_notm}} CLI:

  1. Select the installer of your OS to begin the download. The following operating systems are supported: macOS X 64-bit, Windows™ 64-bit, Linux™ x86 64-bit, Linux™ LE 64-bit (ppc64le), and S/390 Linux™.

  2. Run the installer:

  • For Mac and Windows™, run the installer.
  • For Linux™, extract the package and run the install script.

Installers

  1. Log in to {{site.data.keyword.cloud_notm}}:
ibmcloud login

{: codeblock}

Now, you're ready to manage {{site.data.keyword.cloud_notm}} resources. Enter ibmcloud help to view the command descriptions.

If you're using a federated ID, log in with a one-time passcode or an API key. {: tip}

If you want to install these packages from previous releases, follow this template to construct the private endpoint link of the package that you want to download, replacing release_tag with the release version that you want to download.

To view previous releases, access the official ibm-cloud-cli-releases GitHub repository.

Mac OS X 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>.pkg

{: codeblock}

Windows™ 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_amd64.exe

{: codeblock}

Windows™ 32 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_386.exe

{: codeblock}

Linux™ 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_amd64.tar.gz

{: codeblock}

Linux™ 32 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_386.tar.gz

{: codeblock}

PowerLinux™ 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_ppc64le.tar.gz

{: codeblock}

S/390 Linux™ 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_s390x.tar.gz

{: codeblock}

Installing to a custom directory

{: #install-private-custom-dir}

When you use installers or a shell script to install the {{site.data.keyword.cloud_notm}} CLI, it is installed in your system directories. If you want to specify a different directory, use the following steps.

If you install the {{site.data.keyword.cloud_notm}} CLI to a custom directory, the ibmcloud update command can't be used to update the CLI. {: important}

  1. Select the matching binary of your platform to begin the download. The following platforms are supported: macOS, linux32, linux64, ppc64le, win32, win64, and s390x.

  2. Extract the package to a directory that you specify.

    You can see the following extracted content:

    For Linux™ and Mac:

    IBM_Cloud_CLI
    ├── LICENSE
    ├── NOTICE
    ├── autocomplete
    │   ├── bash_autocomplete
    │   └── zsh_autocomplete
    └──  ibmcloud
    
    

    {: screen}

    For Windows™:

    IBM_Cloud_CLI
    ├── LICENSE
    ├── NOTICE
    └── ibmcloud.exe
    

    {: screen}

  3. Add to the PATH environment variable and enable shell autocompletion.

Binary files

If you want to install binaries from previous releases, follow this template to construct the private endpoint link of the binary that you want to download, replacing release_tag with the release version that you want to download.

To view previous releases, access the official ibm-cloud-cli-releases Github repository.

Mac OS X 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_macos.tgz

{: codeblock}

Windows 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_windows_amd64.zip

{: codeblock}

Windows 32 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_windows_386.zip

{: codeblock}

Linux 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_amd64.tgz

{: codeblock}

Linux 32 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_386.tgz

{: codeblock}

Power Linux 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_ppc64le.tgz

{: codeblock}

System/390 Linux 64 bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_s390x.tgz

{: codeblock}

Using private endpoints in the CLI

{: #cli-private-endpoints-using}

For instructions on how to use private endpoints in the CLI, and to view the list of commands that support private endpoints, see Logging in to the CLI with a private endpoint

Related information

{: #cli-private-endpoints-related}

For more information, see Securing your connection when using the {{site.data.keyword.cloud_notm}} CLI.