]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-deploy: install and configure chacractl
authorAndrew Schoen <aschoen@redhat.com>
Thu, 5 Nov 2015 17:13:28 +0000 (11:13 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 5 Nov 2015 21:49:05 +0000 (15:49 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-deploy/build/setup

index 7322160e500e3e6cbc7f0e22d1625cf6f7a47669..2947ff4ebed75647852652ee736e8e78a6ba6842 100644 (file)
@@ -16,3 +16,25 @@ rpm_deps="python-devel python-virtualenv python-mock python-tox pytest"
 if test -f /etc/redhat-release ; then
     sudo yum install -y $rpm_deps
 fi
+
+# Create the virtualenv
+virtualenv $WORKSPACE/venv
+source $WORKSPACE/venv/bin/activate
+
+# Define and ensure the PIP cache
+PIP_SDIST_INDEX="$HOME/.cache/pip"
+mkdir -p $PIP_SDIST_INDEX
+
+# Install the package by trying with the cache first, otherwise doing a download only, and then
+# trying to install from the cache again.
+if ! pip install --find-links="file://$PIP_SDIST_INDEX" --no-index chacractl; then
+    pip install --exists-action=i --download-directory="$PIP_SDIST_INDEX" chacractl
+    pip install --find-links="file://$PIP_SDIST_INDEX" --no-index chacractl
+fi
+
+# create the .chacractl config file
+cat > $HOME/.chacractl << EOF
+url = "$CHACRACTL_URL"
+user = "$CHACRACTL_USER"
+key = "$CHACRACTL_KEY"
+EOF