Skip to content

Commit c1f6637

Browse files
authored
Update quickstart.sh to pin cldr-runner and cloudera-deploy (#129)
* Pin cldr-runner to 1.7.4 and cloudera-deploy to 1.7.0; update ANSIBLE_COLLECTIONS_PATH override to append additional paths * Convert from upstream branch to tag for cloudera_deploy version parameter Signed-off-by: Webster Mudge <[email protected]>
1 parent 17902a9 commit c1f6637

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

quickstart.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ set -e
1818

1919
IMAGE_NAME="${image_name:-ghcr.io/cloudera-labs/cldr-runner}"
2020
PROVIDER="${provider:-full}"
21-
IMAGE_VER="${image_ver:-latest}"
21+
IMAGE_VER="${image_ver:-v1.7.4}"
2222
IMAGE_NO_PULL="${no_pull:+true}"
2323
CONTAINER_NAME="${container:-cloudera-deploy}"
24+
DEPLOY_VER="${deploy_ver:-v1.7.1}"
2425

2526
IMAGE_TAG="${PROVIDER}-${IMAGE_VER}"
2627
IMAGE_FULL_NAME="${IMAGE_NAME}:${IMAGE_TAG}"
@@ -58,9 +59,9 @@ fi
5859
# If CLDR_COLLECTION_PATH is set, the default version in the container will be removed and this path added to the Ansible Collection path
5960
# The path supplied must be relative to PROJECT_DIR, e.g. ansible_dev/collections
6061
if [ -n "${CLDR_COLLECTION_PATH}" ]; then
61-
echo "Path to custom Cloudera Collection supplied as ${CLDR_COLLECTION_PATH}, adding to Ansible Collection path"
62-
ANSIBLE_COLLECTIONS_PATH="/opt/cldr-runner/collections:/runner/project/${CLDR_COLLECTION_PATH}"
63-
QUICKSTART_PROMPT='Quickstart? Run this command -- ansible-playbook project/cloudera-deploy/main.yml -e "definition_path=examples/sandbox" -t run,default_cluster'
62+
echo "Path to custom Cloudera Collection supplied as ${CLDR_COLLECTION_PATH}, appending to Ansible Collection path"
63+
ANSIBLE_COLLECTIONS_PATH="/runner/project/${CLDR_COLLECTION_PATH}:/opt/cldr-runner/collections"
64+
QUICKSTART_PROMPT='Quickstart? Run this command -- ansible-playbook /opt/cloudera-deploy/main.yml -e "definition_path=examples/sandbox" -t run,default_cluster'
6465
else
6566
echo "Custom Cloudera Collection path not found"
6667
ANSIBLE_COLLECTIONS_PATH="/opt/cldr-runner/collections"
@@ -138,11 +139,11 @@ if [ ! "$(docker ps -q -f name=${CONTAINER_NAME})" ]; then
138139
/usr/bin/env bash
139140

140141
echo "Installing the cloudera-deploy project to the execution container '${CONTAINER_NAME}'"
141-
docker exec -td "${CONTAINER_NAME}" /usr/bin/env git clone https://github.com/cloudera-labs/cloudera-deploy.git /opt/cloudera-deploy --depth 1
142+
docker exec -td "${CONTAINER_NAME}" /usr/bin/env git clone https://github.com/cloudera-labs/cloudera-deploy.git /opt/cloudera-deploy -b "${DEPLOY_VER}" --depth 1
142143

143-
if [ -n "${CLDR_COLLECTION_PATH}" ]; then
144-
docker exec -td "${CONTAINER_NAME}" /usr/bin/env rm -rf /opt/cldr-runner/collections/ansible_collections/cloudera
145-
fi
144+
# if [ -n "${CLDR_COLLECTION_PATH}" ]; then
145+
# docker exec -td "${CONTAINER_NAME}" /usr/bin/env rm -rf /opt/cldr-runner/collections/ansible_collections/cloudera
146+
# fi
146147
if [ -n "${CLDR_PYTHON_PATH}" ]; then
147148
docker exec -td "${CONTAINER_NAME}" pip uninstall -y cdpy
148149
fi

0 commit comments

Comments
 (0)