Skip to content

Instantly share code, notes, and snippets.

@seanorama
Created February 19, 2015 21:58
Show Gist options
  • Save seanorama/07c822ffef430c43a486 to your computer and use it in GitHub Desktop.
Save seanorama/07c822ffef430c43a486 to your computer and use it in GitHub Desktop.
ambari-custom-repo
## Setting a custom repo for Ambari Stacks via the API
cat > temp-update-repo.json <<-EOF
{
"Repositories" : {
"base_url" : "http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0",
"default_base_url" : "http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0",
"verify_base_url" : true
}
}
EOF
curl -su admin:admin -H x-requested-by:Ambari http://${ambari_server}:8080/api/v1/stacks/HDP/versions/2.2/operating_systems/redhat6/repositories/HDP-2.2 -T temp-update-repo.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment