vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* For guidance on how to leverage the smart contract lifecycle to satisfy a wider set of business use cases, see [Writing powerful smart contracts](https://cloud.ibm.com/docs/blockchain?topic=blockchain-write-powerful-smart-contracts).
* For a more in-depth end-to-end tutorial about using an application to interact with smart contracts, see [Hyperledger Fabric Commercial Paper tutorial](https://hyperledger-fabric.readthedocs.io/en/release-2.2/tutorial/commercial_paper.html).
* To learn about how to incorporate access control mechanisms into your smart contract, see [Writing Your First Chaincode](https://hyperledger-fabric.readthedocs.io/en/release-2.2/chaincode4ade.htmlchaincode-access-control).



When they are tested and ready to be deployed on the network, smart contracts must be packaged into a .tgz or tar.gz format in order to be uploaded to the console. Because the smart contract packaging uses the tar format, organizations can easily inspect their contents by using widely available tooling. When it is important to review the smart contract package before approving the definition, the package can be shared out of band with organization members. There is no way to share the package from the console. You can use either the [IBM Developer Tooling](https://github.com/IBM-Blockchain/blockchain-vscode-extension/releases/tag/v2.0.0-beta.3) or the [peer lifecycle chaincode package](https://hyperledger-fabric.readthedocs.io/en/release-2.2/commands/peerlifecycle.htmlpeer-lifecycle-chaincode-package) CLI to package your smart contract.

Smart contracts in .cds format cannot be used with the Fabric 2.0 lifecycle. They need to be repackaged into .tgz format.
The IBM Cloud CLI provides code risk analysis commands. You can use the IBM Cloud CLI to analyze your code for vulnerabilities and compliance with certain rules. Code Risk Analyzer is available in all IBM Cloud regions where toolchains are supported. For more information about Code Risk Analyzer, see [Code Risk Analyzer plug-in](https://cloud.ibm.com/docs/code-risk-analyzer-cli-plugin).

This image includes the following tools:

 node --version
v18.16.0

 npm --version
9.5.1

 jq --version
jq-1.6

 yq --version
yq (https://github.com/mikefarah/yq/) version v4.33.3

 kubectl version --output=yaml --client
clientVersion:
buildDate: "2023-03-15T13:39:54Z"
compiler: gc
gitCommit: 0ce7342c984110dfc93657d64df5dc3b2c0d1fe9
gitTreeState: clean
gitVersion: v1.25.8
goVersion: go1.19.7
major: "1"
minor: "25"
platform: linux/amd64
kustomizeVersion: v4.5.7

 buildctl --version
buildctl github.com/moby/buildkit v0.11.5 252ae63bcf2a9b62777add4838df5a257b86e991

 helm version --client
version.BuildInfo{Version:"v3.11.3", GitCommit:"323249351482b3bbfc9f5004f65d400aa70f9ae7", GitTreeState:"clean", GoVersion:"go1.20.3"}

 ibmcloud -version
Setting parallelism at create time 

The code block is the sample payload for creating workspace with the Schematics [Create API](https://cloud.ibm.com/apidocs/schematics/schematicscreate-workspace) with parallelism passed as an environment variable.

{
"name": "bb",
"type": [
"terraform_v1.0"
],
"template_repo": {
"url": "url"
},
"template_data": [
{
"folder": ".",
"type": "terraform_v1.0",
"variablestore":
{
"value": "<val>",
"name": "ibmcloud_api_key",
"type": "string",
"secure": true
}
],
"env_values":
{
"TF_LOG": "debug"
},
{
"TF_CLI_ARGS_apply": "-parallelism=20"
},
{
"TF_CLI_ARGS_plan": "-parallelism=20"
}
]
}
]
}
Show more





 Setting parallelism after create 

A sample env_values block in the payload to update environment variables using the Schematics Workspace [Update API](https://cloud.ibm.com/apidocs/schematics/schematicsreplace-workspace). For a more detailed example, see [Update workspace input variables](https://cloud.ibm.com/apidocs/schematics/schematicsreplace-workspace-inputs) API.

"env_values": [
{
"name": "TF_CLI_ARGS_plan",
"value": "-parallelism=20",
"secure": false,
"hidden": false
},
use the new syntax features from Terraform on IBM Cloud v0.12, and identify
any constructs that may need to be adjusted for correct operation with
Terraform on IBM Cloud v0.13.

We recommend to use this command in a clean version control work tree, so that
you can easily see the proposed changes as a diff against the latest commit.
If you have uncommited changes already present, we recommend aborting this
command and dealing with them before running this command again.

Would you like to upgrade the module in the current directory?
Only 'yes' is accepted to confirm.

Enter a value: yes

-----------------------------------------------------------------------------

Upgrade complete!

The configuration files were upgraded successfully. Use your version control
system to review the proposed changes, make any necessary adjustments, and
then commit.
4. Verify versions.tf file is generated as shown in the example.

Example versions.tf

terraform {
required_providers {
ibm = {
 TF-UPGRADE-TODO

 No source detected for this provider. You must add a source address
 in the following format:

 source = "your-registry.example.com/organization/ibm"

 For more information, see the provider source documentation:

 https://www.terraform.io/docs/configuration/providers.htmlprovider-source
}
}
required_version = ">= 0.13"
}
Show more
5. Edit the versions.tf configuration file. Comment out source = "your-registry.example.com/organization/ibm" parameter and provide source value as source = "IBM-Cloud/ibm" as shown in the example.
Added information about troubleshooting images
: 

* See [Debugging images](https://cloud.ibm.com/docs/codeengine?topic=codeengine-troubleshoot-images).



: 

* See [Why can't Code Engine pull an image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-image-cannot-pull)?



Added information about troubleshooting toolchains
: 

* See [Debugging your Code Engine toolchain](https://cloud.ibm.com/docs/codeengine?topic=codeengine-troubleshoot-toolchain-ce).



: 

* See [Why does my build run in my toolchain time out](https://cloud.ibm.com/docs/codeengine?topic=codeengine-ts-buildrun-timeout-toolchain)?



Updated documentation for API V2.0
: See [API change log](https://cloud.ibm.com/docs/codeengine?topic=codeengine-api-changelog).





 27 March 2023 

New Terraform support for Code Engine beta release!
: See [Setting up Terraform for Code Engine](https://cloud.ibm.com/docs/codeengine?topic=codeengine-terraform-setup-ce).





 23 March 2023 

CLI version 1.43.0 released
: This CLI version adds support for the domainmapping command group to manage domain mappings with the CLI. See [CLI version history](https://cloud.ibm.com/docs/codeengine?topic=codeengine-cli_versions).

Added support for managing domain mappings with the CLI.
: Use the domainmapping command group to map your own custom domain to a Code Engine application to route requests from your custom URL to your application from the CLI. With this support, you can manage domain mapping with the CLI, in addition to the Code Engine console.
Subscribing to IBM Cloud Object Storage events for a job with the CLI 

Before you begin



* [Set up your Code Engine CLI environment](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli).
* [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).
* Create a job. For example, create a job that is called myjob that uses the icr.io/codeengine/codeengine image. This image is built from codeengine.go, available from the [Samples for IBM Cloud Code Engine GitHub repo](https://github.com/IBM/CodeEngine).

ibmcloud ce job create --name myjob --image icr.io/codeengine/codeengine





1. Connect your job to the IBM Cloud Object Storage event producer by using the [ibmcloud ce subscription cos create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-cos-create) command.

ibmcloud ce subscription cos create --name mycosevent --destination-type job --destination myjob --bucket mybucket
2. After your subscription creates, run the subscription cos get command for details about your subscription.

ibmcloud ce subscription cos get --name mycosevent

Example output

Getting COS source 'mycosevent'...
OK

Name: mycosevent
ID: abcdefgh-abcd-abcd-abcd-1a2b3c4d5e6f
Project Name: myproject
Project ID: 01234567-abcd-abcd-abcd-abcdabcd1111
Age: 59s
Created: 2021-03-01T20:08:36-06:00

Destination Type: job
Destination: myjob
Bucket: mybucket
Event Type: all
Standard Spark examples 

You can use the following code samples to learn how to use Spark in different situations.

To understand how to access Object Storage, see [Understanding the Object Storage credentials](https://cloud.ibm.com/docs/AnalyticsEngine?topic=AnalyticsEngine-cos-credentials-in-iae-serverless).



 Reading a CSV file from Object Storage using already stated credentials 

The following code samples show you how to create a Python script that reads data from a CSV file to a Python DataFrame. Both the Python script and the CSV file are located in Object Storage.

You can use the same IBM Cloud Object Storage credentials that you specified at the time you submitted the Spark application or that were set as a default configuration when you created the IBM Analytics Engine service instance to read from Object Storage within the application.

Example of the application called read-employees.py. Insert the Object Storage bucket name and service name. The service name is any name given to your Object Storage instance:

from pyspark.sql import SparkSession

def init_spark():
spark = SparkSession.builder.appName("read-write-cos-test").getOrCreate()
sc = spark.sparkContext
return spark,sc

def read_employees(spark,sc):
print("Hello 1" , spark )
employeesDF = spark.read.option("header",True).csv("cos://cosbucketname.cosservicename/employees.csv")
print("Hello 2" , employeesDF)
employeesDF.createOrReplaceTempView("empTable")
seniors = spark.sql("SELECT empTable.NAME FROM empTable WHERE empTable.BAND >= 6")
print("Hello 3", seniors)
seniors.show()

def main():
spark,sc = init_spark()
read_employees(spark,sc)

if __name__ == '__main__':
main()
Show more
The IBM Cloud CLI provides code risk analysis commands. You can use the IBM Cloud CLI to analyze your code for vulnerabilities and compliance with certain rules. Code Risk Analyzer is available in all IBM Cloud regions where toolchains are supported. For more information about Code Risk Analyzer, see [Code Risk Analyzer plug-in](https://cloud.ibm.com/docs/code-risk-analyzer-cli-plugin).

This image updated its version of node.js to 16.18.1. If you need to use a different version of node.js, use nvm install v<node version> at the beginning of your script. You cannot use the current version of LTS (18.12.1) yet.

This image includes the following tools:

 node --version
v16.18.1

 npm --version
8.19.2

 jq --version
jq-1.6

 yq --version
yq version 2.4.1

 yq3 --version
yq version 3.4.1

 yq4 --version
yq (https://github.com/mikefarah/yq/) version v4.30.5

 kubectl version --client
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.3", GitCommit:"aef86a93758dc3cb2c658dd9657ab4ad4afc21cb", GitTreeState:"clean", BuildDate:"2022-07-13T14:30:46Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4

 buildctl --version
If workloads in different projects want to communicate with each other, then the communication must either use the internet or an internal IBM private network. For more information, see [Options for visibility for a Code Engine application](https://cloud.ibm.com/docs/codeengine?topic=codeengine-application-workloadsoptionsvisibility).

Create a project in Code Engine called sample.

ibmcloud ce project create --name sample

Example output

Creating project 'sample'...
ID for project 'sample' is 'abcdabcd-abcd-abcd-abcd-abcd12e3456f7'.
Waiting for project 'sample' to be active...
Now selecting project 'sample'.
OK

Notice that your project is also selected for context, so all subsequent application-related commands are within the scope of this new sample project.





 Step 3: Creating a directory and source code 



1. Create a directory on your local workstation that is named myapp and navigate into it. In this directory, save all the files that are required to build the image and to run your app.

mkdir myapp && cd myapp
2. Create a file called server.js and copy the following source code into it.

const http = require('http');

http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end( "Hello worldn" );
}).listen(8080);

This example uses Node.js. You can substitute code from any [supported runtime](https://cloud.ibm.com/docs/codeengine?topic=codeengine-plan-buildbuild-buildpack-strat).







 Step 4: Deploying your application 

Push your code to Code Engine by using the application create command. You must provide a name for your application and the location of the source code. The following example creates an application called myapp that uses the buildpack strategy and provides the location for the source code in the current directory (.)
The executable of the project for local compiling are small enough to work on one's personal machine, but working with the source data would be constrained due to the size of the data.

When using version 0.3.21 of the package, it is necessary to add region="" in a request to connect to COS.

In addition to PUT, HEAD, and other compatible API commands, we can GET objects as shown with the S3-compatible client we included earlier.

 return object using 'S3 URI' syntax, with progress bar
get_object("s3://mybucketname-only/example.csv", show_progress = TRUE)







 Add data to your R project 

As you can guess, the library discussed earlier has a save_object() method that can write directly to your bucket. While there are many ways to [load data](https://cran.r-project.org/doc/manuals/r-release/R-intro.htmlLoading-data-from-other-R-packages), we can use [cloudSimplifieR](https://cran.r-project.org/package=cloudSimplifieR) to work with an [open data set](https://developer.ibm.com/clouddataservices/category/open-data/).

library(cloudSimplifieR)
d <- as.data.frame(csvToDataframe("s3://mybucket/example.csv"))
plot(d)





 Next steps 

In addition to creating your own projects, you can also use [R Studio to analyze data](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/rstudio-overview.html).
* UI
* CLI
* API
* Terraform







 Creating toolchains 

A toolchain is a set of tool integrations that support development, deployment, and operations tasks. The collective power of a toolchain is greater than the sum of its individual tool integrations.

Open toolchains are available on IBM Cloud®. You can create a toolchain in several ways: use a template to create a toolchain, create a toolchain for an app, create a toolchain by using HTTP APIs or SDKs, or create a toolchain by using Terraform.

Each toolchain is associated with a specific resource group. Any user that has Identity and Access Management (IAM) Viewer permission for the toolchain resource or the resource group that contains it can access the toolchain. For more information about access control for toolchains in resource groups, see [Managing user access to toolchains in resource groups](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-toolchains-iam-security).

On IBM Cloud Public, depending on the template or toolchain that you use, the toolchain might include a GitHub or Git repository (repo) that is populated with app starter code and a preconfigured delivery pipeline. When you push changes to the toolchain's repo, the delivery pipeline automatically builds and deploys the app to IBM Cloud.

To see which toolchains and tool integrations are available, see [Toolchain availability, templates, and tutorials](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-cd_about).



 Creating a toolchain from a template by using the console 

You can use a template as a starting point to [create a toolchain](https://cloud.ibm.com/devops/create) that includes a specific set of tool integrations. Depending on the template that you use, you can create a toolchain that has a specific set of tool integrations or an empty toolchain that you can add tool integrations to.
* [Packaging Ruby code](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_ruby_pkg)



* [Preparing PHP apps](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_php)



* [Structuring PHP code](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_php_struct)
* [Packaging PHP code](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_php_pkg)
* [Packaging Composer modules](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_php_composer)



* [Preparing Java apps](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_java)



* [Structuring Java code](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_java_struct)
* [Packaging Java code](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_java_pkg)
* [Packaging Java code with Gradle](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_java_gradle)
* [Packaging Java code by using the Java runtime with Docker](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_java_docker)
* [Packaging Java code with Maven inside Docker](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_java_maven_docker)
* [Application commands](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application)



* [ibmcloud ce application bind](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-bind)
* [ibmcloud ce application create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-create)
* [ibmcloud ce application delete](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-delete)
* [ibmcloud ce application events](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-events)
* [ibmcloud ce application get](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-get)
* [ibmcloud ce application list](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-list)
* [ibmcloud ce application logs](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-logs)
* [ibmcloud ce application restart](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-restart)
* [ibmcloud ce application unbind](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-unbind)
* [ibmcloud ce application update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-update)



* [Build commands](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-build)
* [Creating and running your Function when using secrets and configmaps](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-workfunctions-secconfigmap)



* [Considerations for Functions quotas](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-workfunctions-quotas)



[Creating Function workloads with inline code](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-inlinecodefun-create-inlinecode)



* [Creating a function with inline with the console](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-inlinecodefun-create-inline-console)
* [Creating a function with inline code with the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-inlinecodefun-create-inline-cli)
* [Next steps](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-inlinecodenextsteps-funinline)



[Creating Function workloads with repository source code](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-repofun-create-repo)



* [Including dependencies for your Function](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-repofun-package-repo)



* [Including modules for a Node.js Function](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-repofunction-nodejs-dep-repo)
* [Including modules for a Python Function](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-repofunction-python-dep-repo)
* 2023-07-07



[Joining data from different data source by using watsonx.data](https://cloud.ibm.com/docs/watsonxdata?topic=watsonxdata-tutorial_join_data)Joining data from different data source by using watsonx.data

{{ shortdesc }}

IBM watsonx.data



* 9 hours
* 2023-07-07



Developer tools[Develop and deploy an app by using Code Engine](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-tutorial-cd-code-engine)Develop and deploy an app by using Code Engine

In this tutorial, you learn how to create an open toolchain by using IBM Cloud® Continuous Delivery and deploy your app on Code Engine. You also learn how toolchains are implemented in the Continuous Delivery service and how to develop and deploy a simple web application (app) by using toolchains.

Continuous Delivery



* 30 minutes
* 2023-04-12



[Deploy an app on Kubernetes](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-tutorial-cd-kubernetes)Deploy an app on Kubernetes

In this tutorial, you learn how to create an open toolchain by using different deployment strategies. You also learn how toolchains are implemented in the IBM Cloud® Continuous Delivery service and how to develop and deploy a simple web application (app) by using toolchains.

Creating apps Red Hat OpenShift on IBM Cloud

+2

Kubernetes service,Continuous Delivery



* 30 minutes
* 2022-10-27



[Deploy Kubernetes resources to multiple clusters by using IBM Cloud Satellite Config](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-tutorial-cd-only-satellite)Deploy Kubernetes resources to multiple clusters by using IBM Cloud Satellite Config

In this tutorial, you learn how to create an open toolchain by using IBM Cloud® Continuous Delivery and deploy your application (app) by using IBM Cloud Satellite.
Follow the steps to create a project, prepare your code, and deploy your app.

Code Engine



* 10 minutes
* 2022-12-07



[Deploying Cloud Foundry applications in Code Engine: Getting started ](https://cloud.ibm.com/docs/codeengine?topic=codeengine-migrate-cf-ce-tutorial)Deploying Cloud Foundry applications in Code Engine: Getting started

Welcome Cloud Foundry users to IBM Cloud® Code Engine.

Code Engine



* 30 minutes
* 2023-06-13



[Subscribing to Object Storage events](https://cloud.ibm.com/docs/codeengine?topic=codeengine-subscribe-cos-tutorial)Subscribing to Object Storage events

With this tutorial, you can learn how to subscribe to Object Storage events by using the IBM Cloud® Code Engine CLI.

Code Engine



* 10 minutes
* 2023-02-21



[Subscribing to cron events](https://cloud.ibm.com/docs/codeengine?topic=codeengine-subscribe-cron-tutorial)Subscribing to cron events

With this tutorial, you can learn how to subscribe to cron events by using the IBM Cloud® Code Engine CLI.

Code Engine



* 10 minutes
* 2022-12-02



[Subscribing to Kafka events](https://cloud.ibm.com/docs/codeengine?topic=codeengine-subscribe-kafka-tutorial)Subscribing to Kafka events

With this tutorial, you can learn how to subscribe to Kafka events by using the IBM Cloud® Code Engine CLI.

Code Engine



* 20 minutes
* 2023-03-17



[Building applications that store information in IBM Cloudant ](https://cloud.ibm.com/docs/codeengine?topic=codeengine-tutorial-cloudant-local)Building applications that store information in IBM Cloudant

Learn how to build your Code Engine application from source code that is stored on your local workstation.