Skip to content

Commit

Permalink
DEVX-2683: Update language on running ccloud-stack (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybyzek authored Oct 21, 2021
1 parent 0f6f61b commit 7363e54
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 26 deletions.
10 changes: 5 additions & 5 deletions ccloud-observability/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ source ../utils/ccloud_library.sh
check_jq \
&& print_pass "jq found"

[[ -z "$AUTO" ]] && {
printf "\n====== Confirm\n\n"
ccloud::prompt_continue_ccloud_demo || exit 1
}

ccloud::validate_version_ccloud_cli $CCLOUD_MIN_VERSION \
&& print_pass "ccloud version ok"

Expand All @@ -22,11 +27,6 @@ ccloud::validate_logged_in_ccloud_cli \

print_pass "Prerequisite check pass"

[[ -z "$AUTO" ]] && {
printf "\n====== Confirm\n\n"
ccloud::prompt_continue_ccloud_demo || exit 1
}

printf "\n====== Starting\n\n"

printf "\n====== Creating new Confluent Cloud stack using the ccloud::create_ccloud_stack function\nSee: %s for details\n" "https://github.com/confluentinc/examples/blob/$CONFLUENT_RELEASE_TAG_OR_BRANCH/utils/ccloud_library.sh"
Expand Down
2 changes: 1 addition & 1 deletion ccloud/beginner-cloud/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
source ../../utils/helper.sh
source ../../utils/ccloud_library.sh

ccloud::prompt_continue_ccloud_demo || exit 1
ccloud::validate_version_ccloud_cli $CCLOUD_MIN_VERSION || exit 1
ccloud::validate_logged_in_ccloud_cli || exit 1
ccloud::prompt_continue_ccloud_demo || exit 1
check_timeout || exit 1
check_mvn || exit 1
check_jq || exit 1
Expand Down
4 changes: 2 additions & 2 deletions ccloud/ccloud-stack/ccloud_stack_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
source ../../utils/helper.sh
source ../../utils/ccloud_library.sh

ccloud::prompt_continue_ccloud_demo || exit 1

ccloud::validate_version_ccloud_cli $CCLOUD_MIN_VERSION || exit 1
check_jq || exit 1
ccloud::validate_logged_in_ccloud_cli || exit 1

ccloud::prompt_continue_ccloud_demo || exit 1

enable_ksqldb=false
read -p "Do you also want to create a Confluent Cloud ksqlDB app (hourly charges may apply)? [y/n] " -n 1 -r
echo
Expand Down
3 changes: 2 additions & 1 deletion cloud-etl/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ NAME=`basename "$0"`
source ../utils/helper.sh
source ../utils/ccloud_library.sh

ccloud::prompt_continue_ccloud_demo || exit 1

ccloud::validate_version_ccloud_cli $CCLOUD_MIN_VERSION \
&& print_pass "ccloud version ok" \
|| exit 1
Expand All @@ -33,7 +35,6 @@ export EXAMPLE="cloud-etl"

echo
echo ====== Create new Confluent Cloud stack
ccloud::prompt_continue_ccloud_demo || exit 1
ccloud::create_ccloud_stack true
SERVICE_ACCOUNT_ID=$(ccloud kafka cluster list -o json | jq -r '.[0].name' | awk -F'-' '{print $4;}')
if [[ "$SERVICE_ACCOUNT_ID" == "" ]]; then
Expand Down
16 changes: 8 additions & 8 deletions cp-quickstart/start-cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ source ../utils/ccloud_library.sh
check_jq \
&& print_pass "jq found"

ccloud::validate_version_ccloud_cli $CCLOUD_MIN_VERSION \
&& print_pass "ccloud version ok"

ccloud::validate_logged_in_ccloud_cli \
&& print_pass "logged into ccloud CLI"

print_pass "Prerequisite check pass"

[[ -z "$AUTO" ]] && {
printf "\n====== Confirm\n\n"
ccloud::prompt_continue_ccloud_demo || exit 1
Expand All @@ -35,6 +27,14 @@ print_pass "Prerequisite check pass"
printf "\n"
}

ccloud::validate_version_ccloud_cli $CCLOUD_MIN_VERSION \
&& print_pass "ccloud version ok"

ccloud::validate_logged_in_ccloud_cli \
&& print_pass "logged into ccloud CLI"

print_pass "Prerequisite check pass"

printf "\nFor your reference the demo will highlight some commands in "; print_code "code format"

printf "\n====== Starting\n\n"
Expand Down
3 changes: 2 additions & 1 deletion microservices-orders/start-ccloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ source ../utils/helper.sh

MAX_WAIT=${MAX_WAIT:-60}

[[ -z "$NO_PROMPT" ]] && ccloud::prompt_continue_ccloud_demo

ccloud::validate_version_ccloud_cli $CCLOUD_MIN_VERSION \
&& print_pass "ccloud version ok"

ccloud::validate_logged_in_ccloud_cli \
&& print_pass "logged into ccloud CLI"

printf "\n====== Create new Confluent Cloud stack\n"
[[ -z "$NO_PROMPT" ]] && ccloud::prompt_continue_ccloud_demo
export EXAMPLE="microservices-orders"
ccloud::create_ccloud_stack true

Expand Down
19 changes: 11 additions & 8 deletions utils/ccloud_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ CCLOUD_MIN_VERSION=${CCLOUD_MIN_VERSION:-1.25.0}

function ccloud::prompt_continue_ccloud_demo() {
echo
echo "-------------------------------------------------------------------------------------------"
echo "Any Confluent Cloud example uses real Confluent Cloud resources that may be billable,"
echo "including connectors and ksqlDB applications that may have hourly charges."
echo "--------------------------------------------------------------------------------------------"
echo "This example runs on Confluent Cloud, sign up here:"
echo
echo "At the end of this script, it will show a command to destroy all Confluent Cloud resources."
echo "When you're done with the example, run the command and verify resources have been removed."
echo " https://www.confluent.io/confluent-cloud/tryfree/"
echo
echo "Use Confluent Cloud promo code C50INTEG to receive \$50 free usage, which should"
echo "sufficiently cover one day of running this example, beyond which you may be billed"
echo "The example uses real Confluent Cloud resources that may be billable, including connectors"
echo "and ksqlDB applications that may have hourly charges. The end of this script shows a command"
echo "you can run to destroy all the cloud resources, and you should verify they are destroyed."
echo
echo "New Confluent Cloud signups receive \$400 to spend within Confluent Cloud during their first"
echo "60 days. Use Confluent Cloud promo code C50INTEG to receive an additional \$50 free usage."
echo "This will sufficiently cover one day of running this example, beyond which you may be billed"
echo "for the Confluent Cloud resources until you destroy them."
echo "-------------------------------------------------------------------------------------------"
echo "--------------------------------------------------------------------------------------------"
echo

read -p "Do you still want to run this script? [y/n] " -n 1 -r
Expand Down

0 comments on commit 7363e54

Please sign in to comment.