Upgrading Marketplace from Version 4.0 and Earlier
The upgrade process can take approximately 1 hour per 50 000 service plans. If you want to determine the number of service plans in the Marketplace, complete the following steps:
- Connect to the management node using SSH.
-
Issue the following command:
curl -D- -k -E /usr/local/pem/APS/certificates/poa.pem "https://127.0.0.1:6308/aps/2/resources/?implementing(http://www.parallels.com/marketplace/display-plan/1),limit(0,0)"
-
Check the number of service plans in the Content-Range response header. In the following example, there are 18 service plans (Content-Range: items */18):
HTTP/1.1 200 OK Expires: Mon, 01 Jan 2001 00:00:01 GMT Connection: keep-alive Cache-Control: no-cache, no-store X-APSBooster-Response: true Content-Range: items */18 Content-Type: application/json Content-Length: 2 Date: Mon, 25 May 2020 09:51:53 GMT
If you have a large number of service plans, you can speed up the upgrade by completing the following steps before the upgrade:
- Connect to the management node using SSH.
- Upload this script to the node.
-
Issue the following command:
python update_base_metadata_resources.py
To upgrade Marketplace to version 4.1, complete these steps:
- Determine the version of UX1 Marketplace that you need to install. It is stated in the Release Notes. Note that for illustration purposes, all commands in this procedure use the version 4.1.0-1525.
- Connect to the management node as root using SSH.
-
Switch to the superuser.
sudo su
-
Make sure that the required Helm chart is in the repository.
helm repo update helm search a8n/ux1-marketplace --version 4.1.0-1525
-
Upgrade the microservice by using Helm.
helm upgrade ux1-marketplace a8n/ux1-marketplace --version 4.1.0-1525 --recreate-pods --wait
-
Log in to Provider Panel > Applications > System Applications.
-
Open the UX1 Marketplace application and check that the correct version (4.1.0-1525) is installed.
-
Determine the ID of the application and copy it to the clipboard.
curl -D- -k -E /usr/local/pem/APS/certificates/poa.pem "https://127.0.0.1:6308/aps/2/resources/?implementing(http://www.parallels.com/marketplace/1)" | grep -Po '"id":.*?[^\\]"'
-
Invoke the following method through the API.
curl -D- -k -E /usr/local/pem/APS/certificates/poa.pem "https://127.0.0.1:6308/aps/2/resources/<copied_id>/updateIndex" -X POST
To ensure that Customer Marketplace can operate correctly, grant the necessary privileges to customers' account administrators:
- Application UX1 Marketplace: Place Order
- Application UX1 Marketplace: Browse Catalog
- Application UX1 Marketplace: Restrict Cart Sharing With Reseller
To do this, follow these steps:
- Connect to the management node using SSH.
- Upload this script to the node.
-
Issue the following commands.
python update-privilege.py --role-level L1 --role-type clients --role-name "Account Administrator" python update-privilege.py --role-level L2 --role-type clients --role-name "Account Administrator"