|
| 1 | +Currently, the `appliance_console_cli` feature is a subset of the full |
| 2 | +functionality of the `appliance_console` itself, and covers functions |
| 3 | +most likely to be scripted using the command-line interface (CLI). |
| 4 | + |
| 5 | +1. After starting the {{ site.data.product.title }} appliance, log in with a user |
| 6 | + name of `root` and the default password of `smartvm`. This displays |
| 7 | + the Bash prompt for the root user. |
| 8 | + |
| 9 | +2. Enter the `appliance_console_cli` or `appliance_console_cli --help` |
| 10 | + command to see a list of options available with the command, or |
| 11 | + simply enter `appliance_console_cli --option <argument>` directly to |
| 12 | + use a specific option. |
| 13 | + |
| 14 | +| | | |
| 15 | +| ---------------- | ------------------------------------------------------------------------------------------ | |
| 16 | +| Option | Description | |
| 17 | +| \--region (-r) | region number (create a new region in the database - requires database credentials passed) | |
| 18 | +| \--internal (-i) | internal database (create a database on the current appliance) | |
| 19 | +| \--dbdisk | database disk device path (for configuring an internal database) | |
| 20 | +| \--hostname (-h) | database hostname | |
| 21 | +| \--port | database port (defaults to `5432`) | |
| 22 | +| \--username (-U) | database username (defaults to `root`) | |
| 23 | +| \--password (-p) | database password | |
| 24 | +| \--dbname (-d) | database name (defaults to `vmdb_production`) | |
| 25 | + |
| 26 | +Database Configuration Options |
| 27 | + |
| 28 | +| | | |
| 29 | +| ----------------- | ---------------------------------------------------------- | |
| 30 | +| Option | Description | |
| 31 | +| \--key (-k) | create a new v2\_key | |
| 32 | +| \--fetch-key (-K) | fetch the v2\_key from the given host | |
| 33 | +| \--force-key (-f) | create or fetch the key even if one exists | |
| 34 | +| \--sshlogin | ssh username for fetching the v2\_key (defaults to `root`) | |
| 35 | +| \--sshpassword | ssh password for fetching the v2\_key | |
| 36 | + |
| 37 | +v2\_key Options |
| 38 | + |
| 39 | +| | | |
| 40 | +| --------------------- | ------------------------------------------------------------------------------------------------ | |
| 41 | +| Option | Description | |
| 42 | +| \--host (-H) | set the appliance hostname to the given name | |
| 43 | +| \--ipaserver (-e) | IPA server FQDN | |
| 44 | +| \--ipaprincipal (-n) | IPA server principal (default: `admin`) | |
| 45 | +| \--ipapassword (-w) | IPA server password | |
| 46 | +| \--ipadomain (-o) | IPA server domain (optional). Will be based on the appliance domain name if not specified. | |
| 47 | +| \--iparealm (-l) | IPA server realm (optional). Will be based on the domain name of the ipaserver if not specified. | |
| 48 | +| \--uninstall-ipa (-u) | uninstall IPA client | |
| 49 | + |
| 50 | +IPA Server Options |
| 51 | + |
| 52 | +<div class="note"> |
| 53 | + |
| 54 | + - In order to configure authentication through an IPA server, in |
| 55 | + addition to using **Configure External Authentication (httpd)** in |
| 56 | + the `appliance_console`, external authentication can be optionally |
| 57 | + configured via the `appliance_console_cli` (command-line interface). |
| 58 | + |
| 59 | + - Specifying **--host** will update the hostname of the appliance. If |
| 60 | + this step was already performed via the `appliance_console` and the |
| 61 | + necessary updates made to `/etc/hosts` if DNS is not properly |
| 62 | + configured, the **--host** option can be omitted. |
| 63 | + |
| 64 | +</div> |
| 65 | + |
| 66 | +| | | |
| 67 | +| ---------------------------- | ------------------------------------------------------------------------------- | |
| 68 | +| Option | Description | |
| 69 | +| \--ca (-c) | CA name used for certmonger (default: `ipa`) | |
| 70 | +| \--postgres-client-cert (-g) | install certs for postgres client | |
| 71 | +| \--postgres-server-cert | install certs for postgres server | |
| 72 | +| \--http-cert | install certs for http server (to create certs/httpd\* values for a unique key) | |
| 73 | +| \--extauth-opts (-x) | external authentication options | |
| 74 | + |
| 75 | +Certificate Options |
| 76 | + |
| 77 | +<div class="note"> |
| 78 | + |
| 79 | +The certificate options augment the functionality of the `certmonger` |
| 80 | +tool and enable creating a certificate signing request (CSR), and |
| 81 | +specifying `certmonger` the directories to store the keys. |
| 82 | + |
| 83 | +</div> |
| 84 | + |
| 85 | +| | | |
| 86 | +| --------------- | ----------------------------------------------------------------------------------- | |
| 87 | +| Option | Description | |
| 88 | +| \--logdisk (-l) | log disk path | |
| 89 | +| \--tmpdisk | initialize the given device for temp storage (volume mounted at `/var/www/miq_tmp`) | |
| 90 | +| \--verbose (-v) | print more debugging info | |
| 91 | + |
| 92 | +Other Options |
| 93 | + |
| 94 | +**Example Usage.** |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +To create a new database locally on the server using `/dev/sdb`: |
| 99 | + |
| 100 | + # appliance_console_cli --internal --dbdisk /dev/sdb --region 0 --password smartvm |
| 101 | + |
| 102 | +To copy the v2\_key from a host *some.example.com* to local machine: |
| 103 | + |
| 104 | + # appliance_console_cli --fetch-key some.example.com --sshlogin root --sshpassword smartvm |
| 105 | + |
| 106 | +You could combine the two to join a region where *db.example.com* is the |
| 107 | +appliance hosting the database: |
| 108 | + |
| 109 | + # appliance_console_cli --fetch-key db.example.com --sshlogin root --sshpassword smartvm --hostname db.example.com --password mydatabasepassword |
| 110 | + |
| 111 | +To configure external authentication: |
| 112 | + |
| 113 | + # appliance_console_cli --host appliance.test.company.com |
| 114 | + --ipaserver ipaserver.test.company.com |
| 115 | + --ipadomain test.company.com |
| 116 | + --iparealm TEST.COMPANY.COM |
| 117 | + --ipaprincipal admin |
| 118 | + --ipapassword smartvm1 |
| 119 | + |
| 120 | +To uninstall external authentication: |
| 121 | + |
| 122 | + # appliance_console_cli --uninstall-ipa |
0 commit comments