vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Managing projects 

Learn how to create and work with projects.



 What is a project? 

A project is a grouping of Code Engine entities such as applications, jobs, and builds. A project is based on a Kubernetes namespace. The name of your project must be unique within your IBM Cloud® resource group, user account, and region. Projects are used to manage resources and provide access to its entities.

A project provides the following items.



* Provides a unique namespace for entity names.
* Manages access to project resources (inbound access).
* Manages access to backing services, registries, and repositories (outbound access).
* Has an automatically generated certificate for Transport Layer Service (TLS).



For more information about managing access control to projects with IAM, see [Managing user access](https://cloud.ibm.com/docs/codeengine?topic=codeengine-iam).

Projects incur no costs, but instead serve as folders for your apps and jobs.



 How can I see what projects I can access? 

You can see a list of your projects in the [Code Engine console](https://cloud.ibm.com/codeengine/overview).

You can also run the [project list](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-project-list) command.

ibmcloud ce project list

Example output

Getting projects...
OK

Name ID Status Selected Tags Region Resource Group Age
myproj-eude 01234567-abcd-abcd-abcd-abcdabcd2222 active false eu-de default 27d
myproject 01234567-abcd-abcd-abcd-abcdabcd1111 active true us-south default 52d





 How can I see details about a project? 

From the Code Engine console, you can see details of a project by clicking the name of a project from the [Code Engine Projects page](https://cloud.ibm.com/codeengine/projects).
Tracking Object Storage events in Activity Tracker 

Tracking IBM Cloud® Object Storage events with IBM Cloud® Activity Tracker provides a record of what is happening with your data.

This tutorial provides an introduction to capturing information regarding the events of your Object Storage instance using Activity Tracker.

If you're not familiar with IBM Cloud® Object Storage, you can quickly get an overview by [getting started with IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage). Also, if you're not familiar with IBM Cloud® Activity Tracker, you may wish to check out how to [get started with Activity Tracker](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-getting-started).



 Before you begin 

If you are already managing instances of Object Storage or Activity Tracker, you do not need to create more. However, as this tutorial will modify and configure the instance we are working with, make sure that any accounts or services are not being used in a production environment.

This tutorial will create a new bucket and a new instance of Activity Tracker in the process. It is, of course, possible to associate an new or existing instance of Activity Tracker with an existing bucket through the bucket's configuration panel, but we'll start fresh in this case.

For this tutorial, you need:



* An [IBM Cloud® Platform account](https://cloud.ibm.com)
* An [instance of IBM Cloud Object Storage](http://cloud.ibm.com/catalog/services/cloud-object-storage)
* To complete the steps to manage access to the service, your user ID needs administrator platform permissions to manage the IBM Cloud Activity Tracker service. You may have to contact a account administrator. The account owner can grant another user access to the account for the purposes of managing user access, and managing account resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-userroles).
* Your user ID needs to be configured with the service access writer role at a minimum to create and manipulate buckets.
Archiving is configured hourly. Consider configuring the absence alert over a period of 24 hours to monitor archiving daily.



For more details on how to configure an alert, see [Creating alerts](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-create_alert_ui).







 Configure an alert to detect unauthorize access to the bucket 

Notice that you must enable data events read and write for the bucket to collect detailed bucket events in your account. Data events are enabled for each bucket.

You should monitor requests that report unauthorized access to the bucket. There are different reasons for which you might get this type of situation, for example, invalid credentials if the service ID permissions are changed or the service ID is deleted, or a user or service without permissions is trying to access the bucket to upload data or download it.

To configure this alert, you must create a view with the following query so that you monitor any unauthorized access to the bucket:

target.id:<BUCKET-CRN> reason.reasonCode:403

Replace <BUCKET-CRN> with the CRN value of the bucket that you can get from the bucket configuration page.

Then, you must create a presence alert so you are notified as soon as you start receiving this type of event. For more details on how to configure an alert, see [Creating alerts](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-create_alert_ui).





 Configure a dashboard to monitor archiving 

Complete the following steps to define a dashboard:



1. [Launch the Activity Tracker UI](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-launch). The Views section opens.
2. Select the Boards icon !
* For more information on how to delete a preset, see [Delete a preset](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-preset_uipreset_ui_delete).







 Muting alert notifications 

By default, the feature that controls the ability of a user to mute notifications is enabled when you configure an alert on a custom view. The Mutable feature applies to email notifications only.

When the mutable feature is enabled on an alert, a user can pause notifications for a period of time. A user can choose to mute an alert for a period of 1 hour, 6 hours, 12 hours, or 1 day.

For more information on how to mute an email alert, see [Muting an alert](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-emailemail_mute).

For more information on how to ummute an email alert, see [Unmuting a muted alert](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-emailemail_unmute).
discovery.page-view.read Read document page view. 
 discovery.project.create Create a project. 
 discovery.project.delete Delete a project. 
 discovery.project-notices.read Get notices for a project. 
 discovery.stopwords.create Add stopwords to a collection. 
 discovery.stopwords.delete Delete stopwords from a collection. 
 discovery.stopwords.read Get stopwords for a collection. 
 discovery.table-annotation.read Read document page table annotations. 
 discovery.table-cell.read Read document page table cell. 
 discovery.user-data.delete Delete all data associated with a customer ID. 







 Viewing events 

Events that are generated by an instance of the Discovery service are automatically forwarded to the IBM Cloud Activity Tracker service instance that is available in the same location.

IBM Cloud Activity Tracker can have only one instance per location. To view events, you must access the web UI of the IBM Cloud Activity Tracker service in the same location where your service instance is available.

To open the IBM Cloud dashboard, click the user icon in the page header, and then click IBM Cloud dashboard. ![User avatar icon](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/user--avatar.svg)

For more information about how to open IBM Cloud Activity Tracker from the dashboard, see [Navigating to the UI](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-launch).
Before attempting to connect to your Db2 on Cloud database, verify that you have the [prerequisites](https://cloud.ibm.com/docs/Db2onCloud/connecting?topic=Db2onCloud-connect_ovprereqs).





 Procedure 

To create a connection, complete the following steps:



1. Log in to your Data Server Manager web console.
2. In the Data Server Manager web console, go to Set Up > Database Connections.
3. Click the ![+ sign inside a circle](https://cloud.ibm.com/docs-content/v1/content/2a59ee244ed61eb35ab50e45757b42d22f720132/Db2onCloud/connecting/images/icon_R_plus.gif) icon to add a database connection. On the Add Database Connection page under the Database Connection tab, enter the required information in the following fields:



* Database connection name: The name must be unique to Data Server Manager
* Data server type: From the drop-down menu, select DB2 for Linux, UNIX, and Windows
* Database name: BLUDB
* Host name: Enter the Db2 on Cloud host name
* Port number: For a connection without SSL, enter 50000. For a connection with SSL, enter 50001.
* JDBC security: From the drop-down menu, select Clear text password
* User ID: Your Db2 on Cloud user ID
* Password: Your Db2 on Cloud password



4. For a connection with SSL, select the Advanced JDBC Properties tab. Enter the required information in the following fields:



* Property: sslConnection
* Value: true



Click the Add button. Select the Database Connection tab.
5. Test the connection by clicking the Test Connection button. If the connection is successful, click OK.









 InfoSphere Data Architect 

These instructions explain how to create a connection from InfoSphere® Data Architect to a Db2 on Cloud database.



 Prerequisites
Managing groups by using the API 

You can manage IBM Cloud Activity Tracker [groups](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-group_data_access) by using an API.



 Prerequisites on the IBM Cloud Activity Tracker service 



* You must have a paid service plan for the IBM Cloud Activity Tracker service. [Learn more](https://cloud.ibm.com/docs/services/activity-tracker?topic=activity-tracker-service_planservice_plan).
* Check that your user ID has permissions to manage groups. The following table lists the minimum roles that a user must have to manage groups by using the API:





Table 1. IAM roles

 Role Permission granted 

 Platform role: Viewer Allows the user to view the list of service instances. 
 Service role: Manager Allows the user to manage groups by using the API. 



For more information on how to configure policies for a user, see [Granting user permissions to a user or service ID](https://cloud.ibm.com/docs/services/activity-tracker?topic=activity-tracker-iam_view_eventsiam_view_events).





 List the configured groups 

Use [this method](https://cloud.ibm.com/apidocs/activity-trackerlist-group) to list existing groups.

curl --request GET
--url https://<ENDPOINT>/v1/config/groups
-H "content-type: application/json"
-H "servicekey: <SERVICE_KEY>"



* Replace <ENDPOINT> with the IBM Cloud Activity Tracker API endpoint. To see the list of endpoints, see [Endpoints](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-endpointsendpoints_api-at).
* Replace the <SERVICE_KEY> with a valid service key for the IBM Cloud Activity Tracker instance where you plan to configure groups.
* A policy with a platform role viewer to allow the user to see logging instances in the IBM Cloud.
* A policy to grant the user access to 1 group. The service role determines the permissions of the user to work with data that is in scope for the group.



Complete the following steps to grant a user or service ID permissions to work with the IBM Log Analysis service within the context of a group.



 Prerequisites 

Your user ID needs administrator platform permissions to manage the IBM Log Analysis service. The account owner can grant user access to the account for the purposes of managing user access and managing account resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-userroles).





 Step 1. Create an IAM access group 

Do the following to create an access group:



1. From the menu bar, click Manage > Access (IAM), and select Access Groups.
2. Click Create.
3. Enter a name and optional description for your group, and click Create.



You can delete a group by selecting the Remove group option. When you remove a group from the account, you are removing all users and service IDs from the group and all access that is assigned to the group.

To create an access group by using the CLI, you can use the [ibmcloud iam access-group-create](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_commands_iamibmcloud_iam_access_group_create) command.

ibmcloud iam access-group-create GROUP_NAME [-d, --description DESCRIPTION]





 Step 2. Add permissions to view Log Analysis instances in the Observability UI 

After you set up your access group, you can assign a common access policy to the group. You must add permissions to view Log Analysis instances in the Observability UI.

Any policy that you set for an access group applies to all entities, users, and service IDs within the group.

You can assign the policy by using the UI or through the command line.
Monitoring Object Storage activity in Monitoring 

Tracking IBM Cloud® Object Storage events with IBM Cloud® Activity Tracker provides insights and information about what is happening with your data.

This tutorial provides an introduction to finding usage information regarding your Object Storage instance using Monitoring.

If you're not familiar with IBM Cloud® Object Storage, you can quickly get an overview by [getting started with IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage). Also, if you're not familiar with IBM Cloud® Monitoring, you may wish to check out how to [get started with Monitoring](https://cloud.ibm.com/docs/Activity-Tracker-with-LogDNA?topic=Activity-Tracker-with-LogDNA-getting-started).



 Before you begin 

If you are already managing instances of Object Storage or Monitoring, you do not need to create more. However, as this tutorial will modify and configure the instance we are working with, make sure that any accounts or services are not being used in a production environment.

This tutorial will create a new bucket and a new instance of Monitoring in the process. It is, of course, possible to associate an new or existing instance of Monitoring with an existing bucket through the bucket's configuration panel, but we'll start fresh in this case.

For this tutorial, you need:



* An [IBM Cloud® Platform account](https://cloud.ibm.com)
* An [instance of IBM Cloud Object Storage](http://cloud.ibm.com/catalog/services/cloud-object-storage)
* To complete the steps to manage access to the service, your user ID needs administrator platform permissions to manage the IBM Cloud Activity Tracker service. You may have to contact a account administrator. The account owner can grant another user access to the account for the purposes of managing user access, and managing account resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-userroles).
* Your user ID needs to be configured with the service access writer role at a minimum to create and manipulate buckets.
* Provision a service instance
* Delete a service instance
* View details of a service instance
* Create a service ID



Therefore, you need to have an IAM policy for the IBM Log Analysis service with the platform role Editor.

Complete the following steps to assign a user editor role to the IBM Log Analysis service in the account:



1. From the menu bar, click Manage > Access (IAM), and then select Users.
2. From the row for the user that you want to assign access, select the Actions menu, and then click Assign access.
3. Select Assign access to resources.
4. Select IBM Log Analysis.
5. Select All service instances.
6. Select the platform role Editor.
7. Click Assign.







 Granting permissions to a DevOps user to manage an instance in the IBM Cloud account 

Complete the following steps to assign a user editor role on one instance of the IBM Log Analysis service in the account:



1. From the menu bar, click Manage > Access (IAM), and then select Users.
2. From the row for the user that you want to assign access, select the Actions menu, and then click Assign access.
3. Select Assign access to resources.
4. Select IBM Log Analysis.
5. Select the instance.
6. Select the platform role Editor.
7. Click Assign.







 Granting permissions to a DevOps user to manage the service within a resource group 

As a DevOps user, you must have permissions to run the following actions:



* Provision a service instance
* Delete a service instance
* View details of a service instance
* Create a service ID



Therefore, you need an IAM policy for the IBM Log Analysis service with the platform role Editor.

Complete the following steps to assign a user editor role to the IBM Log Analysis service within the context of a resource group:



1. From the menu bar, click Manage > Access (IAM), and then select Users.
2. From the row for the user that you want to assign access, select the Actions menu, and then click Assign access.
Prerequisites 

Before attempting to connect to your Db2 Warehouse on Cloud database, verify that you have the [prerequisites](https://cloud.ibm.com/docs/Db2whc/connecting?topic=Db2whc-connect_ovprereqs).





 Procedure 

To create a connection, complete the following steps:



1. Log in to your Data Server Manager web console.
2. In the Data Server Manager web console, go to Set Up > Database Connections.
3. Click the ![+ sign inside a circle](https://cloud.ibm.com/docs-content/v1/content/68e10678b2f8b8694884ecb5442c326c9b60a3fb/Db2whc/connecting/images/icon_R_plus.gif) icon to add a database connection. On the Add Database Connection page under the Database Connection tab, enter the required information in the following fields:



* Database connection name: The name must be unique to Data Server Manager
* Data server type: From the drop-down menu, select DB2 for Linux, UNIX, and Windows
* Database name: BLUDB
* Host name: Enter the Db2 Warehouse on Cloud host name
* Port number: For a connection without SSL, enter 50000. For a connection with SSL, enter 50001.
* JDBC security: From the drop-down menu, select Clear text password
* User ID: Your Db2 Warehouse on Cloud user ID
* Password: Your Db2 Warehouse on Cloud password



4. For a connection with SSL, select the Advanced JDBC Properties tab. Enter the required information in the following fields:



* Property: sslConnection
* Value: true



Click the Add button. Select the Database Connection tab.
5. Test the connection by clicking the Test Connection button. If the connection is successful, click OK.









 InfoSphere Data Architect 

These instructions explain how to create a connection from InfoSphere® Data Architect to a Db2 Warehouse on Cloud database.



 Prerequisites
Archiving is configured hourly. Consider configuring the absence alert over a period of 24 hours to monitor archiving daily.



For more details on how to configure an alert, see [Creating alerts](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-alertsalerts_create).







 Configure an alert to detect unauthorize access to the bucket 

Notice that you must enable data events read and write for the bucket to collect detailed bucket events in your account. Data events are enabled for each bucket.

You should monitor requests that report unauthorized access to the bucket. There are different reasons for which you might get this type of situation, for example, invalid credentials if the service ID permissions are changed or the service ID is deleted, or a user or service without permissions is trying to access the bucket to upload data or download it.

To configure this alert, you must create a view with the following query so that you monitor any unauthorized access to the bucket:

target.id:<BUCKET-CRN> reason.reasonCode:403

Replace <BUCKET-CRN> with the CRN value of the bucket that you can get from the bucket configuration page.

Then, you must create a presence alert so you are notified as soon as you start receiving this type of event. For more details on how to configure an alert, see [Creating alerts](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-alertsalerts_create).





 Configure a dashboard to monitor archiving 

Complete the following steps to define a dashboard:



1. [Launch the Activity Tracker UI](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-launch). The Views section opens.
2. Select the Boards icon ![Boards icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/boards.png).
How do use a domain service account to run the SQL server service? 

To run SQL Server service you can use local system account, local user account or a domain user account. If you are using a local system account to run your SQL Service the Service Principal Name (SPN) will be automatically registered. If you are using domain account to run SQL Server Service and you have domain user with basic user permissions the computer will not be able to create its own SPN. The MS SQL Service SPN looks like this MSSQLSvc/<hostname>.<domain_name>:1433

If you have configured a SQL service instance to use a local service account initially and then want to change to using a domain service account use the following process:



1.  On the AD server create a domain account and note the password as you will need this password for the SQL Server service account.
2.  In a PowerShell session delete the existing SPN setspn -D MSSQLSvc/<hostname>:1433 <hostname>
3.  Add the new SPN setspn -A MSSQLSvc/<hostname>:1433 <NB_domain><hostname>
ibmcloud cr quota-set --traffic=4000

The command fails because User B doesn't have the correct access.



3. Grant User B the Manager role so that User B can configure IBM Cloud Container Registry.



1. Log back in to your account as yourself, User A, by running the following command.

ibmcloud login
2. Create a policy that grants the Manager role to User B by running the following command.

ibmcloud iam user-policy-create <user.b@example.com> --service-name container-registry --roles Manager



4. Prove that User B can now change quotas in User A's account.



1. Log in as User B, targeting User A's account by running the following command.

ibmcloud login -c <YourAccountID>
2. Try to edit your registry quota to 4 GB of traffic by running the following command.

ibmcloud cr quota-set --traffic=4000

It works because User B has the correct type of access.
3. Now change the quota back by running the following command.

ibmcloud cr quota-set --traffic=5120



5. Clean up.



1. Log back in to your account as yourself, User A, by running the following command.

ibmcloud login
2. List the policies for User B, find the policy that you created by running the following command, and note the ID.

ibmcloud iam user-policies <user.b@example.com>
3. Delete the policy by running the following command, where <Policy_ID> is your Policy ID.

ibmcloud iam user-policy-delete <user.b@example.com> <Policy_ID>









 Step 2: Authorize a user to access specific namespaces 

Create some

namespaceswith sample images, and grant access to them. You create policies to grant different roles to each namespace, and show what effect that has.



1. Create three new namespaces in User A's account.