Created
November 27, 2013 15:14
-
-
Save technmsg/7677330 to your computer and use it in GitHub Desktop.
Old snippet to re-apply a Cloudera Manager license key using the CM API, useful if CM needs to be rebuilt on a new host. Version unknown, use at your own risk.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Copyright 2013 Cloudera Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# Cloudera Manager hostname, username, and password. | |
CM_HOST="cloudera-manager.domain.tld" | |
CM_USER="admin" | |
CM_PASS="admin" | |
JSON='{ "managerSettings" : { "items" : [ { "name" : "KEYSTORE_PASSWORD", "value" : "keystorepw" }, { "name" : "KEYSTORE_PATH", "value" : "/path/to/tls/keystore/file" }, { "name" : "WEB_TLS", "value" : "true" } ] } }' | |
curl -X POST \ | |
-H "Content-Type:application/json" \ | |
-u ${CM_USER}:${CM_PASS} \ | |
-d \'${JSON}\' \ | |
"http://${CM_HOST}:7180/api/v2/cm/deployment" | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment