diff --git a/bin/bactivate b/bin/bactivate index 2c75acf0..6a49b2a1 100755 --- a/bin/bactivate +++ b/bin/bactivate @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Initial activation of a bubble server # # Usage: bactivate activation.json diff --git a/bin/bconst b/bin/bconst index 25e7dd8b..4675bb4f 100755 --- a/bin/bconst +++ b/bin/bconst @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Write a constant value to stdout. # # This will only ever write the constant value to stdout if it can successfully be read. diff --git a/bin/bdecrypt b/bin/bdecrypt index 2edfe29c..2b3a3212 100755 --- a/bin/bdecrypt +++ b/bin/bdecrypt @@ -2,6 +2,8 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # +# Decrypt data using the Bubble database's encryption key +# SCRIPT="${0}" SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd) . ${SCRIPT_DIR}/bubble_common diff --git a/bin/bdelete b/bin/bdelete index f62a37bc..29f81ae9 100755 --- a/bin/bdelete +++ b/bin/bdelete @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP DELETE against the API # # Usage: diff --git a/bin/bencrypt b/bin/bencrypt index aca75b5b..1f1b9dc4 100755 --- a/bin/bencrypt +++ b/bin/bencrypt @@ -2,6 +2,8 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # +# Encrypt data using the Bubble database's encryption key +# SCRIPT="${0}" SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd) . ${SCRIPT_DIR}/bubble_common diff --git a/bin/bget b/bin/bget index 5fa04240..e82183cd 100755 --- a/bin/bget +++ b/bin/bget @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP GET against the API # # Usage: diff --git a/bin/bgeti b/bin/bgeti index 77a6ec56..e6213c4b 100755 --- a/bin/bgeti +++ b/bin/bgeti @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP GET against the API, then print out the "uuid" attribute only # # Usage: diff --git a/bin/bgeti1 b/bin/bgeti1 index b993b976..77215036 100755 --- a/bin/bgeti1 +++ b/bin/bgeti1 @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP GET against the API, then print out the "uuid" attribute only, and only the first one # # Usage: diff --git a/bin/bgetn b/bin/bgetn index 503cdd75..12b70880 100755 --- a/bin/bgetn +++ b/bin/bgetn @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP GET against the API, then print out the "name" attribute only # # Usage: diff --git a/bin/bgetn1 b/bin/bgetn1 index f9bb35ef..7f591d38 100755 --- a/bin/bgetn1 +++ b/bin/bgetn1 @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP GET against the API, then print out the "name" attribute only, and only the first one # # Usage: diff --git a/bin/bmodel b/bin/bmodel index f4bb0b6b..097212bc 100755 --- a/bin/bmodel +++ b/bin/bmodel @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Write a model to a bubble server # # Usage: bmodel [-u/--update-all] model-file diff --git a/bin/bpatch b/bin/bpatch index d7f4ba1a..188eb07d 100755 --- a/bin/bpatch +++ b/bin/bpatch @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Usage: # # bpatch [user@]hostname [norestart] diff --git a/bin/bpatchfull b/bin/bpatchfull index 5a8be782..04e96ce2 100755 --- a/bin/bpatchfull +++ b/bin/bpatchfull @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Usage: # # bpatchfull [user@]hostname [norestart] diff --git a/bin/bpost b/bin/bpost index 95c80f20..220b9b3e 100755 --- a/bin/bpost +++ b/bin/bpost @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP POST against the API # # Usage: diff --git a/bin/bposte b/bin/bposte index 2feb81f5..e1f50f4f 100755 --- a/bin/bposte +++ b/bin/bposte @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP POST against the API with an empty request entity # # Usage: diff --git a/bin/bput b/bin/bput index 37095a21..66c2737e 100755 --- a/bin/bput +++ b/bin/bput @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP PUT against the API # # Usage: diff --git a/bin/bpute b/bin/bpute index 44767e1b..6918ae50 100755 --- a/bin/bpute +++ b/bin/bpute @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run an HTTP PUT against the API with an empty request entity # # Usage: diff --git a/bin/bpyvenv.sh b/bin/bpyvenv.sh index 781a641e..591ad631 100755 --- a/bin/bpyvenv.sh +++ b/bin/bpyvenv.sh @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Set up python venv to run scripts in bin # function die { diff --git a/bin/bscript b/bin/bscript index c092a3d7..41080e7e 100755 --- a/bin/bscript +++ b/bin/bscript @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Run a local JSON API script against a remote API server # # Usage: diff --git a/bin/bubble b/bin/bubble index be5160dd..e2b899e4 100755 --- a/bin/bubble +++ b/bin/bubble @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Bubble client script. Wraps the run.sh script. # # Usually not called directly, instead use one of the higher-level wrappers: sync-model, run-script diff --git a/bin/bubble_common b/bin/bubble_common index 813f1c97..5eeb17d9 100755 --- a/bin/bubble_common +++ b/bin/bubble_common @@ -2,6 +2,8 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # +# Utility functions and standard pre-processing for many bubble CLI commands. +# function die() { if [[ -z "${SCRIPT}" ]]; then echo 1>&2 "${1}" diff --git a/bin/bunlock b/bin/bunlock index baeeaa58..fc735513 100755 --- a/bin/bunlock +++ b/bin/bunlock @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Unlock a new bubble # # Usage: diff --git a/bin/cleanup_bubble_databases b/bin/cleanup_bubble_databases index f27f9e25..84717ee3 100755 --- a/bin/cleanup_bubble_databases +++ b/bin/cleanup_bubble_databases @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Drop the various temporary databases that sometimes get left around by the tests # Do not run this command while tests are running # diff --git a/bin/git_update_bubble.sh b/bin/git_update_bubble.sh index b0f7e5c6..6c218110 100755 --- a/bin/git_update_bubble.sh +++ b/bin/git_update_bubble.sh @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Update repository from master, including submodules, and rebuild bubble jar file # # Usage: diff --git a/bin/install_packer.sh b/bin/install_packer.sh index 506260fe..10b0902e 100755 --- a/bin/install_packer.sh +++ b/bin/install_packer.sh @@ -2,6 +2,10 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # +# Installs Packer and the Packer Vultr plugin. +# +# It is safe to run this command multiple times, it is idempotent. +# function die { echo 1>&2 "${1}" exit 1 diff --git a/bin/jq-all-vals b/bin/jq-all-vals index 16779819..503a6737 100755 --- a/bin/jq-all-vals +++ b/bin/jq-all-vals @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Print all values for a JSON property name, among any given JSON via stdin. # JSON could be object, array, nested objects, etc. # diff --git a/bin/list_bubble_databases b/bin/list_bubble_databases index 4480b383..b8d0e025 100755 --- a/bin/list_bubble_databases +++ b/bin/list_bubble_databases @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # List bubble databases # # Usage: diff --git a/bin/new_bubble.sh b/bin/new_bubble.sh deleted file mode 100755 index a6af7087..00000000 --- a/bin/new_bubble.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ -# -# -# Launch a new bubble from a sage node -# -# Usage: new_bubble.sh config-file -# -# config-file : a JSON file with parameters to indicate how the bubble should be created -# see models/include/new_bubble.json for all parameters -# -# Minimally required JSON properties: -# sageFqdn : fully-qualified domain name (FQDN) of a bubble sage. This must be a valid sage node. -# network : network name of the bubble to create. This network must *not* already exist. -# -# For example: -# { -# "sageFqdn": "bubble-sage.example.com", -# "network": "mynetwork" -# } -# -# Environment variables -# -# BUBBLE_API : which API to use. Default is local (http://127.0.0.1:PORT, where PORT is found in .bubble.env) -# BUBBLE_USER : account to use. Default is root -# BUBBLE_PASS : password for account. Default is root -# BUBBLE_ENV : env file to load. Default is ~/.bubble.env or /home/bubble/api/bubble.env (whichever is found first) -# DEBUG_PORT : if set, this is the port number the client will wait for a debugger to attach before starting -# BUBBLE_INCLUDE : when using the sync-model and run-script commands, this is the directory to find included files -# For sync-model and migrate-model, the default is the current directory. -# For run-script, the default is a directory named "tests" within the current directory -# BUBBLE_SCRIPTS : location of run.sh script. Default is to assume it is in the same directory containing this script -# -SCRIPT="${0}" -SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd) -. ${SCRIPT_DIR}/bubble_common - -CONFIG_JSON="${1:?no config json provided}" -shift - -cat ${CONFIG_JSON} | exec ${SCRIPT_DIR}/bscript ${SCRIPT_DIR}/../scripts/new_bubble.json ${@} --call-include --vars - diff --git a/bin/prep_bubble_jar b/bin/prep_bubble_jar index 1cd99555..b84bc6ea 100755 --- a/bin/prep_bubble_jar +++ b/bin/prep_bubble_jar @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Prepares the bubble.jar file for active usage. # # 1. Copy scripts to bubble-server/target/classes/scripts diff --git a/bin/reset_bubble_db b/bin/reset_bubble_db index 5c5ce379..8d0a01c2 100755 --- a/bin/reset_bubble_db +++ b/bin/reset_bubble_db @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Reset the local "bubble" database # # Usage: reset_bubble_db [debug] diff --git a/bin/reset_bubble_full b/bin/reset_bubble_full index e743cb00..969c1a56 100755 --- a/bin/reset_bubble_full +++ b/bin/reset_bubble_full @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Perform a full reset of Bubble. Removes the database and all locally stored files # # Usage: reset_bubble_full diff --git a/bin/reset_bubble_logs b/bin/reset_bubble_logs index 77d55dfb..5fb8066a 100755 --- a/bin/reset_bubble_logs +++ b/bin/reset_bubble_logs @@ -2,7 +2,6 @@ # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # -# # Truncate all bubble logs # BUBBLE_LOGS_DIR=/var/log/bubble