copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2022-11-05 |
schematics CLI, schematics command-line, schematics commands, terraform commands, terraform CLI, setting up schematics CLI, cli |
schematics |
{{site.data.keyword.attribute-definition-list}}
{: #setup-cli}
Use the {{site.data.keyword.bplong_notm}} command-line plug-in to automate the infrastructure provisioning process, the configuration of your {{site.data.keyword.cloud_notm}} resources, and the deployment of app workloads in {{site.data.keyword.cloud_notm}}. The {{site.data.keyword.bpfull}} command-line extends the support of following multiple platform architectures inline with the {{site.data.keyword.cloud}} command line interface (CLI).
- Mac OS X 64-bit
- Mac OS arm64
- Windows™ 64-bit
- Windows™ 32-bit
- Linux™ 64-bit
- Linux™ arm64
- Linux™ 32-bit
- PowerLinux™ 64-bit
- System/390 Linux™ 64-bit
{: #install-schematics-cli}
Install the required command-line to start using {{site.data.keyword.bplong_notm}}.
{: shortdesc}
-
Install the {{site.data.keyword.cloud_notm}} CLI.
Plan to use the command-line often? Try Enabling shell auto completion for {{site.data.keyword.cloud_notm}} command-line (Linux/MacOS only). {: tip}
-
Log in to the {{site.data.keyword.cloud_notm}} CLI. Enter your {{site.data.keyword.cloud_notm}} credentials when prompted.
ibmcloud login
{: pre}
If you have a federated ID, use
ibmcloud login --sso
to log in to the {{site.data.keyword.cloud_notm}} CLI. Enter your user name and use the provided URL in your command-line output to retrieve your one-time passcode. You know that you have a federated ID when the login fails without the--sso
and succeeds with the--sso
option. {: tip}
{: #install-schematics-plugin}
Install the {{site.data.keyword.bplong_notm}} plug-in to automate cloud operations, configuration management, and infrastructure deployments in {{site.data.keyword.cloud_notm}}. {: shortdesc}
-
Install the {{site.data.keyword.cloud_notm}} command-line plug-in for {{site.data.keyword.bpshort}}.
ibmcloud plugin install schematics
{: pre}
-
Verify that the {{site.data.keyword.bplong_notm}} command-line plug-in is installed successfully. The plug-in is listed as
schematics
.ibmcloud plugin list
{: pre}
Example output:
Listing installed plug-ins... Plugin Name Version Status Private endpoints supported schematics 1.12.2 true
{: screen}
-
Verify that you can use the {{site.data.keyword.bpshort}} command-line plug-in by listing all supported commands. The command prefix to work with the {{site.data.keyword.bpshort}} command-line plug-in is
ibmcloud schematics
.ibmcloud schematics help
{: pre}
Example output:
NAME: ibmcloud schematics - USAGE: ibmcloud schematics command [arguments...] [command options] COMMANDS: action, ac Create and manage {{site.data.keyword.bpshort}} Actions. action let you define the source control repository that contains your playbook yamls and so on. and pass environment-specific variables. apply Apply a plan to an workspace to deploy the latest version of your configuration. destroy Destroy resources in an existing workspace. This action cannot be reversed. inventory, iv Create and manage Schematics Inventories. Inventory let you define host group that can contain INI or Resource Query id's job, j Create and manage Schematics jobs. Job let you manage all the jobs like creating/deleting/updating/retrieving. kms listing and enabling IBM Cloud Schematics kms instances and root keys . logs Show details about actions that ran against an workspace. output Get all the output values from your workspace; (ex. result of terraform output command plan Create a plan for an workspace. Plans show how resources would change if you applied the latest version of your workspace configuration. refresh Refresh the workspace with latest version of your workspace configuration. resource-query, rq Create and manage Schematics Resource Query. Resource query let you define conditions to fetch host group that can be used to perform actions state Advanced state management version Report version information about the IBM Cloud Schematics CLI. workspace, ws Create and manage workspaces. workspaces let you define the source control repository that contains your Terraform configuration and pass workspace-specific variables. help, h Show help Enter `ibmcloud schematics help [command]` for more information about a command
{: screen}
{: #schematics-cli-update}
Update the {{site.data.keyword.cloud_notm}} command-line and the {{site.data.keyword.bpshort}} command-line plug-in periodically to get access to new features. {: shortdesc}
-
Log in to the {{site.data.keyword.cloud_notm}} CLI. Enter your {{site.data.keyword.cloud_notm}} credentials when prompted.
ibmcloud login
{: pre}
If you have a federated ID, use
ibmcloud login --sso
to log in to the {{site.data.keyword.cloud_notm}} CLI. Enter your user name and use the provided URL in your command-line output to retrieve your one-time passcode. You know you have a federated ID when the login fails without the--sso
and succeeds with the--sso
option. {: tip} -
Check if an update is available for the {{site.data.keyword.bpshort}} command-line plug-in. If an update is available, you find an Update available notification in your command-line output.
ibmcloud plugin list | grep schematics
{: pre}
Example output:
schematics 1.12.0 Update Available false
{: screen}
-
Update the {{site.data.keyword.bpshort}} command-line plug-in.
For {{site.data.keyword.bpshort}} Blueprints, the {{site.data.keyword.bpshort}} plug-in version must be greater than the
1.12.3
version. {: note}For {{site.data.keyword.bpshort}} Agents, the {{site.data.keyword.bpshort}} plug-in version must be greater than the
1.12.0
version. {: note}ibmcloud plugin update schematics
{: pre}
ibmcloud plugin list | grep schematics
{: pre}
Example output for blueprints support:
schematics 1.12.3 true
{: screen}
-
Show the {{site.data.keyword.bpshort}} plug-in.
ibmcloud plugin show schematics
{: pre}
Example output:
Plugin Name schematics Plugin Version 1.12.3 Plugin SDK Version 0.8.0 Minimal IBM Cloud CLI version required 0.15.1 Private endpoints supported true Commands: schematics,sch Automate the deployment and management of IBM Cloud resources using Infrastructure as Code schematics,sch workspace,ws Create and manage workspaces. workspaces let you define the source control repository that contains your Terraform configuration and pass workspace-specific variables. schematics,sch action,ac Create and manage Schematics actions. Action let you define the source control repository that contains your playbook yamls etc. and pass environment-specific variables. schematics,sch job,j Create and manage Schematics jobs. Job let you manage all the jobs like creating/deleting/updating/retrieving. schematics,sch plan Create a plan for an workspace. Plans show how resources would change if you applied the latest version of your workspace configuration. schematics,sch apply Apply a plan to an workspace to deploy the latest version of your configuration. schematics,sch refresh Refresh the workspace with latest version of your workspace configuration. schematics,sch destroy Destroy resources in an existing workspace. This action cannot be reversed. schematics,sch output Get all the output values from your workspace; (ex. result of terraform output command schematics,sch version Report version information about the IBM Cloud Schematics CLI. schematics,sch logs Show details about actions that ran against an workspace. schematics,sch state Advanced state management schematics,sch kms listing and enabling IBM Cloud Schematics kms instances and root keys . schematics,sch inventory,iv Create and manage Schematics Inventories. Inventory let you define host group that can contain INI or Resource Query id's schematics,sch resource-query,rq Create and manage Schematics Resource Query. Resource query let you define conditions to fetch host group that can be used to perform actions schematics,sch agents,ag [Beta] Agents extends Schematics ability to reach your private, or on-premises, infrastructure. schematics,sch blueprint,bp Deploy and manage large scale environments using reusable blueprint templates.
{: screen}
{: #uninstall-schematics-plugin}
Uninstall the {{site.data.keyword.bplong_notm}} plug-in to remove the {{site.data.keyword.bpshort}} plugin from your local system. {: shortdesc}
-
Uninstall the {{site.data.keyword.cloud_notm}} command-line plug-in for {{site.data.keyword.bpshort}}.
ibmcloud plugin uninstall schematics
{: pre}
Example output:
Uninstalling plug-in 'schematics'... OK Plug-in 'schematics' was successfully uninstalled.
{: screen}
-
Verify that the {{site.data.keyword.bplong_notm}} command-line plug-in is uninstalled successfully.
ibmcloud plugin list | grep schematics
{: pre}