|
| 1 | ++++ |
| 2 | +title = "Move MII/JRF domains to PV" |
| 3 | +date = 2020-03-11T16:45:16-05:00 |
| 4 | +weight = 60 |
| 5 | +pre = "<b> </b>" |
| 6 | +description = "Moving an MII/JRF domain to a persistent volume." |
| 7 | ++++ |
| 8 | + |
| 9 | + |
| 10 | +FMW/JRF domains using the Model in Image domain home source type has been deprecated since WebLogic Kubernetes Operator 4.1. We recommend moving your domain home to Domain on Persistent Volume (Domain on PV). For more information, see [Domain On Persistent Volume]({{< relref "/managing-domains/domain-on-pv/overview.md" >}}). |
| 11 | + |
| 12 | +If you cannot move the domain to a persistent volume right now, you can use the following procedure. |
| 13 | + |
| 14 | +1. Back up the OPSS wallet and save it in a secret if you have not already done it. |
| 15 | + |
| 16 | + The operator provides a helper script, the [OPSS wallet utility](https://orahub.oci.oraclecorp.com/weblogic-cloud/weblogic-kubernetes-operator/-/blob/main/kubernetes/samples/scripts/domain-lifecycle/opss-wallet.sh), for extracting the wallet file and storing it in a Kubernetes `walletFileSecret`. In addition, you should save the wallet file in a safely backed-up location, outside of Kubernetes. For example, the following command saves the OPSS wallet for the `sample-domain1` domain in the `sample-ns` namespace to a file named `ewallet.p12` in the `/tmp` directory and also stores it in the wallet secret named `sample-domain1-opss-walletfile-secret`. |
| 17 | + |
| 18 | + ``` |
| 19 | + $ opss-wallet.sh -n sample-ns -d sample-domain1 -s -r -wf /tmp/ewallet.p12 -ws sample-domain1-opss-walletfile-secret |
| 20 | + ``` |
| 21 | + |
| 22 | +2. Follow the steps in [Upgrade managed domains]({{< relref "/managing-domains/major-weblogic-version-upgrade/_index.md" >}}). |
| 23 | +3. If you are using an auxiliary image in your MII/JRF domain, then it will be used as a domain creation image. If you are _not_ using an auxiliary image in your MII/JRF domain, then create a [Domain creation image]({{< relref "/managing-domains/domain-on-pv/domain-creation-images.md" >}}). |
| 24 | +4. You can delete the old domain resource YAML file by using this command: `$ kubectl delete -f <original domain resource YAML>`. |
| 25 | +5. Then, create a new domain resource YAML file. You should have at least the following changes: |
| 26 | + |
| 27 | + |
| 28 | + ``` |
| 29 | + # Change type to PersistentVolume |
| 30 | + domainHomeSourceType: PersistentVolume |
| 31 | + image: <Fusion Middleware Infrastructure base image> |
| 32 | + ... |
| 33 | + serverPod: |
| 34 | + ... |
| 35 | + # specify the volume and volume mount information |
| 36 | +
|
| 37 | + volumes: |
| 38 | + - name: weblogic-domain-storage-volume |
| 39 | + persistentVolumeClaim: |
| 40 | + claimName: sample-domain1-pvc-rwm1 |
| 41 | + volumeMounts: |
| 42 | + - mountPath: /share |
| 43 | + name: weblogic-domain-storage-volume |
| 44 | +
|
| 45 | + # specify a new configuration section, remove the old configuration section. |
| 46 | +
|
| 47 | + configuration: |
| 48 | +
|
| 49 | + # secrets that are referenced by model yaml macros |
| 50 | + # sample-domain1-rcu-access is used for JRF domains |
| 51 | + secrets: [ sample-domain1-rcu-access ] |
| 52 | +
|
| 53 | + initializeDomainOnPV: |
| 54 | + persistentVolumeClaim: |
| 55 | + metadata: |
| 56 | + name: sample-domain1-pvc-rwm1 |
| 57 | + spec: |
| 58 | + storageClassName: my-storage-class |
| 59 | + resources: |
| 60 | + requests: |
| 61 | + storage: 10Gi |
| 62 | + domain: |
| 63 | + createIfNotExists: Domain |
| 64 | + domainCreationImages: |
| 65 | + - image: 'myaux:v6' |
| 66 | + domainType: JRF |
| 67 | + domainCreationConfigMap: sample-domain1-wdt-config-map |
| 68 | + opss: |
| 69 | + # Make sure you have already saved the wallet file secret. This allows the domain to use |
| 70 | + # an existing JRF database schemas. |
| 71 | + walletFileSecret: sample-domain1-opss-walletfile-secret |
| 72 | + walletPasswordSecret: sample-domain1-opss-wallet-password-secret |
| 73 | + ``` |
| 74 | + |
| 75 | +6. Deploy the domain. If it is successful, then the domain has been migrated to a persistent volume. |
0 commit comments