Skip to content

Commit 9acee40

Browse files
Merge pull request #222 from jeremiaswerner/walk_init
intial version to support walk milestone and beta version
2 parents 4810729 + cfebd56 commit 9acee40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+36951
-0
lines changed

beta/serverless-fleets/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*sshkey*
2+
custom_*
3+
.rclone*
4+
data/taskstore/*
5+
!data/taskstore/.keep
6+
data/output/*
7+
!data/output/inferencing/.keep
8+
!data/output/docling/.keep
9+
!data/output/wordcount/.keep
10+
!data/output/simulation/.keep
11+
*/.DS_Store
12+
.DS_Store

beta/serverless-fleets/README.md

Lines changed: 578 additions & 0 deletions
Large diffs are not rendered by default.

beta/serverless-fleets/common.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/bash
2+
3+
# ==============================
4+
# COMMON FUNCTIONS
5+
# ==============================
6+
7+
RED="\033[31m"
8+
BLUE="\033[94m"
9+
GREEN="\033[32m"
10+
ENDCOLOR="\033[0m"
11+
12+
function print_error {
13+
echo -e "${RED}\n==========================================${ENDCOLOR}"
14+
echo -e "${RED} FAILED${ENDCOLOR}"
15+
echo -e "${RED}==========================================\n${ENDCOLOR}"
16+
echo -e "${RED}$1${ENDCOLOR}"
17+
echo -e ""
18+
}
19+
function print_msg {
20+
echo -e "${BLUE}$1${ENDCOLOR}"
21+
}
22+
function print_success {
23+
echo -e "${GREEN}$1${ENDCOLOR}"
24+
}
25+
26+
# Helper function to check whether prerequisites are installed
27+
function check_prerequisites {
28+
# Ensure that jq tool is installed
29+
if ! command -v jq &>/dev/null; then
30+
print_error "'jq' tool is not installed"
31+
exit 1
32+
fi
33+
}
34+
35+
# ==============================
36+
# COMMON IBMCLOUD HELPERS
37+
# ==============================
38+
39+
# helper function to check whether IBM Cloud CLI plugins should get updated, or not
40+
function ensure_plugin_is_up_to_date() {
41+
echo "Checking $1 ..."
42+
# check whether plugin is installed
43+
if ! ibmcloud plugin show $1 -q >/dev/null; then
44+
# install it
45+
ibmcloud plugin install $1 -f --quiet
46+
else
47+
# check whether there is an update available
48+
ibmcloud plugin update $1 -f --quiet
49+
fi
50+
}
51+
52+
function target_region {
53+
print_msg "\nTargetting IBM Cloud region '$1' ..."
54+
current_region=$(ibmcloud target --output JSON |jq -r '.region|.name')
55+
if [[ "$current_region" != "$1" ]]; then
56+
ibmcloud target -r $1 --quiet
57+
fi
58+
}
59+
60+
function target_resource_group {
61+
print_msg "\nTargetting resource group '$1' ..."
62+
current_resource_group_guid=$(ibmcloud target --output JSON |jq -r '.resource_group|.guid')
63+
new_resource_group_guid=$(ibmcloud resource group $1 -output json|jq -r '.[0].id')
64+
if [[ "$current_resource_group_guid" != "$new_resource_group_guid" ]]; then
65+
ibmcloud target -g $1 --quiet
66+
fi
67+
}
6.88 MB
Binary file not shown.
4.11 MB
Binary file not shown.
Binary file not shown.
4.12 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)