Skip to content

Commit 7a403e5

Browse files
authored
Merge pull request #83509 from shdeshpa07/OADP-4878-install-section-ibmcloud
OADP 4878 Added install section for IBM Cloud
2 parents 579d02f + d75e4d8 commit 7a403e5

File tree

7 files changed

+225
-4
lines changed

7 files changed

+225
-4
lines changed

_attributes/common-attributes.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ endif::[]
265265
// IBM Cloud Bare Metal (Classic)
266266
:ibm-cloud-bm: IBM Cloud(R) Bare Metal (Classic)
267267
:ibm-cloud-bm-title: IBM Cloud Bare Metal (Classic)
268+
//IBM Cloud Object Storage (COS)
269+
:ibm-cloud-object-storage: IBM Cloud Object Storage (COS)
268270
// IBM Power
269271
:ibm-power-name: IBM Power(R)
270272
:ibm-power-title: IBM Power

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3452,6 +3452,8 @@ Topics:
34523452
File: oadp-installing-operator
34533453
- Name: Configuring OADP with AWS S3 compatible storage
34543454
File: installing-oadp-aws
3455+
- Name: Configuring OADP with IBM Cloud
3456+
File: installing-oadp-ibm-cloud
34553457
- Name: Configuring OADP with Azure
34563458
File: installing-oadp-azure
34573459
- Name: Configuring OADP with GCP

backup_and_restore/application_backup_and_restore/installing/installing-oadp-aws.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ toc::[]
1111

1212
You install the OpenShift API for Data Protection (OADP) with Amazon Web Services (AWS) S3 compatible storage by installing the OADP Operator. The Operator installs link:https://{velero-domain}/docs/v{velero-version}/[Velero {velero-version}].
1313

14-
{ibm-cloud-name} S3 is supported as an AWS S3 compatible backup storage provider.
15-
1614
include::snippets/oadp-mtc-operator.adoc[]
1715

1816
You configure AWS for Velero, create a default `Secret`, and then install the Data Protection Application. For more details, see xref:../../..//backup_and_restore/application_backup_and_restore/installing/oadp-installing-operator.adoc#oadp-installing-operator-doc[Installing the OADP Operator].
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="installing-oadp-ibm-cloud"]
3+
= Configuring the {oadp-full} with {ibm-cloud-title}
4+
include::_attributes/common-attributes.adoc[]
5+
:context: installing-oadp-ibm-cloud
6+
:installing-oadp-ibm-cloud:
7+
:credentials: cloud-credentials
8+
9+
10+
toc::[]
11+
12+
You install the {oadp-first} Operator on an {ibm-cloud-title} cluster to back up and restore applications on the cluster. You configure {ibm-cloud-object-storage} to store the backups.
13+
14+
// configuring the IBM COS instance
15+
include::modules/configuring-ibm-cos.adoc[leveloffset=+1]
16+
// include the module for creating default secret
17+
include::modules/oadp-creating-default-secret.adoc[leveloffset=+1]
18+
// include the module for creating custom secret
19+
include::modules/oadp-secrets-for-different-credentials.adoc[leveloffset=+1]
20+
// include the DPA module
21+
include::modules/oadp-installing-dpa-1-3.adoc[leveloffset=+1]
22+
// include the module for setting Velero CPU and memory resource allocations
23+
include::modules/oadp-setting-resource-limits-and-requests.adoc[leveloffset=+1]
24+
// include the node agent config module
25+
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+1]
26+
// include the module for client burst and qps config
27+
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
28+
// include the module for configuring multiple BSL
29+
include::modules/oadp-configuring-dpa-multiple-bsl.adoc[leveloffset=+1]
30+
// include the module for disabling node agent in the DPA
31+
include::modules/oadp-about-disable-node-agent-dpa.adoc[leveloffset=+1]
32+
33+
:!installing-oadp-ibm-cloud:
34+

modules/configuring-ibm-cos.adoc

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-ibm-cloud.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="configuring-ibm-cos_{context}"]
7+
= Configuring the COS instance
8+
9+
You create an {ibm-cloud-object-storage} instance to store the {oadp-short} backup data. After you create the COS instance, configure the `HMAC` service credentials.
10+
11+
.Prerequisites
12+
13+
* You have an {ibm-cloud-title} Platform account.
14+
* You installed the link:https://cloud.ibm.com/docs/cli?topic=cli-getting-started[{ibm-cloud-title} CLI].
15+
* You are logged in to {ibm-cloud-title}.
16+
17+
.Procedure
18+
19+
. Install the {ibm-cloud-object-storage} plugin by running the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ ibmcloud plugin install cos -f
24+
----
25+
26+
. Set a bucket name by running the following command:
27+
+
28+
[source,terminal]
29+
----
30+
$ BUCKET=<bucket_name>
31+
----
32+
33+
. Set a bucket region by running the following command:
34+
+
35+
[source,terminal]
36+
----
37+
$ REGION=<bucket_region> <1>
38+
----
39+
<1> Specify the bucket region, for example, `eu-gb`.
40+
41+
. Create a resource group by running the following command:
42+
+
43+
[source,terminal]
44+
----
45+
$ ibmcloud resource group-create <resource_group_name>
46+
----
47+
48+
. Set the target resource group by running the following command:
49+
+
50+
[source,terminal]
51+
----
52+
$ ibmcloud target -g <resource_group_name>
53+
----
54+
55+
. Verify that the target resource group is correctly set by running the following command:
56+
+
57+
[source,terminal]
58+
----
59+
$ ibmcloud target
60+
----
61+
+
62+
.Example output
63+
+
64+
[source,yaml]
65+
----
66+
API endpoint: https://cloud.ibm.com
67+
Region:
68+
User: test-user
69+
Account: Test Account (fb6......e95) <-> 2...122
70+
Resource group: Default
71+
----
72+
+
73+
In the example output, the resource group is set to `Default`.
74+
75+
. Set a resource group name by running the following command:
76+
+
77+
[source,terminal]
78+
----
79+
$ RESOURCE_GROUP=<resource_group> <1>
80+
----
81+
<1> Specify the resource group name, for example, `"default"`.
82+
83+
. Create an {ibm-cloud-title} `service-instance` resource by running the following command:
84+
+
85+
[source,terminal]
86+
----
87+
$ ibmcloud resource service-instance-create \
88+
<service_instance_name> \// <1>
89+
<service_name> \// <2>
90+
<service_plan> \// <3>
91+
<region_name> // <4>
92+
----
93+
<1> Specify a name for the `service-instance` resource.
94+
<2> Specify the service name. Alternatively, you can specify a service ID.
95+
<3> Specify the service plan for your {ibm-cloud-title} account.
96+
<4> Specify the region name.
97+
+
98+
.Example command
99+
+
100+
[source,terminal]
101+
----
102+
$ ibmcloud resource service-instance-create test-service-instance cloud-object-storage \ // <1>
103+
standard \
104+
global \
105+
-d premium-global-deployment // <2>
106+
----
107+
<1> The service name is `cloud-object-storage`.
108+
<2> The `-d` flag specifies the deployment name.
109+
110+
. Extract the service instance ID by running the following command:
111+
+
112+
[source,terminal]
113+
----
114+
$ SERVICE_INSTANCE_ID=$(ibmcloud resource service-instance test-service-instance --output json | jq -r '.[0].id')
115+
----
116+
117+
. Create a COS bucket by running the following command:
118+
+
119+
[source,terminal]
120+
----
121+
$ ibmcloud cos bucket-create \//
122+
--bucket $BUCKET \//
123+
--ibm-service-instance-id $SERVICE_INSTANCE_ID \//
124+
--region $REGION
125+
----
126+
+
127+
Variables such as `$BUCKET`, `$SERVICE_INSTANCE_ID`, and `$REGION` are replaced by the values you set previously.
128+
129+
. Create `HMAC` credentials by running the following command.
130+
+
131+
[source,terminal]
132+
----
133+
$ ibmcloud resource service-key-create test-key Writer --instance-name test-service-instance --parameters {\"HMAC\":true}
134+
----
135+
136+
. Extract the access key ID and the secret access key from the `HMAC` credentials and save them in the `credentials-velero` file. You can use the `credentials-velero` file to create a `secret` for the backup storage location. Run the following command:
137+
+
138+
[source,terminal]
139+
----
140+
$ cat > credentials-velero << __EOF__
141+
[default]
142+
aws_access_key_id=$(ibmcloud resource service-key test-key -o json | jq -r '.[0].credentials.cos_hmac_keys.access_key_id')
143+
aws_secret_access_key=$(ibmcloud resource service-key test-key -o json | jq -r '.[0].credentials.cos_hmac_keys.secret_access_key')
144+
__EOF__
145+
----

modules/oadp-installing-dpa-1-3.adoc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,46 @@ spec:
108108
<15> Specify the name of the `Secret` object that you created. If you do not specify this value, the default name, `{credentials}`, is used. If you specify a custom name, the custom name is used for the snapshot location. If your backup and snapshot locations use different credentials, create separate profiles in the `credentials-velero` file.
109109
endif::[]
110110

111+
ifdef::installing-oadp-ibm-cloud[]
112+
+
113+
[source,yaml,subs="attributes+"]
114+
----
115+
apiVersion: oadp.openshift.io/v1alpha1
116+
kind: DataProtectionApplication
117+
metadata:
118+
namespace: openshift-adp
119+
name: <dpa_name>
120+
spec:
121+
configuration:
122+
velero:
123+
defaultPlugins:
124+
- openshift
125+
- aws
126+
- csi
127+
backupLocations:
128+
- velero:
129+
provider: aws # <1>
130+
default: true
131+
objectStorage:
132+
bucket: <bucket_name> # <2>
133+
prefix: velero
134+
config:
135+
insecureSkipTLSVerify: 'true'
136+
profile: default
137+
region: <region_name> # <3>
138+
s3ForcePathStyle: 'true'
139+
s3Url: <s3_url> # <4>
140+
credential:
141+
key: cloud
142+
name: cloud-credentials # <5>
143+
----
144+
<1> The provider is `aws` when you use {ibm-cloud-title} as a backup storage location.
145+
<2> Specify the {ibm-cloud-object-storage} bucket name.
146+
<3> Specify the COS region name, for example, `eu-gb`.
147+
<4> Specify the S3 URL of the COS bucket. For example, `http://s3.eu-gb.cloud-object-storage.appdomain.cloud`. Here, `eu-gb` is the region name. Replace the region name according to your bucket region.
148+
<5> Defines the name of the secret you created by using the access key and the secret access key from the `HMAC` credentials.
149+
endif::[]
150+
111151
ifdef::installing-oadp-azure[]
112152
+
113153
[source,yaml,subs="attributes+"]

modules/oadp-secrets-for-different-credentials.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ spec:
7070
profile: "volumeSnapshot"
7171
----
7272
endif::[]
73-
ifdef::installing-oadp-azure,installing-oadp-gcp,installing-oadp-ocs,installing-oadp-mcg[]
73+
ifdef::installing-oadp-ibm-cloud,installing-oadp-azure,installing-oadp-gcp,installing-oadp-ocs,installing-oadp-mcg[]
7474
= Creating secrets for different credentials
7575

7676
If your backup and snapshot locations use different credentials, you must create two `Secret` objects:
@@ -196,7 +196,7 @@ spec:
196196
<1> Specify the region, following the naming convention of the documentation of your object storage server.
197197
<2> Backup location `Secret` with custom name.
198198
endif::[]
199-
ifdef::installing-oadp-ocs[]
199+
ifdef::installing-oadp-ibm-cloud,installing-oadp-ocs[]
200200
+
201201
[source,yaml,subs="attributes+"]
202202
----

0 commit comments

Comments
 (0)