Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ include::_attributes/common-attributes.adoc[]
toc::[]

[role="_abstract"]
With Red{nbsp}Hat 3scale API Management, you can manage your APIs for internal or external users.
Manage your APIs for internal or external users by using Red{nbsp}Hat 3scale API Management.

You can deploy 3scale components on-premise, in the cloud, as a managed service, or in any combination based on your requirements.

With {oadp-first}, you can safeguard 3scale API Management deployments by backing up application resources, persistent volumes, and configurations.
Expand All @@ -20,6 +21,7 @@ You can use the {oadp-first} Operator to back up and restore your 3scale API Man
You can configure OADP to perform the following operations with 3scale API Management:

* Create a backup of 3scale components by following the steps in xref:../../../backup_and_restore/application_backup_and_restore/oadp-3scale/backing-up-3scale-api-management-by-using-oadp.adoc#backing-up-3scale-api-management-by-using-oadp[Backing up 3scale API Management].

* Restore the components to scale up the 3scale operator and deployment by following the steps in xref:../../../backup_and_restore/application_backup_and_restore/oadp-3scale/restoring-3scale-api-management-by-using-oadp.adoc#restoring-3scale-api-management-by-using-oadp[Restoring 3scale API Management].


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,11 @@ include::_attributes/common-attributes.adoc[]

toc::[]

You can restore Red{nbsp}Hat 3scale API Management components by restoring the backed up 3scale operator resources. You can also restore databases such as MySQL and Redis.
[role="_abstract"]
Restore Red{nbsp}Hat 3scale API Management components by restoring the backed up 3scale operator resources. You can also restore databases such as MySQL and Redis.

After the data has been restored, you can scale up the 3scale operator and deployment.

.Prerequisites

* You installed and configured Red{nbsp}Hat 3scale API Management. For more information, see link:{Link3scaleInstalling3scale}#install-threescale-on-openshift-guide[Installing 3scale API Management on OpenShift] and link:https://docs.redhat.com/en/documentation/red_hat_3scale_api_management[Red Hat 3scale API Management].

* You backed up the 3scale operator, and databases such as MySQL and Redis.

* Ensure that you are restoring 3scale on the same cluster where it was backed up from.

* If you want to restore 3scale on a different cluster, ensure that the original backed-up cluster and the cluster you want to restore the operator on are using the same custom domain.

include::modules/restoring-the-3scale-api-management-operator-secrets-and-apimanager.adoc[leveloffset=+1]

include::modules/restoring-the-mysql-database.adoc[leveloffset=+1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[id="restoring-the-3scale-api-management-operator-secrets-and-apimanager_{context}"]
= Restoring the 3scale API Management operator, secrets, and APIManager

You can restore the Red{nbsp}Hat 3scale API Management operator resources, and both the `Secret` and APIManager custom resources (CRs) by using the following procedure.
[role="_abstract"]
Restore the Red{nbsp}Hat 3scale API Management operator resources, and both the `Secret` and APIManager custom resources (CRs).

.Prerequisites

Expand All @@ -25,17 +26,14 @@ If you are restoring the operator to a different cluster that you backed up from
$ oc delete project threescale
----
+
.Example output
+
[source,terminal]
----
"threescale" project deleted successfully
----

. Create a YAML file with the following configuration to restore the 3scale operator:
+
.Example `restore.yaml` file
+

[source,yaml]
----
apiVersion: velero.io/v1
Expand All @@ -44,7 +42,7 @@ metadata:
name: operator-installation-restore
namespace: openshift-adp
spec:
backupName: operator-install-backup <1>
backupName: operator-install-backup
excludedResources:
- nodes
- events
Expand All @@ -57,7 +55,10 @@ spec:
- backuprepositories.velero.io
itemOperationTimeout: 4h0m0s
----
<1> Restoring the 3scale operator's backup
+
where:

`operator-install-backup`:: Specifies the name of the backup to restore the 3scale operator.

. Restore the 3scale operator by running the following command:
+
Expand All @@ -66,8 +67,7 @@ spec:
$ oc create -f restore.yaml
----
+
.Example output
+

[source,terminal]
----
restore.velerio.io/operator-installation-restore created
Expand All @@ -85,17 +85,20 @@ metadata:
name: s3-credentials
namespace: threescale
stringData:
AWS_ACCESS_KEY_ID: <ID_123456> <1>
AWS_SECRET_ACCESS_KEY: <ID_98765544> <2>
AWS_BUCKET: <mybucket.example.com> <3>
AWS_REGION: <us-east-1> <4>
AWS_ACCESS_KEY_ID: <ID_123456>
AWS_SECRET_ACCESS_KEY: <ID_98765544>
AWS_BUCKET: <mybucket.example.com>
AWS_REGION: <us-east-1>
type: Opaque
EOF
----
<1> Replace <ID_123456> with your AWS credentials ID.
<2> Replace <ID_98765544> with your AWS credentials KEY.
<3> Replace <mybucket.example.com> with your target bucket name.
<4> Replace <us-east-1> with the AWS region of your bucket.
+
where:

`<AWS_ACCESS_KEY_ID>`:: Specifies your AWS credentials ID.
`<AWS_SECRET_ACCESS_KEY>`:: Specifies your AWS credentials KEY.
`<mybucket.example.com>`:: Specifies your target bucket name.
`<us-east-1>`:: Specifies the AWS region of your bucket.

. Scale down the 3scale operator by running the following command:
+
Expand All @@ -104,17 +107,13 @@ EOF
$ oc scale deployment threescale-operator-controller-manager-v2 --replicas=0 -n threescale
----
+
.Example output
+
[source,terminal]
----
deployment.apps/threescale-operator-controller-manager-v2 scaled
----

. Create a YAML file with the following configuration to restore the `Secret`:
+
.Example `restore-secret.yaml` file
+
[source,yaml]
----
apiVersion: velero.io/v1
Expand All @@ -123,7 +122,7 @@ metadata:
name: operator-resources-secrets
namespace: openshift-adp
spec:
backupName: operator-resources-secrets <1>
backupName: operator-resources-secrets
excludedResources:
- nodes
- events
Expand All @@ -136,7 +135,10 @@ spec:
- backuprepositories.velero.io
itemOperationTimeout: 4h0m0s
----
<1> Restoring the `Secret` backup.
+
where:

`operator-resources-secrets`:: Specifies the name of the backup to restore the `Secret`.

. Restore the `Secret` by running the following command:
+
Expand All @@ -145,8 +147,6 @@ spec:
$ oc create -f restore-secrets.yaml
----
+
.Example output
+
[source,terminal]
----
restore.velerio.io/operator-resources-secrets created
Expand All @@ -163,8 +163,8 @@ metadata:
name: operator-resources-apim
namespace: openshift-adp
spec:
backupName: operator-resources-apim <1>
excludedResources: <2>
backupName: operator-resources-apim
excludedResources:
- nodes
- events
- events.events.k8s.io
Expand All @@ -176,8 +176,11 @@ spec:
- backuprepositories.velero.io
itemOperationTimeout: 4h0m0s
----
<1> Restoring the APIManager backup.
<2> The resources that you do not want to restore.
+
where:

`operator-resources-apim`:: Specifies the name of the backup to restore the APIManager.
`excludedResources`:: Specifies the resources that you do not want to restore.

. Restore the APIManager by running the following command:
+
Expand All @@ -186,8 +189,6 @@ spec:
$ oc create -f restore-apimanager.yaml
----
+
.Example output
+
[source,terminal]
----
restore.velerio.io/operator-resources-apim created
Expand All @@ -200,8 +201,6 @@ restore.velerio.io/operator-resources-apim created
$ oc scale deployment threescale-operator-controller-manager-v2 --replicas=1 -n threescale
----
+
.Example output
+
[source,terminal]
----
deployment.apps/threescale-operator-controller-manager-v2 scaled
Expand Down
16 changes: 8 additions & 8 deletions modules/restoring-the-backend-redis-database.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
[id="restoring-the-backend-redis-database_{context}"]
= Restoring the back-end Redis database

You can restore the back-end Redis database by deleting the deployment and specifying which resources you do not want to restore.
[role="_abstract"]
Restore the back-end Redis database by creating a `Restore` custom resource (CR) that excludes non-essential cluster resources. This helps you to recover the Redis data store as part of the Red{nbsp}Hat 3scale API Management restoration process.

.Prerequisites

Expand All @@ -21,8 +22,6 @@ You can restore the back-end Redis database by deleting the deployment and speci
$ oc delete deployment backend-redis -n threescale
----
+
.Example output
+
[source,terminal]
----
Warning: apps.openshift.io/v1 deployment is deprecated in v4.14+, unavailable in v4.10000+
Expand All @@ -41,7 +40,7 @@ metadata:
name: restore-backend
namespace: openshift-adp
spec:
backupName: redis-backup <1>
backupName: redis-backup
excludedResources:
- nodes
- events
Expand All @@ -55,7 +54,10 @@ spec:
itemOperationTimeout: 1h0m0s
restorePVs: true
----
<1> Restoring the Redis backup.
+
where:

`redis-backup`:: Specifies the name of the Redis backup to restore.

. Restore the Redis database by running the following command:
+
Expand All @@ -64,8 +66,6 @@ spec:
$ oc create -f restore-backend.yaml
----
+
.Example output
+
[source,terminal]
----
restore.velerio.io/restore-backend created
Expand All @@ -79,7 +79,7 @@ restore.velerio.io/restore-backend created
----
$ oc get podvolumerestores.velero.io -n openshift-adp
----
.Example output:

+
[source,terminal]
----
Expand Down
20 changes: 9 additions & 11 deletions modules/restoring-the-mysql-database.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
[id="restoring-the-mysql-database_{context}"]
= Restoring a MySQL database

Restoring a MySQL database re-creates the following resources:

* The `Pod`, `ReplicationController`, and `Deployment` objects.
* The additional persistent volumes (PVs) and associated persistent volume claims (PVCs).
* The MySQL dump, which the `example-claim` PVC contains.
[role="_abstract"]
Restore a MySQL database by scaling down Red{nbsp}Hat 3scale API Management components and creating a Velero `Restore` custom resource (CR) to re-create the `Pod`, `ReplicationController`, `Deployment`, persistent volumes (PVs), and persistent volume claims (PVCs). This helps you to recover your 3scale MySQL data and configuration after a backup.

[WARNING]
====
Expand Down Expand Up @@ -102,7 +99,7 @@ metadata:
name: restore-mysql
namespace: openshift-adp
spec:
backupName: mysql-backup <1>
backupName: mysql-backup
excludedResources:
- nodes
- events
Expand All @@ -126,16 +123,19 @@ spec:

mysql -h 127.0.0.1 -D system -u root
--password=$MYSQL_ROOT_PASSWORD <
/var/lib/mysqldump/data/dump.sql <2>
/var/lib/mysqldump/data/dump.sql
container: system-mysql
execTimeout: 80s
onError: Fail
waitTimeout: 5m
itemOperationTimeout: 1h0m0s
restorePVs: true
----
<1> Restoring the MySQL backup.
<2> A path where the data is restored from.
+
where:

`mysql-backup`:: Specifies the name of the MySQL backup to restore.
`/var/lib/mysqldump/data/dump.sql`:: Specifies the path where the data is restored from.

. Restore the MySQL database by running the following command:
+
Expand All @@ -144,8 +144,6 @@ spec:
$ oc create -f restore-mysql.yaml
----
+
.Example output
+
[source,terminal]
----
restore.velerio.io/restore-mysql created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
[id="scaling-up-the-3scale-api-management-operator-and-deployment_{context}"]
= Scaling up the 3scale API Management operator and deployment

You can scale up the Red{nbsp}Hat 3scale API Management operator and any deployment that was manually scaled down. After a few minutes, 3scale installation should be fully functional, and its state should match the backed-up state.
[role="_abstract"]
Scale up the Red{nbsp}Hat 3scale API Management operator and any deployment that was manually scaled down. After a few minutes, 3scale installation should be fully functional, and its state should match the backed-up state.

.Prerequisites

Expand Down