Skip to content

Commit

Permalink
Oh yeah and that thing
Browse files Browse the repository at this point in the history
  • Loading branch information
pintoflager committed Feb 13, 2023
1 parent 2b1ac58 commit 60797da
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dependency.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

[dependency.sh]
optional = false
on_level = "Node"
on_level = "Node" # Node | Group | Project | Commander / Client
collection = "Executor"
21 changes: 13 additions & 8 deletions executor/sh/install.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
#!/usr/bin/env sh

platform="$1"
role="$1"

# App installation tasks on commander node. Runs first
if [ "$platform" = 'commander' ]; then
carburator print terminal info "Executing install script on $platform"
# App installation tasks on a local client node. Runs first
if [ "$role" = 'client' ]; then
carburator print terminal info "Executing install script on $role"
fi

# App installation tasks on remote worker node.
if [ "$platform" = 'worker' ]; then
carburator print terminal info "Executing install script on $platform"
if [ "$role" = 'worker' ]; then
carburator print terminal info "Executing install script on $role"
fi

# App installation tasks on remote commander node.
if [ "$role" = 'commander' ]; then
carburator print terminal info "Executing install script on $role"
fi

# Bash needs bash
if ! carburator fn integration-installed bash; then
if ! carburator has program bash; then
carburator print terminal error \
"Missing required program bash. Please install it before proceeding."
exit 120
fi

# Just a reminder, to figure out where (any) script runs:
# if [[ $(carburator node platform) == 'commander' ]]; then ...... ; fi
# if [[ $(carburator node role) == 'commander' ]]; then ...... ; fi
2 changes: 1 addition & 1 deletion package.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "bash"
version = "0.1.0"
collection = "Executor"
platforms = ["Commander", "Worker"]
platforms = ["Client", "Commander", "Worker"]

retry_times = 3
retry_interval = 10

0 comments on commit 60797da

Please sign in to comment.