Skip to content
Snippets Groups Projects
Commit bce98518 authored by kayrus's avatar kayrus Committed by pýrus
Browse files

Update README.md

parent 43ab27ac
No related branches found
No related tags found
No related merge requests found
...@@ -17,16 +17,26 @@ Flags: ...@@ -17,16 +17,26 @@ Flags:
## Prerequisites ## Prerequisites
* The private key corresponding to the public key, used to create a compute instance, is required Download and unzip the latest release for your operating system from the [releases](../../releases/latest) page.
* Only RSA PKCS #1 v1.5 is supported by OpenStack
* The private key corresponding to the public key used to create a compute instance is required.
* Only RSA PKCS #1 v1.5 is supported by OpenStack.
* **OpenStack environment variables for authentication must be set.** These are typically sourced from an `openrc` file, which includes credentials like your OpenStack username, project, and authentication endpoint. Without these environment variables, the tool will not be able to authenticate with OpenStack.
For reference, you can find simple examples of `openrc` files for Linux/macOS and Windows below:
- [Example `openrc.sh` for Linux/macOS](openrc.sh)
- [Example `openrc.ps1` for Windows](openrc.ps1)
## TLS options ## TLS options
* `OS_CACERT` - environment variable with a path to custom CA certificate. * `OS_CACERT` - environment variable with a path to a custom CA certificate.
* `OS_INSECURE` - skip endpoint TLS certificate validation. Set to `true` **only if you are otherwise convinced of the OpenStack endpoint's authenticity**. * `OS_INSECURE` - skip endpoint TLS certificate validation. Set to `true` **only if you are otherwise convinced of the OpenStack endpoint's authenticity**.
## Windows ## Windows
Before using `nova-password` on Windows, make sure to source the OpenStack environment variables by running the `openrc.ps1` script.
```sh ```sh
.\openrc.ps1 .\openrc.ps1
.\nova-password.exe --private-key-path C:\Users\user\key.pem my-server .\nova-password.exe --private-key-path C:\Users\user\key.pem my-server
...@@ -35,3 +45,16 @@ Flags: ...@@ -35,3 +45,16 @@ Flags:
# or # or
.\nova-password.exe my-server -i C:\Users\user\.ssh\putty.ppk .\nova-password.exe my-server -i C:\Users\user\.ssh\putty.ppk
``` ```
## Linux / macOS
Before using `nova-password` on Linux or macOS, ensure that the OpenStack environment variables are sourced by running the `openrc.sh` script.
```sh
source ~/openrc.sh
nova-password --private-key-path ~/.ssh/id_rsa my-server
# or
nova-password 717433dc-4c2e-4d62-9467-6dd3715b2c6c server-name
# or
nova-password my-server -i ~/.ssh/putty.ppk
```
$env:OS_AUTH_URL="http://keystone.local/v3"
$env:OS_IDENTITY_API_VERSION="3"
$env:OS_PROJECT_NAME="my-project"
$env:OS_PROJECT_DOMAIN_NAME="domain"
$env:OS_USERNAME="my-username"
$env:OS_USER_DOMAIN_NAME="domain"
$Password = Read-Host -Prompt "Please enter your OpenStack Password" -AsSecureString
$env:OS_PASSWORD = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password))
$env:OS_REGION_NAME="region"
export OS_AUTH_URL="http://keystone.local/v3"
export OS_IDENTITY_API_VERSION=3
export OS_PROJECT_NAME="my-project"
export OS_PROJECT_DOMAIN_NAME="domain"
export OS_USERNAME="my-username"
export OS_USER_DOMAIN_NAME="domain"
echo "Please enter your OpenStack Password: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD="${OS_PASSWORD_INPUT}"
export OS_REGION_NAME="region"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment