From: Kefu Chai Date: Thu, 1 Oct 2020 11:46:24 +0000 (+0800) Subject: ceph-deploy-build: inject chacractl credentials X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1672%2Fhead;p=ceph-build.git ceph-deploy-build: inject chacractl credentials otherwise we would have requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://chacra.ceph.com/binaries/ceph-deploy/test/c6ff0a05523cdeda86ebac732dd186620261dc01/centos/7/source/ when posting the created package to chacra Signed-off-by: Kefu Chai --- diff --git a/ceph-deploy-build/build/setup b/ceph-deploy-build/build/setup index 7a0baed3..a1fa6a8c 100644 --- a/ceph-deploy-build/build/setup +++ b/ceph-deploy-build/build/setup @@ -24,5 +24,7 @@ fi pkgs=( "chacractl>=0.0.21" ) install_python_packages "pkgs[@]" +# ask shaman which chacra instance to use +chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/` # create the .chacractl config file using global variables -make_chacractl_config +make_chacractl_config $chacra_url diff --git a/ceph-deploy-build/config/definitions/ceph-deploy-build.yml b/ceph-deploy-build/config/definitions/ceph-deploy-build.yml index 6ff60a69..f071007f 100644 --- a/ceph-deploy-build/config/definitions/ceph-deploy-build.yml +++ b/ceph-deploy-build/config/definitions/ceph-deploy-build.yml @@ -45,3 +45,10 @@ - inject-passwords: global: true mask-password-params: true + - credentials-binding: + - text: + credential-id: chacractl-key + variable: CHACRACTL_KEY + - text: + credential-id: shaman-api-key + variable: SHAMAN_API_KEY