vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Validation takes a few seconds to fetch the template details from the Git repo.



* In Input Variables section:



* Select Import input file drop down only when you want to import the new inputs YAML file for the blueprint.



* In Import input file (Optional) section:



* Input file GIT URL - <Provide your valid GitHub, GitLab or Bitbucket repository URL that hosts your blueprint configuration file>. For example, https://github.com/Cloud-Schematics/blueprint-basic-example/blob/main/basic-input.yaml. Review the [blueprint URL FAQ](https://cloud.ibm.com/docs/schematics?topic=schematics-blueprints-faqfaqs-bp-url) for details of the URL format.
* Source name - Used to set the source name the input file values are identified by in the UI.
* Personal access token - <Provide your Git personal access token, only for private Git repos>. For more information about how to create an access token, see [creating a personal access token for the command line](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
* Click Import values.





* Observe that the input variables from the inputs.yaml file are imported. Optionally, you can edit the variables. Enter variable values into the table by typing them in or by importing them. For the default values, if any, were pulled from the blueprint template, but can be changed. If there is a dropdown, select a value from the dropdown.
* Click Done editing, if the editing is done.
* Click Save draft only if you need to save the draft to continue edit the input variables again later.





4. Click Create Blueprint that will redirect to the blueprint overview page.





 Verifying blueprint config creation using the UI 

Here are the steps to verify your blueprint config creation was successful.



1.
* You might want to change the name of the Satellite location to something more easy-to-remember, for example try-sat-1.
* You might want to change the resource group for the Satellite location to suit your IBM Cloud account.



2. Track the creation of your AWS location by using the [Schematics workspace](https://cloud.ibm.com/schematics/workspaces).



1. From the Satellite console, select Manage in Schematics.
2. From the Schematics console, click the name of your workspace.
3. Select Jobs from the navigation pane, and then find the current job row, and click View log to review the log details.
4. Wait for the Schematics job to finish and the workspace to enter an Active state.
5. Ensure that your AWS location is in the 'Normal' state before you proceed.





For more information about Schematics locations, see [Locations and service endpoints](https://cloud.ibm.com/docs/schematics?topic=schematics-locations).



 Resources created by the template 

The following resources are created by the template in your AWS cloud account.



* 1 virtual private cloud (VPC).
* 1 subnet for each of the 3 zones in the region.
* 1 security group to meet the host networking requirements for Satellite.
* 6 EC2 instances spread evenly across zones, or the number of hosts that you specified.



The following resources are created by the template in your IBM Cloud account.



* 1 Satellite location.
* 3 Satellite hosts that represent the EC2 instances in AWS, attached to the location and assigned to the Satellite location control plane.
* 3 Satellite hosts that represent the EC2 instances in AWS, attached to the location, unassigned, and available to use for services like an Red Hat OpenShift on IBM Cloud cluster. If you added more than 6 hosts, the number of hosts equals the number that you specified minus the three that are assigned to the control plane.
For guidance on creating and using input files, refer to the sections, [input file schema reference](https://cloud.ibm.com/docs/schematics?topic=schematics-bp-input-schema-yaml) and [create a blueprint configuration](https://cloud.ibm.com/docs/schematics?topic=schematics-create-blueprint-config).

Example input file defining the value of the input docker_ports in YAML block scalar literal style.

resource_group: default
region: us-south
docker_ports: | 
  [
    {
      internal = 9900
      external = 9900
      protocol = "tcp"
    },
    {
      internal = 9901
      external = 9901
      protocol = "ldp"
    }
  ]





 Dynamic inputs 

Dynamic or override inputs are set at [blueprint create](https://cloud.ibm.com/docs/schematics?topic=schematics-create-blueprint-config) time to pass inputs to dynamically customize the template and over ride inputs from an a version controlled input file sourced from a Git repo. They can be used to pass input values that would be a security exposure if written to a Git repository. API keys and SSH keys would typically be passed as dynamic inputs at config create time. See the [blueprint FAQ](https://cloud.ibm.com/docs/schematics?topic=schematics-blueprints-faqfaqs-bp-secure-inputs) for using dynamic inputs to pass sensitive variables.





 What's next? 

In this section you have learned about Schematics templates and configuration. Now you can:



* Explore [deploying Schematics Blueprints](https://cloud.ibm.com/docs/schematics?topic=schematics-deploy-blueprints).
Header Authorization: bearer <iam_token>: your Your IBM Cloud IAM access token. 
 Path id <workspace_ID>: The ID of the workspace. To retrieve the workspace ID, run ibmcloud schematics workspace list 



5. Review the [IBM Cloud Schematics API documentation](https://cloud.ibm.com/apidocs/schematics/schematicsintroduction) for a list of supported APIs.







 Refreshing IBM Cloud IAM access tokens and obtaining new tokens with the API 

An IBM Cloud® Identity and Access Management (IAM) access token expires after one hour. You must refresh your access token regularly to assure access to the IBM Cloud API. You can use the same steps to obtain a new token.

Before you begin, make sure that you have a valid IBM Cloud IAM refresh token or an IBM Cloud API key that you can use to request a new access token.



* Refresh token: Follow the instructions in [Automating the workspace creation and management process with the IBM Cloud API](https://cloud.ibm.com/docs/schematics?topic=schematics-setup-api&interface=apics_api).
* API key: Retrieve your [IBM Cloud](https://cloud.ibm.com/) API key as follows.



1. From the menu bar, click Manage > Access (IAM).
2. Click the Users page and then select yourself.
3. In the API keys pane, click Create an IBM Cloud API key.
4. Enter a Name and Description for your API key and click Create.
5. Click Show to see the API key that was generated for you.
6. Copy the API key so that you can use it to retrieve your new IBM Cloud IAM access token.





Use the following steps if you want to create an IBM Cloud IAM token or if you want to obtain a new refresh token.



1. Generate a new IBM Cloud IAM access token by using the refresh token or the IBM Cloud API key.

POST https://iam.cloud.ibm.com/identity/token
* Click Next.



* In Workspace details section:



* Workspace name as schematics-agent-service.
* Tags as agents-service.
* Resource group as default or other resource group for this workspace.
* Location as North America or other [region](https://cloud.ibm.com/docs/schematics?topic=schematics-multi-region-deployment) for this workspace. If the location used for Agent infrastructure and Agent service does not match, then the logs are not sent to LogDNA.
* Click Next.
* Check the information entered are correct to create a workspace.



* Click Create.



3. On successful creation of schematics-agent-service workspace, review, and edit the following Agent service input variables in the workspace Settings page.

The Agent service workspace and the Agent service should have the same input values for Resource Group, Location, and Tags. Use the cluster_id, and logdna_name recorded while provisioning the Agent infrastructure.



Schematics service inputs

 Input variable Data type Required/Optional Description 

 agent_name String Required The name of an Agent. 
 location String Required The [location](https://cloud.ibm.com/docs/schematics?topic=schematics-multi-region-deployment) of an Agent services. It must be the same as the Agent infrastructure/cluster location. If the location used for Agent infrastructure and Agent service does not match, then the logs are not sent to LogDNA. 
 resource_group_name String Required The name of the resource group used for an Agent infrastructure and Agent service. For more information, see [Creating a resource group](https://cloud.ibm.com/docs/account?topic=account-rgs). Ensure you have right access permission for the resource group. 
 profile_id String Required Create an IAM trusted profile ID for the Agents with the roles and actions. For more information, see [creating profile_id for Agents](https://cloud.ibm.com/docs/schematics?topic=schematics-agent-trusted-profile).
Header Authorization: bearer <iam_token>: your Your IBM Cloud IAM access token. 
 Path id <workspace_ID>: The ID of the workspace. To retrieve the workspace ID, run ibmcloud schematics workspace list 



5. Review the [IBM Cloud Schematics API documentation](https://cloud.ibm.com/apidocs/schematics/schematicsintroduction) for a list of supported APIs.







 Refreshing IBM Cloud IAM access tokens and obtaining new tokens with the API 

An IBM Cloud® Identity and Access Management (IAM) access token expires after one hour. You must refresh your access token regularly to assure access to the IBM Cloud API. You can use the same steps to obtain a new token.

Before you begin, make sure that you have a valid IBM Cloud IAM refresh token or an IBM Cloud API key that you can use to request a new access token.



* Refresh token: Follow the instructions in [Automating the workspace creation and management process with the IBM Cloud API](https://cloud.ibm.com/docs/schematics?topic=schematics-setup-apics_api).
* API key: Retrieve your [IBM Cloud](https://cloud.ibm.com/) API key as follows.



1. From the menu bar, click Manage > Access (IAM).
2. Click the Users page and then select yourself.
3. In the API keys pane, click Create an IBM Cloud API key.
4. Enter a Name and Description for your API key and click Create.
5. Click Show to see the API key that was generated for you.
6. Copy the API key so that you can use it to retrieve your new IBM Cloud IAM access token.





Use the following steps if you want to create an IBM Cloud IAM token or if you want to obtain a new refresh token.



1. Generate a new IBM Cloud IAM access token by using the refresh token or the IBM Cloud API key.

POST https://iam.cloud.ibm.com/identity/token
[Test the connection](https://cloud.ibm.com/docs/Db2onCloud?topic=Db2onCloud-fed_v2fedv2_test_conxion)
8. [Create a nickname](https://cloud.ibm.com/docs/Db2onCloud?topic=Db2onCloud-fed_v2fed2_nick)





 Database and host name layout 

Local database target where the remote table must show:

Hostname : <local_host_name>
DB2 Version: v11.5
Instance Name: db2inst1
Password: <local_password>
Database Name: LOCALDB
Schema Name: DB2INST1

Remote database where the table is present:

Hostname : <remote_host_name>
DB2 Version: v11.5
Instance Name: db2inst1
Service/Port Number: 30850
User: <remote_user>
Password: <remote_password>
Database Name: BLUDB
Schema Name: DB2INST1
Table Name: TEST1





 Test for federation 

Test to see if federation is enabled on your local machine, run the following command:

db2 get dbm cfg | grep -i federated

Federated Database System Support (FEDERATED) = NO

If federation is not enabled, then enable it by using the following commands:

db2 update dbm cfg using federated yes

db2stop

db2start





 Create and connect to local database 

Create a local database and connect to it by running the following commands:

db2 create db localdb

DB20000I The CREATE DATABASE command completed successfully.

db2 connect to localdb

Database Connection Information

Database server = DB2/LINUXX8664 11.5.1.0
SQL authorization ID = DB2INST1
Local database alias = LOCALDB





 Create a wrapper 

Create a wrapper by running the following command:
After you've successfully generated a plan, you can begin [Applying a plan](https://cloud.ibm.com/docs/ibm-spectrum-lsf?topic=ibm-spectrum-lsf-applying-plan&interface=cli) to deploy your IBM Cloud resources to build a Spectrum LSF cluster instance.





 Generating a plan using the API 



1. To generate a plan by using IBM Cloud Schematics Python APIs, create a Python file and provide a name of your choice, for example, schematics_generate_plan.py.
2. Copy and paste the [Generate a plan using Schematics Python API](https://cloud.ibm.com/docs/ibm-spectrum-lsf?topic=ibm-spectrum-lsf-generate-plan&interface=apiexample-request-generate) example request to your Python file.
3. Change the following parameters as part of the request:



* Replace your IBM Cloud API key to the authenticator = IAMAuthenticator('<ibm-api-key>') variable.
* Change the API endpoint to the endpoint mentioned in [API endpoints](https://cloud.ibm.com/apidocs/schematics?code=pythonapi-endpoints) according to the location you want your Schematics workspace to reside, for example, schematics_service.set_service_url('https://us.schematics.cloud.ibm.com').



4. Inside the schematics_service.plan_workspace_command function, provide the following parameters:



* Provide the workspace ID that you created in the [Create a workspace](https://cloud.ibm.com/docs/ibm-spectrum-lsf?topic=ibm-spectrum-lsf-creating-workspace) task or from the IBM Cloud console for Schematics, for example, us-south.workspace.Terraform-Schematics-Python-Workspace.b3bbc9f5.
* Export your IBM Cloud API key by using the following command:



export IBMCLOUD_API_KEY =”<ibm-cloud-api-key>”
Copy and paste the [Destroy resources using Schematics Python API](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-deleting-resources&interface=apiexample-request-destroy) example request to your Python file.
3. Change the following parameters as part of the request:



* Replace your IBM Cloud key to the authenticator = IAMAuthenticator('<ibm-api-key>') variable.
* Change the API endpoint to the endpoint mentioned in [API endpoints](https://cloud.ibm.com/apidocs/schematics?code=pythonapi-endpoints) according to the location that you want your Schematics workspace to reside, for example, schematics_service.set_service_url('https://us.schematics.cloud.ibm.com').



4. Inside the schematics_service.destroy_workspace_command function, provide the following parameters:



* Provide the workspace ID that you generated in the [Creating a workspace](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-creating-workspace&interface=api) task, for example, us-south.workspace.Terraform-Schematics-Python-Workspace.b3bbc9f5.
* Run the following curl command to create a refresh token:



curl -X POST "https://iam.cloud.ibm.com/identity/token" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey=<ibmcloud-api-key>" -u bx:bx |jq
5. Run the Python script by using python3 <python-file-name> to destroy the resources that you created in the Schematics workspace in the IBM Cloud.
6. You get an activity ID in the response if the parameters passed as part of the request are valid.
* London (eu-gb)



You must [create an Activity Tracker instance](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-provision) in Frankfurt, Dallas, or both to monitor the Schematics service.



Location of events per region

 Schematics region Activity Tracker region where events are available 

 us-south us-south 
 us-east us-south 
 eu-de eu-de 
 eu-gb eu-de 



Events that are generated by Schematics are automatically forwarded to the Activity Tracker service.

To monitor the service, [start the Activity Tracker UI](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-launch) to access your events.





 Analyzing events 



 Creating a workspace 

When you create your first workspace, the following events are created by a Schematics owned service ID and sent to IBM Cloud Activity Tracker.

When you manage a workspace, the following events are created by the Schematics service:



* An event with an action schematics.instance.create, when a first workspace is created.
* An event with an action schematics.instance.update, when a workspace is modified.
* An event with an action schematics.instance.delete, when a workspace is deleted.



The initiatorId of the request for these actions is set to a service ID that is owned by the Schematics service.

In addition, when a workspace is created, more events are also generated:



* Event with action schematics.tag.attach to report tagging of the workspace
* Event with action schematics.instance.create to report the creation of the workspace instance in your account
* Event with action schematics.instance.update to report updates to the workspace properties



You can search by target.id to identify all events that report actions on a workspace.
* Change the API endpoint to the endpoint mentioned in [API endpoints](https://cloud.ibm.com/apidocs/schematics?code=pythonapi-endpoints) according to the location that you want your Schematics workspace to reside, for example, schematics_service.set_service_url('https://us.schematics.cloud.ibm.com').



4. Inside the schematics_service.delete_workspace function, provide the following parameters:



* Provide the workspace ID that you generated in the [Creating a workspace](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-creating-workspace&interface=api) task, for example, us-south.workspace.Terraform-Schematics-Python-Workspace.b3bbc9f5.
* Run the following curl command to create a refresh token:

curl -X POST "https://iam.cloud.ibm.com/identity/token" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey=<ibmcloud-api-key>" -u bx:bx |jq
* Note: If you want to destroy the resources as well as delete the workspace, then set the destroy_resources parameter value to True. In this case, the resources are deleted first, and then the workspace is deleted.
* Note: If you want to delete the workspace but not the resources, then remove the destroy_resources parameter completely or set the destroy_resources parameter to False. If resources are already deleted, and if the destroy_resources parameter value is set to True, then the RESOURCE DELETE action will be in FAILED state.



5. Run the Python script by using python3 <python-file-name> to delete the workspace.
6.
To find the ID of a workspace, run ibmcloud schematics workspace list command. 
 --output or -o Optional Returns the command-line output in JSON format. Currently only JSON file format is supported. 



Example

ibmcloud schematics state list --id myworkspace-a1aa1a1a-a11a-11





 ibmcloud schematics workspace taint 

Manually marks an instance or resources as tainted, by forcing the resources to be re-created on the next apply. Taint modifies the state file, but not the infrastructure in your workspace. When you perform next plan the changes will display as re-created, and in the next apply the change is implemented.

You must execute [ibmcloud schematics state list](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referencestate-list) command to view the tainted status of your resources. Taint Status returns tainted for (true) or blank for (false).

Syntax

ibmcloud schematics workspace taint --id WORKSPACE_ID [--options OPTIONS] --address PARAMETER

Command options



Schematics Workspaces taint flags

 Flag Required / Optional Description 

 --id or -i Required The unique identifier of the workspace for which you want to re-create the instance or resource. To find the ID of your workspace, run ibmcloud schematics workspace list command. 
 --options or -o Optional Enter the option flag that you want to show. 
 --address or -adr Required Enter the address of the resource to mark as taint. 



Example

ibmcloud schematics workspace taint --id myworkspace-lalalalalalala-11 --address null_resource.sleep





 ibmcloud schematics workspace untaint 

Manually marks an instance or resources as untainted, by forcing the resources to be restored on the next apply. When you perform next plan the changes will show as restored and in the next apply the change is implemented.
curl --request POST --url https://schematics.cloud.ibm.com/v1/workspaces -H "Authorization: <iam_access_token>" -d '{"name": "<workspace_name>","type": ["<terraform_version>"],"location": "<location>","description": "<description>","template_repo": {"url": "<github_source_repo_url>"},"template_data": [{"folder": ".","type": "<terraform_version>","variablestore": {"value": "<variable_value>","name": "<variable_name>","type": "<variable_type>","secure": true}]}]}'



JSON file component description

 Parameter Description 

 iam_access_token Enter the IAM access token that you retrieved in step 1. 
 workspace_name Enter a name for your workspace. The maximum length of character limit is set to 1 MB. For more information, see [Designing your workspace structure](https://cloud.ibm.com/docs/schematics?topic=schematics-workspaces-planstructure-workspace). 
 terraform_version The Terraform version that you want to use to run your Terraform code. Enter terraform_v0.12 to use Terraform version 0.12, and similarly terraform_v0.13, and terraform_v0.14. Make sure that your Terraform config files are compatible with the Terraform version that you specify. If the Terraform variable version is not specified, by default, Schematics selects the version from your template. 
 location Enter the location where you want to create your workspace. The location determines where your Schematics Actions run and where your workspace data is stored. The location is independent from the region where you want to create your IBM Cloud services. 
 description Enter a description for your workspace.
For more information about how to create an access token, see [creating a personal access token for the command line](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
* Click Update.



4. Click Settings tab.



* In Details section, click Edit.



* Name - Edit the blueprint name.
* Description - Edit the description.
* Click Update.



* In Blueprint Source section, click Edit.



* The source of the template YAML file to refer to a different version or Git branch containing a revised version of the template.
* Repository URL - <Edit the GIT URL>. Refer to the [blueprint FAQs](https://cloud.ibm.com/docs/schematics?topic=schematics-blueprints-faqfaqs-bp-url) for more information on the URL format.
* Personal access token (private repositories only) - <Provide your Git personal access token, only for private Git repos>.



* Click Update.



5. Click Generate Plan to confirm the changes to the blueprint config.





 Verify blueprint update using the UI 

You can follow these steps to list the Schematics Blueprints by using IBM Cloud console.



1. From the [IBM Cloud console](https://cloud.ibm.com/schematics/blueprints). Click your blueprint name to view the blueprint details.
2. Click Overview to view the blueprint summary, that includes Modules status, Variables summary, Blueprint Details and Recent Job runs of your blueprint.



* Optional: From Modules status section, Click View details to view the module details.
* Optional: From Variables summary section, Click View details to view the variable summary.



3. Click Modules tab to see the list of modules and their current status.



* Optional: Click Show details to view the module details.
* Optional: Click Name that takes to the modules Workspace page.



4.