vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If this is not the case, then look at the documentation for [plan and design for the worst conditions](https://cloud.ibm.com/docs/overview?topic=overview-understanding-drworst-conditions).

DR simulation deploys a duplicate of your production environment on the DR site that you can use to perform validation and checking. This environment is cleaned at the end of the simulation and updates that happened to the DR test environment are discarded, as the real production has continued on the primary site.

It is important thus that network streams flowing to the DR test environment are copies of the real production environment. Usually these network flows are intercepted and duplicated at the primary site (that receives the real flow) and sent to the DR site, which operates on separated and different network subnets than production.





 Switch-over 

Opposite to the DR simulation, in the switch-over test, production is moved from primary site to DR site to verify and audit the ability to run and sustain production operations for a long period.

In this option, we don’t test DR runbooks, as this would imply the emergency restart, which has an impact on the production environment.

To avoid any impact to the production environment, you should pose all the possible attention in performing this switch, such to minimize all those impacts.

Production operations are closed orderly on the primary site and reopened from the DR site.

Data replication is reverted once everything in the DR site has been verified and before network streams are rerouted to the DR site.

Production runs in the DR site for whatever period you have chosen before returning to the primary site at your most convenient time. During this period, your production site is performing as the DR until the next switch-over.

Updates happened to the production running in the DR site is kept and replicated back to the primary site.





 Disaster recovery test frequency 

DR test frequency depends on many factors, but in general you should have a DR test at least once per year. This is the bare minimum frequency that is accepted by auditors to prove your ability to recover.

In setting the frequency though, you should increase this base minimum to a level depending on multiple elements specific of the cloud, such as:

How dynamic is your production environment
Optional 
 zap-ui-port String Port to run the ZAP UI scanner when deployed to a cluster, default: 9085. Optional 
 zap_ui_deployment_name String Name of the ZAP UI scanner deployment, default: zap-ui-deployment. Optional 
 zap-proxy-service String Name for the ZAP Proxy service required by the UI scanner, default: zap-proxy-service. Optional 
 zap-ui-image String Set this parameter to use a custom ZAP UI Scanner image. Otherwise, the IBM default is used. Optional 
 zap-proxy-image String Set this to use a custom ZAP Proxy image. Otherwise, the IBM default is used. Optional 



Create a folder uiscripts inside the scripts/zap directory inside your application repository. Also set this folder path against zap-ui-script-directory in the trigger_zap_scans file. This folder can be created anywhere else, too. The path should be adjusted for zap-ui-script-directory.

Create a file run.sh inside the uiscripts directory. run.sh drives the UI tests. We can configure Protractor-based tests or any other suitable framework.

Create a file export.sh inside the uiscripts directory. This file holds all the different environment variables that are required for the test framework to use. Set those environment values by adding export <VARIABLE_NAME>=<VALUE>.

To hold any configuration information for the test framework, create a folder conf inside the uiscripts directory to house configuration information for the test framework.

For a reference implementation that uses Protractor as the test framework, see [hello-compliance-app](https://us-south.git.cloud.ibm.com/open-toolchain/hello-compliance-app).





 Managing ZAP Scan results 

Based on the value of the parameters opt-in-dynamic-api-scan and opt-in-dynamic-ui-scan, we can choose to selectively run either the API scan or the UI scan or both.

Inside the trigger_zap_scans file, we can trigger individual scans based on the opt-in parameters as follows.
Peer identity peer1 peer1pw peer 







 Creating the peer organization MSP definition 

Now that we have created the peer's CA and used it to register identities for the Org1 admin and for the Org1 peer, we need to create a formal definition of the peer's organization, which is known as an MSP. Note that many peers can belong to an organization. You do not need to create a new organization every time you create a peer. Because this is the first time that we go through the tutorial, we will create the MSP definition for this organization. During the process of creating the MSP, we will enroll the org1admin identity and add it to our Wallet.



1. Navigate to the Organizations tab in the left navigation and click Create MSP definition.
2. On the first panel, enter Org1 MSP as the organization MSP display name and org1msp and as the MSP ID. If you plan to specify an MSP other than org1msp, make sure to review the guidelines for MSP names in the tooltip. Click Next.
3. On the Root Certificate Authority details panel, specify the CA you used to register the identities for this organization. If this is your first time through this tutorial, you should only see one: Org1 CA. The CA root certificate and TLS CA root certificate are displayed. Click Next.
4. On the Admin certificates panel, select the enroll ID you created for your organization admin from the drop-down list, org1admin, and enter its associated secret, org1adminpw. Then, give this identity a display name, Org1 MSP Admin. Note: the default display name for this identity is the name of your MSP and the word "Admin". If you select a different name for your MSP, that will be reflected in the default.
5. Click the Generate button to enroll this identity as the admin of your organization and export the identity to the Wallet, where it will be used when creating the peer and creating channels.
6. Click Export to export the admin certificates to your file system.
TeamAccount (2bb222bb2b22222bbb2b2222bb2bb222) <-> 7654321
Enter a number> 2
Targeted account TeamAccount (2bb222bb2b22222bbb2b2222bb2bb222) <-> 7654321

Targeted resource group Default

Select a region (or press enter to skip):
1. au-syd
2. jp-tok
3. eu-de
4. eu-gb
5. us-south
6. us-east
Enter a number> 5
Targeted region us-south

API endpoint: https://cloud.ibm.com
Region: us-south
User: first.last@email.com
Account: TeamAccount (2bb222bb2b22222bbb2b2222bb2bb222) <-> 7654321
Resource group: Default
CF API endpoint:
Org:
Space:

...





 Switch regions by using the CLI 

To get the latest status of the VPC regions, run the following command:

ibmcloud is regions

To switch to a different region, run the ibmcloud target -r <region> command. For example, to switch to the Washington DC region, run the following command:

ibmcloud target -r us-east

To check your current location, run the following command:

ibmcloud target





 Switch regions by using the API 

To interact with the Regional VPC API by using REST, direct your request to the API endpoint that is associated with the region in which you want to create resources. The region's API endpoint is shown in the previous table. You also can find the endpoints that are associated with the regions by running the following command:

ibmcloud is regions

For example, to get the list of VPCs in the us-south region, run the following command:
PCI (peripheral component interconnect) A physical network interface. 
 VLAN (virtual LAN) interface A virtual network interface that is associated with a PCI interface through the VLAN ID. The VLAN interface automatically tags traffic that is routed through it with the VLAN ID. Inbound traffic that is tagged with a VLAN ID is directed to the appropriate VLAN interface. 





 PCI and VLAN interface characteristics 

The following list highlights characteristics of the PCI and VLAN interfaces.



* You can create up to 8 PCI interfaces on a bare metal server. To add or remove PCI interfaces, the bare metal server must be STOPPED.
* You don't have limitations on the maximum number of VLAN interfaces that can you can create.
* You can attach security groups to both PCI and VLAN interfaces to handle incoming and outgoing traffic to the network interface. The VLAN interface maintains its own security group rules that might be different from its associated PCI interface rules.
* All network interfaces are backed by two redundant physical ports that are on the TORs (top-of-rack) switch. IBM Cloud® manages the aggregation, so you don't need to create multiple PCI interfaces for redundancy.
* Optionally, you can set VLAN interfaces to "floatable" to support vMotion between the bare metal servers on a VMware compatible network.
* You can associate more than one floating IP with a network interface. Having multiple floating IPs enables the VMware NSX-T Data Center to assign floating IPs to the VMware VMs.
* You can identify the target PCI interface in vSphere through its MAC address. You can retrieve the MAC address for the PCI interface through the UI, [CLI](https://cloud.ibm.com/docs/vpc?topic=vpc-infrastructure-cli-plugin-vpc-referencebare-metal-server-network-interface), or [API](https://cloud.ibm.com/apidocs/vpc/latestlist-bare-metal-server-network-interfaces).







 Limitations of network interfaces 



1. VLAN interfaces with different VLAND IDs can be placed within different subnets.
Objectives 



* Understand BYOIP implementation patterns
* Select implementation pattern for IBM Cloud.







 IBM Cloud IP addressing 

The IBM Cloud utilizes a number of private address ranges, most specifically 10.0.0.0/8, and in some cases these ranges may conflict with existing client networks. Where address conflicts exist, there are a number of patterns that support BYOIP to allow interoperability with the IBM Cloud network.



* Network Address Translation
* GRE (Generic Routing Encapsulation) tunneling
* GRE tunneling with IP alias
* Virtual Overlay Network



The choice of pattern is determined by the applications intended to be hosted on the IBM Cloud. There are two key aspects, application sensitivity to the pattern implementation and the extent of overlap of address ranges between the client network and IBM Cloud. Additional considerations will also apply if there is an intent to use a dedicated private network connection to IBM Cloud. The documentation for [IBM Cloud® Direct Link ](https://cloud.ibm.com/docs/direct-link?topic=direct-link-configure-ibm-cloud-direct-linkconfigure-ibm-cloud-direct-link) is recommended reading for all users considering BYOIP. For IBM Cloud® Direct Link users, the associated guidance should be followed in deference to the information presented here.





 Implementation patterns overview 



1. NAT: NAT address translation at the on-premises client router. Perform on-premises NAT to translate the client addressing scheme to the IP addresses assigned by IBM Cloud to provisioned IaaS services.
2. GRE Tunneling: The addressing scheme is unified by routing IP traffic over a GRE tunnel between IBM Cloud and the on-premise network, typically via VPN. This is the scenario illustrated in [this tutorial](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-configuring-IPSEC-VPNconfiguring-IPSEC-VPN).

There are two sub-patterns depending on the potential for address space overlap.



* No Address Overlapping: when there’s no address overlap of address ranges and risk of conflict between the networks.
Enterprise applications Bundle of compatible products that deliver enterprise-grade app solutions for information sharing, automation, and agility 
 Integration Products that facilitate the connection of data, apps, APIs, and devices across an organization to be more efficient, productive, and agile 
 Internet of Things Products that support receiving and transferring data over wireless networks without human intervention 
 Logging and monitoring Products that support storing, searching, analyzing, and monitoring log data and events. And, products that support reviewing and managing the operational workflow and processes being logged 
 Mobile Products with specific or special utility for users creatings things to be used on mobile devices 
 Networking Products that support or augment the linking of computers so they can operate interactively 
 Security Products that provide the protection of stored data from theft, leakage, and deletion 
 Storage Products that support data to be created, read, updated, and deleted 



You can also scope your view of the catalog by using the Provider filter to browse by individual providers, and the Location filter to view products available in specific regions.





 Searching the catalog for software 

The following table lists the filter options you can use when searching the catalog for software.

Category

Delivery method

Deployment target



Table 2. Options for filtering by category

 Option Description 

 AI / Machine Learning Products that enable systems to learn from data rather than through explicit programming 
 Analytics Products that facilitate the analysis of data, typically large sets of business data, by the use of mathematics, statistics, and other means 
 Blockchain Products that facilitate the process of recording transactions and tracking assets in a business network 
 Compute Infrastructure resources that serve as the basis for building apps in the cloud 
 Containers A standard unit of software that packages up code and all its dependencies so the app runs quickly and reliably from one computing environment to another 
 Converged infrastructure A way of structuring an information technology (IT) system by grouping multiple components into a single optimized computing package, components of which may include servers; data storage devices; networking equipment; and software for IT infrastructure management, automation and orchestration 
 Databases Products that provide some form of access to a database without the need for setting up physical hardware, installing software, or configuring for performance 
 Developer tools Products that support developing, testing, and debugging software
The now() method returns the current date and time for a specified time zone, in the format yyyy-MM-dd HH:mm:ss 'GMT'XXX:

now('Australia/Sydney').

In this example, if the current date and time is 2021-11-26 11:41:00, the returned string is 2021-11-26 21:41:00 GMT+10.00 or 2021-11-26 21:41:00 GMT+11.00 depending on daylight saving time.

The output string format change above is applicable to date and time calculation methods as well. For example, if the <date> string used is in the format yyyy-MM-dd HH:mm:ss, such as when using the method today(), then the output is in the same format (yyyy-MM-dd HH:mm:ss). However, if the <date> string is in the format yyyy-MM-dd HH:mm:ss 'GMT'XXX, such when using the method now(), then the output will be in the format yyyy-MM-dd HH:mm:ss 'GMT'XXX.





 .reformatDateTime(String format) 

Formats date and time strings for output. The parameter is a format string specifying how the date or time value should be formatted. The format string must be specified using the Java [SimpleDateFormat](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) syntax.

This method returns a string formatted according to the specified format:



* MM/dd/yyyy for 12/31/2016
* h a for 10pm



To return the day of the week:



* EEEE for Tuesday
* E for Tue
* u for day index (1 = Monday, ..., 7 = Sunday)



For example, this expression returns the value 17:30:00 as 5:30 PM:

${system_current_date}.reformatDateTime('h:mm a')
Right-size over-sized VMs Use a simple approach to right-size oversized VMs: identify, profile and tune, and monitor demand trends. Using vCenter identify large VMs that have the potential for right-sizing. Navigate to Monitor, Performance, and profile the average CPU and RAM demand profile of the workload over time and adjust the virtual resources. Finally, continue to monitor the workloads to see that the performance is acceptable. Ideally, consumed memory for the VM should be close to the memory used by the guest OS, plus overhead for running the VM. 
 Right-size under-sized VMs Use a simple approach to right-size under-sized VMs. First, identify, then profile and tune, and monitor demand trends. Identify small VMs that need right-sizing. Profile the average CPU and RAM demand profile of the workload over time and adjust the virtual resources. Finally, continue to monitor the workloads to see that the performance is acceptable. Ideally, consumed memory for the VM should be close to the memory used by the guest OS, plus overhead for running the VM. 
 Check VM hardware device compatibility Using the VMware hardware compatibility online resource, check that your VMs' hardware resources such as network and storage devices, are supported for that OS. If they are not supported, change to a supported device to improve reliability and performance. 







 Related links 



* [Operations Management on IBM Cloud](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-opsmgmt-intro)
entityAttributes := make(map[string]interface{})
entityAttributes["city"] = "Bangalore"
entityAttributes["country"] = "India"

propertyVal := property.GetCurrentValue(entityId, entityAttributes)



* entityId: entityId is a string identifier related to the Entity against which the property will be evaluated. For example, an entity might be an instance of an app that runs on a mobile device, a microservice that runs on the cloud, or a component of infrastructure that runs that microservice. For any entity to interact with App Configuration, it must provide a unique entity ID.
* entityAttributes: entityAttributes is a map of type map[string]interface{} consisting of the attribute name and their values that defines the specified entity. This is an optional parameter if the property is not configured with any targeting definition. If the targeting is configured, then entityAttributes must be provided for the rule evaluation. An attribute is a parameter that is used to define a segment. The SDK uses the attribute values to determine if the specified entity satisfies the targeting rules, and returns the appropriate property value.







 Get secret property 

secretPropertyObject, err := appConfiguration.GetSecret(propertyID, secretsManagerObject)



* propertyID: propertyID is the unique string identifier, using this you will be able to fetch the property which provides the necessary data to fetch the secret.
* secretsManagerObject: secretsManagerObject is an Secrets Manager variable or object which will be used for getting the secrets during the secret property evaluation. For more information on how to create a Secrets Manager object, see [here](https://cloud.ibm.com/apidocs/secrets-manager?code=go).







 Evaluate a secret property 

Use the secretPropertyObject.GetCurrentValue(entityId, entityAttributes) method to evaluate the value of the secret property. GetCurrentValue returns the secret value based on the evaluation.

entityId := "john_doe"
Considerations for high availability and disaster recovery 

Many events can cause server outages. Some are planned and within your control and others are unforeseen events such as hardware failures, software bugs, network issues, and even maintenance that didn’t go as planned. Multiple application servers need to be implemented to avoid and eliminate these potential outages. Spinning up multiple applications is not enough. Where the application server is deployed needs to be considered so that you avoid a single fault domain.

For bare metal servers, you want to spread the server application across multiple data centers. By placing the application servers across PODs, availability is improved.

While each POD supports multiple VLANs, you can order extra VLANs at the POD level rather than the data center level. As you order the bare metal server, you can assign the bare metal server to the VLANs to dictate server deployment across PODs within a data center.



  Linking your bare metal server 

For bare metal servers, you can order a server as a single link or redundant link. If the workload doesn’t have any redundancy that is built into its application, it is best to order a redundant link for added link protection.

If your workload uses built-in redundancy to the application, whether it's through clustering or replication, you might be considering a single link rather than a redundant link to reduce costs. Keep in mind that having a redundant link is still a better option because it eliminates the link as the single point of failure and provides more bandwidth to the server.





  Network interface controller 

The network interface controller (NIC) provides the link that connects your bare metal or virtual server to the network for communication. A common practice is to team two interfaces on the NIC to create a logical interface for redundancy and increase bandwidth. You have different options for teaming ports together.



1.  Distribute traffic by using the operating system. This method provides switch-independent teaming.
2.  Select automatic port redundancy. This redundancy allows the IBM Cloud® provisioning service to create the NIC teaming by using LACP.
3.  Perform the NIC teaming yourself through different NIC team modes such as active-passive, round-robin, adaptive transmit load-balancing, or adapter load-balancing.



For VMware®, LACP is not available, but other NIC teaming mode is allowed.
For more information, see [Logging in as a Virtual Server Instance Compute Resource Identity](https://cloud.ibm.com/docs/cli?topic=cli-vsi-cri-login).
* You are using the IBM Cloud SDK with [VPC Instance Authentication](https://github.com/IBM/ibm-cloud-sdk-commonauthentication) inside an instance with secure access to the instance metadata service enabled. For more information, see [IBM Cloud Go SDK](https://github.com/IBM/go-sdk-core/blob/main/Authentication.mdvpc-instance-authentication).





 Enable secure access when you provision an instance 

To enable secure access, when you provision an instance with the [POST /instances](https://cloud.ibm.com/apidocs/vpc/latestcreate-instance) method, specify a value for the metadata_service.protocol property for your instance. For secure access specify https. The default setting is unencrypted http.





 Enable secure access on an existing instance 

To enable secure access on an existing instance, use the [PATCH /instances/{id}](https://cloud.ibm.com/apidocs/vpc/latestupdate-instance) method to update the instance. Specify a value for the metadata_service.protocol property for your instance. For secure access specify https. The default setting is unencrypted http.







 Set the metadata hop limit by using the API 

You can set the hop limit for IP response packets from the metadata service using the metadata_service.response_hop_limit property

This property applies only when the metadata service is enabled by setting metadata_service.enabled to true. The default is false.



 Set the metadata hop limit when you provision an instance 

To set the response when you provision an instance, call the [POST /instances method](https://cloud.ibm.com/apidocs/vpc/latestcreate-instance) method, and specify the metadata_service.response_hop_limit property value between 1 (default) and 64.