vania-janet/multiturn-rag-retrieval-data huggingface dataset:
On the Create a Toolchain page, click CI - Develop a secure app with DevSecOps practices.







 Step 2: Set up the CI toolchain name and region 

The Welcome page summarizes the purpose of the toolchain that is created, along with pointers to documentation and related materials. When you are ready to proceed, click Start to begin configuring the toolchain.

Review the default information for the toolchain settings:



1. The toolchain's name identifies it in IBM Cloud. Make sure that the toolchain's name is unique within your toolchains for the same region and resource group in IBM Cloud.
2. The toolchain region is the region where the toolchain itself and related resources (Git repos, pipelines, and so on) are created. Toolchains can deploy to any region, regardless of where they are created.







 Step 3: Set up CI tool integrations 

Multiple repositories must be configured during the guided setup, as described in the following sections.

For each repository, you can either clone the repository that is provided as a sample. Alternatively, you can provide a URL to an existing IBM-hosted Git Repos and Issue Tracking repository that you own. The toolchain supports linking only to existing Git Repos and Issue Tracking repositories.



 Application 

The application source code repository can be hosted either on GitHub or the IBM-hosted Git Repos and Issue Tracking repository from the list of source providers. For consistency, this tutorial refers to Git Repos and Issue Tracking.

The recommended options are displayed by default, but you can click the Switch to advanced configuration toggle to see all of the configuration options available for the underlying Git integration. The default behavior of the toolchain is Use default sample that clones the sample application into an IBM-hosted Git Repos and Issue Tracking Repository.

Enter a name for the IBM-hosted Git Repos and Issue Tracking repository that is created by the toolchain as your application repository.

The region of the repository remains the same as the region of the toolchain.
Configuring SonarQube 

SonarQube provides an overview of the overall health and quality of your source code and highlights issues that are found in new code. The code analyzers detect tricky bugs, such as null-pointer dereferences, logic errors, and resource leaks, for more than 20 coding languages.

Configure SonarQube to continuously analyze and measure the quality of your source code:



1. From the IBM Cloud console, click the menu icon ![Hamburger icon](https://cloud.ibm.com/docs-content/v1/content/5eb88a2575e30e316dbb83829c7f4c8b1ddbc67c/devsecops/images/icon_hamburger.svg) and select DevOps. On the Toolchains page, click the toolchain to open its Overview page. Alternatively, on your app's Overview page, on the Continuous delivery card, click View toolchain. Then, click Overview.

a. Click Add a Tool.

b. In the Tool Integrations section, click SonarQube.
2. Type a name for this instance of the SonarQube tool integration.
3. Type the URL for the SonarQube instance that you want to open when you click the SonarQube card from your toolchain.
4. Optional: Type the username that you use to connect to the SonarQube server.

You need to specify a username only if you use a password to connect to the SonarQube server. If you use an authentication token to connect, leave this field empty.
5. Type the password or authentication token that you use to connect to the SonarQube server.
6. If the server cannot be on the public internet, select Advanced. IBM Cloud cannot validate the connection details that you provide and certain functions that require API access to this server are disabled. The delivery pipeline works only by using a private worker that has network access to this server.
7. Click Create Integration.
8.
Deploying your app from local source code with the CLI 

You can deploy your application directly from source code on your local workstation with the IBM Cloud® Code Engine CLI. Use the app create command to both build an image from your local source, and deploy your application to reference this built image.

When you submit a build that pulls code from a local directory, your source code is packed into an archive file. Code Engine automatically uploads the image to an IBM Cloud® Container Registry namespace in your account, and then creates and deploys your app to reference this built image. Note that you can only target IBM Cloud Container Registry for your local builds. The source image is created in the same namespace as your build image. For this scenario, you need to provide only a name for the app and the path to the local source. For a complete listing of options, see the [ibmcloud ce app create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-create) command.

For information about required permissions for accessing image registries, see [Setting up authorities for image registries](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registryauthorities-registry).

You can choose to ignore certain file patterns from within your source code by using the .ceignore file, which behaves similarly to a .gitignore file. For example, entries for a .ceignore file for a node.js application might include node_modules and .npm. For more sample file patterns to ignore, see the [GitHub .gitignore repository](https://github.com/github/gitignore).

The IBM Cloud® Container Registry is required for this scenario.

Before you begin



* Set up your [Code Engine CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli) environment.
* [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).
[Accelerate delivery of static files using a CDN](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-static-files-cdn)Accelerate delivery of static files using a CDN

This tutorial walks you through how to host and serve website assets (images, videos, documents) and user generated content in a IBM Cloud Object Storage, and how to use a IBM® Content Delivery Network (CDN) for fast and secure delivery to users around the world.

Content Delivery Network (CDN) Object Storage



* 2 hours
* 2023-05-05



[Text analysis with Code Engine](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-text-analysis-code-engine)Text analysis with Code Engine

In this tutorial, you will learn about IBM Cloud® Code Engine by deploying a text analysis with Natural Language Understanding application. You will create a Code Engine project, select the project and deploy Code Engine entities - applications and jobs - to the project. You will learn how to bind IBM Cloud services to your Code Engine entities. You will also understand the auto-scaling capability of Code Engine where instances are scaled up or down (to zero) based on incoming workload.

Code Engine Kubernetes service

+2

Object Storage,Natural Language Understanding



* 2 hours
* 2023-05-05



[Scale workloads in shared and dedicated VPC environments](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vpc-scaling-dedicated-compute)Scale workloads in shared and dedicated VPC environments

Isolate workloads by provisioning a dedicated host, attaching an encrypted data volume to a VSI, expanding the attached data volume, and resizing the VSI after the fact.

Virtual Private Cloud (VPC) Databases For PostgreSQL

+2

Schematics,Object Storage



* 2 hours
* 2023-05-05
[Architecture](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution54-code-engine/architecture_diagram.png)

Figure 1. Architecture diagram of the tutorial



1. Developer creates a Code Engine project and deploys a frontend and a backend Code Engine application.
2. Developer connects the frontend (UI) app to the backend by modifying the frontend application to set an environment variable value to point to the backend application's endpoint.
3. Developer provisions the required cloud services and binds them to the backend application and jobs by creating secrets and configmap.
4. User uploads a text file(s) via the frontend app that is stored in Object Storage through the backend application.
5. User runs a Code Engine job via the backend to analyze text by pushing the text to Natural Language Understanding. The result is then saved to Object Storage and displayed in the frontend app when the user clicks the refresh button.



You can use the [Code Engine console](https://cloud.ibm.com/codeengine) to view your progress while working through this tutorial.





 Before you begin 

This tutorial requires:



* IBM Cloud CLI - This CLI tool will enable you to interact with IBM Cloud.



* code-engine/ce plugin (code-engine/ce) - Plugins extend the capabilities of the IBM Cloud CLI with commands specific to a service. The Code Engine plugin will give you access to Code Engine commands on IBM Cloud.
* Optional Container Registry plugin (container-registry)





You can find instructions to download and install these tools for your operating environment in the [Getting started with tutorials](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorials) guide. To avoid the installation of these tools, this tutorial will use the [Cloud Shell](https://cloud.ibm.com/shell) from the IBM Cloud console.
Refer to the [alternatives to the VS Code extension](https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/3159).



* To learn how smart contracts can be used to conduct transactions among multiple parties, see the [Developing applications topic](https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/developing_applications.html) in the Hyperledger Fabric documentation.
* When you are ready to start building smart contracts, use the IBM Developer Tooling, by downloading the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform) locally. New to the VS Code extension? Check out [Developing smart contracts with IBM Blockchain Platform Developer Tools](https://cloud.ibm.com/docs/blockchain?topic=blockchain-develop-vscode) to get started using the extension to create smart contracts that run on the network and clients applications to send transactions.
* For a quick tutorial on developing smart contracts, see [Develop a smart contract with the IBM Blockchain Platform VS Code extension](https://developer.ibm.com/tutorials/ibm-blockchain-platform-vscode-smart-contract/).
* 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).
You can explore the pipelines to understand the toolchain flow and the different operations that run within each pipeline. The toolchain that you created contains the following pipelines:



* Pull request pipeline: Runs when a developer merges changes from their development branch to the master branch, or to any other branch in the repo. The pull request pipeline runs the Unit Test and Static Scans on the Application Source Code.
* Continuous integration pipeline: Runs when you merge a change into the master branch of the Application Source Code repo. The continuous integration pipeline runs the Unit Test, Code Coverage, and Static Scans on the Application Source Code, CIS check, and Bill Of Materials (BOM) check. The continuous delivery pipeline also generates the binary build artifacts and uploads them to the IBM Cloud® Kubernetes Service, as configured in the toolchain. And the continuous integration pipeline generates the metadata of the build artifacts and stores it in the Inventory repo.
* Continuous deployment pipeline: Deploys a Code Engine component image (that the continuous integration pipeline builds and deploys) to a different Code Engine component to be hosted in a different project.







 Run the pull request and continuous integration pipelines 

To start the pull request pipeline, create a merge request in your app repo:



1. On the Toolchain's Overview page, on the Repositories card, click the secure-app-toolchain-code-engine-demo app repo.
2. From the master repo, create a branch.
3. Update some code in the sample node app or readme file and save these changes.
4. Submit the merge request.
5. On the Toolchain's Overview page, on the Delivery pipelines card, click the pr-pipeline pipeline to open the pull request pipeline dashboard. The corresponding merge request in your app repo remains in the pending state until all of the stages of the pull request pipeline successfully complete.
6. After the pull request pipeline run succeeds, you can select it to explore the completed steps.



Zoom

!
For more information, see [Supporting to download modules from private remote host](https://cloud.ibm.com/docs/schematics?topic=schematics-download-modules-pvt-git).

You can create the JSON file as shared in the example.json file for workspace creation and pass the file path along with the file name in --file flag. The description of all the parameters of example.json as described in the table.

You need to replace the <...> placeholders with the actual values. For example, "<workspace_name>" as "testworkspace".

example.json:

{
"name": "<workspace_name>",
"type": [
"<terraform_version>"
],
"location": "<location>",
"description": "<workspace_description>",
"tags": [],
"template_repo": {
"url": "<github_source_repo_url>"
},
"template_data": [
{
"folder": ".",
"type": "<terraform_version>",
"env_values":
{
"VAR1":"<val1>"
},
{
"VAR2":"<val2>"
}
],
"variablestore":
{
"name": "<variable_name_x>",
"value": "<variable_value_x>",
"type": "string",
"secure": true,
"description":"<description>"
},
{
"name": "<variable_name_x>",
"value": "<variable_value_x>",
"type": "bool",
"secure": false,
"description":"<description>"
},
{
* If you are starting with source code that resides in a Git repository, you can choose to let Code Engine take care of building the image from your source and creating (or updating) the job with a single operation. In this scenario, Code Engine uploads your image to IBM Cloud® Container Registry. To learn more, see [Creating a job from repository source code](https://cloud.ibm.com/docs/codeengine?topic=codeengine-run-job-source-code). If you want more control over the build of your image, then you can choose to [build the image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-image) with Code Engine before you create (or update) your job and run the job.
* If you are starting with source code that resides on a local workstation, you can choose to let Code Engine take care of building the image from your source and creating the job with a single CLI command. In this scenario, Code Engine uploads your image to IBM Cloud® Container Registry. To learn more, see [Creating your job from local source code with the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-job-local-source-code). If you want more control over the build of your image, then you can choose to [build the image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-image) with Code Engine before you create (or update) your job and run the job.



For example, you might choose to let Code Engine handle the build of your local source while you evolve the development of your source for the job. Then, after the image is matured, you can update the job to reference the specific image that you want. You can repeat this process as needed.

When you run your updated job, the latest version of your referenced container image is used for the job run, unless a tag is specified for the image. If a tag is specified for the image, then the tagged image is used for the job run.



Looking for more code examples?
"__ow_body": "eyJuYW1lIjoiSmFuZSJ9",
"__ow_headers": {
"accept": "/",
"connection": "close",
"content-length": "15",
"content-type": "application/json",
"host": "172.17.0.1",
"user-agent": "curl/7.43.0"
},
"__ow_path": ""
}
}

Cloud Functions uses the [Akka HTTP](https://doc.akka.io/docs/akka-http/current/?language=scala) framework to [determine which content types are binary files and which are plain text](https://doc.akka.io/api/akka-http/10.0/akka/http/scaladsl/model/MediaTypes$.html).



 Enabling raw HTTP handling 

You can create a raw HTTP web action by setting the --web to raw.

ibmcloud fn action create demo/hello /<filepath>/hello.js --web raw





 Decoding binary body content from Base64 

When raw HTTP content is processed, the __ow_body content is encoded in Base64 when the request Content-Type is the binary type. The following functions demonstrate how to decode the body content in Node, Python, and Swift.



1. Save the sample code in your preferred language to a file called decode.<ext>. Replace <ext> with the file extension of the sample code of your preferred language.

Node

function main(args) {
decoded = new Buffer(args.__ow_body, 'base64').toString('utf-8')
return {body: decoded}
}

Python

def main(args):
try:
decoded = args['__ow_body'].decode('base64').strip()
return {"body": decoded}
Integrating Code Engine workloads with Continuous Delivery 

You can automate the build and deployment of your IBM Cloud® Code Engine workloads by creating a toolchain with Continuous Delivery. You can create a toolchain that pulls your source code from a repository and then builds and deploys your app or job. Whenever you update the source code in the repository, the toolchain automatically pulls your updated code and then builds and re-deploys your app or job.



 Before you begin 

Before you get started with toolchains,



* Create or identify a [Code Engine project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-projectcreate-a-project). You can create these resources by using either the console or the CLI. For more information, see [Code Engine projects](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-projectcreate-a-project).
* Create or identify an instance of the [Continuous Delivery](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-getting-started) service.
* Create or identify an IBM Cloud Container Registry namespace. For more information about creating a namespace, see [IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-getting-startedgetting-started) service.







 Configuring access for your toolchain 

If you want to build and deploy an app or job with a toolchain, set the following permissions in IAM.

IBM Cloud Container Registry



* Reader: To pull the image from Container registry.
* Writer: To push the created image to the target namespace.
* Manager: To create the specified namespace if it does not exist.
* Administrator: To create a service ID, policies, and an API key needed to set up a Code Engine registry access secret to use for the app or job.



Code Engine



* Editor: To access a Code Engine project or to create one, if it does not exist.
* Writer: To manage apps, jobs, and secrets within the Code Engine project.
The URL to the license is [https://creativecommons.org/licenses/by-sa/3.0/legalcode](https://creativecommons.org/licenses/by-sa/3.0/legalcode)

NORMALIZE_TEST.GO [x/text](https://github.com/golang/text/tree/22f1617af38ed)





 Creative Commons Attribution Share Alike 4.0 Generic 

The Program includes some or all of the following works licensed under the Creative Commons. The URL to the license is [https://creativecommons.org/licenses/by-sa/4.0/legalcode](https://creativecommons.org/licenses/by-sa/4.0/legalcode)

GO-METRICS (DOC) [moby/moby] (Not Required), DOCS [docker/spdystream](https://github.com/docker/spdystream/archive/6480d4af844c.zip)





 General Public License V2 

The Program includes some or all of the following licensed to you as Separately Licensed Code under the GNU General Public License. For copies of the source code for this software, send an email to [devlic@us.ibm.com](mailto:devlic@us.ibm.com) identifying the IBM product and the GPL-licensed program for which you are requesting the source code.

default-stylesheet.js, Dockerfile.xml, scanelf, tap-driver.sh, OPENJDK,DEBIAN-ARCHIVE-KEYRING ,DOCKER.INITD,SELINUX, UPX [OpenJDK], GOLANGCI/CHECK, OPENRC [moby/moby], ERRNO-BASE.H [modernc.org/cc], TUNED-PROFILES-ORIGIN-NODE.7 [openshift/origin]





 GNU General Public License, Version 3 

The Program includes some or all of the following licensed to you as Separately Licensed Code under the GNU General Public License.
Setting up your source code repository 

Set up your source code repository with the artifacts that are required to onboard your software. In addition to source code, your repository contains a readme file that's displayed when you publish your product.



  Creating a release 

Create a release in your source code repository to deliver and manage versions of your software. For GitHub repositories, see [Managing releases in a repository](https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository). For GitLab repositories, see [Releases](https://docs.gitlab.com/ee/user/project/releases/::text=In%20GitLab%2C%20a%20release%20enables,point%20in%20the%20source%20code.).





  Uploading your readme file 

Upload a readme file that focuses on helping users to get up and running with your software. When you publish the software, the details of your readme file are available from your product's details page in the IBM Cloud® catalog.



1.  Use the [readme file template](https://cloud.ibm.com/media/docs/downloads/software/sw-readme-tab-template.md) to document the step-by-step instructions for installing your software. If your readme file is missing sections in the template, it will not be approved.
2.  Save your updates and name your file readme.md.
3.  Go to your repository and upload the readme.md file.
To learn more, see [Deploying your app from local source code with the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-local-source-code). If you want more control over the build of your image, then you can choose to [build the image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-image) with Code Engine before you deploy your app.

For example, you might choose to let Code Engine handle the build of your local source while you evolve the development of your source for the app. Then, after the image is matured, you can update the deployed app to reference the specific image that you want. You can repeat this process as needed.



When you deploy your updated app, the latest version of your referenced container image is downloaded and deployed, unless a tag is specified for the image. If a tag is specified for the image, then the tagged image is used for the deployment.

Looking for more code examples? Check out the [Samples for IBM Cloud Code Engine GitHub repo](https://github.com/IBM/CodeEngine).