The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

4 роки тому
4 роки тому
4 роки тому
Introduce packer support (#18) cleanups and fixes, packer is ready to roll add errorApi endpoint initialize mitmproxy dependencies packer deployments finally working fix virtualenv call for ubuntu 20.04 WIP. update to ubuntu 20.04. fixing algo installation WIP. packer fixes remove unused constant WIP. packer basics working for ec2 Merge branch 'master' of git.bubblev.org:bubblev/bubble into cobbzilla/introduce_packer remove automation dir, all moved to resources log pg autovacuum if longer than 250ms touch install marker for algo set mitmproxy as owner of all mitmproxy files add hostname to packer image name avoid closing progress meter prematurely WIP. parallelize node startup, fix packer bugs clarify docs add missing vars, algo tweaks add missing vars, update algo hash WIP. improving algo/mitmproxy packer stuff install packer for sage, call packer from proper location Use compute driver to get regions improve comments wait longer before polling new vultr server, avoid spurious ok status unquote simple filenames WIP. Use packer key, no more instance ssh key. Change API installation. Simplify packer/ansible. rename bubble_finalizer to just finalizer, remove default_roles filter servers/images based on installType for now, consider packer image OK if bubble version matches add algo/mitm roles to packer. add installType to BubbleNode fix NODE_ROLES file templatize packer file and playbook, use same template for sage and node WIP: refactor addAllRegions WIP: do not re-create identical images WIP: packer build for vultr now working Merge branch 'master' of git.bubblev.org:bubblev/bubble into cobbzilla/introduce_packer WIP. working on vultr packer builds WIP: packer image creation working for digitalocean WIP: packer basics working for digitalocean add packer endpoints, introduce packer support to cloud compute drivers remove roles endpoints AnsibleRole is no longer an model entity. Introduce Packer. Merge branch 'sfedoriv/APIAddSupportForAmazonEC2ComputeCloudService' of git.bubblev.org:bubblev/bubble into sfedoriv/APIAddSupportForAmazonEC2ComputeCloudService Merge branch 'master' of git.bubblev.org:bubblev/bubble into sfedoriv/APIAddSupportForAmazonEC2ComputeCloudService Merge branch 'master' into sfedoriv/APIAddSupportForAmazonEC2ComputeCloudService Merge branch 'master' into sfedoriv/APIAddSupportForAmazonEC2ComputeCloudService Merge branch 'master' into sfedoriv/APIAddSupportForAmazonEC2ComputeCloudService Merge branch 'master' into sfedoriv/APIAddSupportForAmazonEC2ComputeCloudService Add instance count to script Co-authored-by: Jonathan Cobb <jonathan@kyuss.org> Co-authored-by: Svitlana <sfedoriv@itekako.com> Reviewed-on: https://git.bubblev.org/bubblev/bubble/pulls/18
4 роки тому
4 роки тому
4 роки тому
4 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. function die {
  6. if [[ -z "${SCRIPT}" ]] ; then
  7. echo 1>&2 "${1}"
  8. else
  9. echo 1>&2 "${SCRIPT}: ${1}"
  10. fi
  11. exit 1
  12. }
  13. function handle_help_request () {
  14. if [[ -z "${2}" ]] ; then
  15. return
  16. fi
  17. if [[ ${2} == "-h" || ${2} == "--help" ]] ; then
  18. while IFS='' read -r line || [[ -n "$line" ]]; do
  19. if [[ ${line} =~ ^#.* ]] ; then
  20. if [[ ! ${line} =~ ^#!/bin/bash.* ]] ; then
  21. echo "${line}"
  22. fi
  23. else
  24. break
  25. fi
  26. done < "${1}"
  27. exit 1
  28. fi
  29. }
  30. function make_temp () {
  31. prefix="${1}"
  32. suffix="${2}"
  33. echo "$(mktemp ${prefix}.XXXXXXXX${suffix})"
  34. }
  35. function make_temp_dir () {
  36. prefix="${1}"
  37. suffix="${2}"
  38. echo "$(mktemp -d ${prefix}.XXXXXXXX${suffix})"
  39. }
  40. function quote_args () {
  41. args=""
  42. for i in "$@"; do
  43. if [[ "$i" =~ \ |\' ]] ; then
  44. i="${i//\\/\\\\}"
  45. args="$args \"${i//\"/\\\"}\""
  46. else
  47. args="$args ${i}"
  48. fi
  49. done
  50. echo -n ${args}
  51. }
  52. handle_help_request ${0} ${1}
  53. # Ensure we can find run.sh
  54. if [[ -z "${BUBBLE_SCRIPTS}" ]] ; then
  55. RUN_SH="$(find $(cd $(dirname ${0}) && pwd) -type f -name "run.sh" | head -1)"
  56. if [[ -z "${RUN_SH}" ]] ; then
  57. RUN_SH="$(find . -type f -name "run.sh" | head -1)"
  58. fi
  59. if [[ -z "${RUN_SH}" ]] ; then
  60. die "run.sh script not found. Set BUBBLE_SCRIPTS to be the directory containing run.sh"
  61. fi
  62. BUBBLE_SCRIPTS="$(dirname "${RUN_SH}")"
  63. elif [[ ! -f "${BUBBLE_SCRIPTS}/run.sh" ]] ; then
  64. die "run.sh script not found in BUBBLE_SCRIPTS dir (${BUBBLE_SCRIPTS})"
  65. fi
  66. if [[ -z "${BUBBLE_PASS}" ]] ; then
  67. if [[ ! -z "${REQUIRE_BUBBLE_PASS}" ]] ; then
  68. die "No BUBBLE_PASS env var defined"
  69. fi
  70. BUBBLE_PASS=password
  71. fi
  72. if [[ -z "${BUBBLE_USER}" ]] ; then
  73. if [[ ! -z "${REQUIRE_BUBBLE_USER}" ]] ; then
  74. die "No BUBBLE_USER env var defined"
  75. fi
  76. BUBBLE_USER=root
  77. fi
  78. if [[ -z "${BUBBLE_JAR}" ]] ; then
  79. if [[ -f "${HOME}/api/bubble.jar" ]] ; then
  80. BUBBLE_JAR="${HOME}/api/bubble.jar"
  81. elif [[ -f "/home/bubble/api/bubble.jar" ]] ; then
  82. BUBBLE_JAR="/home/bubble/api/bubble.jar"
  83. elif [[ -f "${BUBBLE_SCRIPTS}/../bubble.jar" ]] ; then
  84. BUBBLE_JAR="${BUBBLE_SCRIPTS}/../bubble.jar"
  85. else
  86. BUBBLE_JAR="$(find ${BUBBLE_SCRIPTS}/../bubble-server/target -type f -name "bubble*.jar" | head -1)"
  87. fi
  88. fi
  89. if [[ -z "${BUBBLE_JAR}" ]] ; then
  90. echo 1>&2 "warning: bubble jar could not be located"
  91. fi
  92. # Check to see if we are on the PATH, if not suggest that we could be
  93. BUBBLE_BIN="$(cd $(dirname ${0}) && pwd)"
  94. if [[ -z "${BUBBLE_SKIP_PATH_WARNING}" && -z "$(which $(basename ${0}))" ]] ; then
  95. echo 1>&2 "Note: ${BUBBLE_BIN} is not on your PATH. To make things easier, add it to your PATH:"
  96. echo 1>&2 ""
  97. echo 1>&2 "export PATH=\${PATH}:${BUBBLE_BIN}"
  98. echo 1>&2 ""
  99. export BUBBLE_SKIP_PATH_WARNING=1
  100. fi