Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Remote Parcel Repository URLs" is always initialized

avatar
Explorer

Hi

 

We use Cloudera in the environment without internet access

 

These URLs added on Parcel Repository & Network Settings :

Someone know how to remove these URLs using the CM API ?

 

Best Regards,

 

 

1 ACCEPTED SOLUTION

avatar
Explorer

Hello @akhilsnaik ,

 

I understand where the problem comes from.
Automatically Install CSD Repo URLs is by default set to true,
If set to true, Cloudera Manager will automatically scan CSDs and add these URLs to the list of parcel repo URLs on every startup of Cloudera Manager.


As i want only custom URLs to be present in the list. i set the value to false.

 

curl -X PUT "https://local:7183/api/v45/cm/config?message=no%20csd%20repo" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"items\": [    {      \"name\": \"PARCEL_INSTALL_CSD_REPO_URLS\",      \"value\": \"false\",      \"sensitive\": false    }  ]}"


 Now after restarting cloudera manager only my local repository which was initialized

 

regards,

View solution in original post

5 REPLIES 5

avatar

Hello @abdebja ,

 

yes its possible to remove the Default remote parcel urls via API (i assume you dont want to do the UI way which is simple and Easy )

 

First fetch the Configs of cloudera Manager via GET command 

 

curl -X GET "http://akhil01.novalocal:7180/api/v49/cm/config?view=summary" -H "accept: application/json"

 

The response will have the REMOTE_PARCEL_REPO_URLS which we need to find out and correct and do a same PUT command which will update the urls . 

 

for ex : 

do a GET 

 

curl -X GET "http://akhil01.novalocal:7180/api/v49/cm/config?view=summary" -H "accept: application/json"


{
  "items": [
    
    {
      "name": "PROXYUSER_KNOX_HOSTS",
      "value": "*",
      "sensitive": false
    },
    {
      "name": "PROXYUSER_KNOX_USERS",
      "value": "*",
      "sensitive": false
    },
    {
      "name": "REMOTE_PARCEL_REPO_URLS",
      "value": "https://archive.cloudera.com/p/cdh7/7.1.8.0/parcels,http://cloudera-build-4-us-west-1.vpc.cloudera.com/s3/build/11800998/cfm/2.x/redhat7/yum/tars/parcel,https://archive.cloudera.com/p/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/p/cdh5/parcels/latest,https://archive.cloudera.com/kafka/parcels/latest/,https://archive.cloudera.com/p/cdsw1/1.10.0/parcels/,https://archive.cloudera.com/p/cfm2/2.1.4.1000/redhat7/yum/tars/parcel,https://archive.cloudera.com/p/spark3/3.3.7180.0/parcels/,http://cloudera-build-us-west-1.vpc.cloudera.com/s3/build/32427494/cdh/7.x/parcels/",
      "sensitive": false
    }
  ]
}

 

Now do a PUT 

 

curl -X PUT "http://akhil01.novalocal:7180/api/v49/cm/config?message=Test" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"items\": [ { \"name\": \"REMOTE_PARCEL_REPO_URLS\", \"value\": \"https://archive.cloudera.com/p/cdh7/7.1.8.0/parcels,https://archive.cloudera.com/p/cdsw1/1.10.0/parcels/,https://archive.cloudera.com/p/cfm2/2.1.4.1000/redhat7/yum/tars/parcel,https://archive.cloudera.com/p/spark3/3.3.7180.0/parcels/,http://cloudera-build-us-west-1.vpc.cloudera.com/s3/build/32427494/cdh/7.x/parcels/\", \"sensitive\": false } ]}"

 

 

You can Make use of API explorer in CM which can be accessed via : http://CM-Server:port/static/apidocs/ui/index.html#/ClouderaManagerResource/updateConfig

or

https://archive.cloudera.com/cm-public/7.3.0-9851987/generic/jar/cm_api/apidocs/ui/index.html#/Cloud...

 

to get the Exact API and more details as needed. 

avatar
Explorer

Hello @akhilsnaik ,

 

Thank you for the proposed solution, it works, however, when restarting the cloudera manager the URLs come back in Parcel Repository & Network Settings. so as if nothing has changed

avatar

Hello @abdebja ,

 

that is strange. may i please know if you are deleting all the repos or are you keeping local repo url intact in this setting. 

if possible please provide your Put curl masking the cm-server, u/p and secret details so that I can reproduce the same 

avatar
Explorer

Hello @akhilsnaik ,

 

I understand where the problem comes from.
Automatically Install CSD Repo URLs is by default set to true,
If set to true, Cloudera Manager will automatically scan CSDs and add these URLs to the list of parcel repo URLs on every startup of Cloudera Manager.


As i want only custom URLs to be present in the list. i set the value to false.

 

curl -X PUT "https://local:7183/api/v45/cm/config?message=no%20csd%20repo" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"items\": [    {      \"name\": \"PARCEL_INSTALL_CSD_REPO_URLS\",      \"value\": \"false\",      \"sensitive\": false    }  ]}"


 Now after restarting cloudera manager only my local repository which was initialized

 

regards,

avatar

@abdebja   , Great in that case let me know if we are good to Close the Thread , Please accept your last comment as Accept as Solution.