The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

new_bubble.sh 1.9 KiB

4 år sedan
4 år sedan
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 år sedan
4 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #
  6. # Launch a new bubble from a sage node
  7. #
  8. # Usage: new_bubble.sh config-file
  9. #
  10. # config-file : a JSON file with parameters to indicate how the bubble should be created
  11. # see models/include/new_bubble.json for all parameters
  12. #
  13. # Minimally required JSON properties:
  14. # sageFqdn : fully-qualified domain name (FQDN) of a bubble sage. This must be a valid sage node.
  15. # network : network name of the bubble to create. This network must *not* already exist.
  16. #
  17. # For example:
  18. # {
  19. # "sageFqdn": "bubble-sage.example.com",
  20. # "network": "mynetwork"
  21. # }
  22. #
  23. # Environment variables
  24. #
  25. # BUBBLE_API : which API to use. Default is local (http://127.0.0.1:PORT, where PORT is found in .bubble.env)
  26. # BUBBLE_USER : account to use. Default is root
  27. # BUBBLE_PASS : password for account. Default is root
  28. # BUBBLE_ENV : env file to load. Default is ~/.bubble.env or /home/bubble/api/bubble.env (whichever is found first)
  29. # DEBUG_PORT : if set, this is the port number the client will wait for a debugger to attach before starting
  30. # BUBBLE_INCLUDE : when using the sync-model and run-script commands, this is the directory to find included files
  31. # For sync-model and migrate-model, the default is the current directory.
  32. # For run-script, the default is a directory named "tests" within the current directory
  33. # BUBBLE_SCRIPTS : location of run.sh script. Default is to assume it is in the same directory containing this script
  34. #
  35. SCRIPT="${0}"
  36. SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
  37. . ${SCRIPT_DIR}/bubble_common
  38. CONFIG_JSON="${1:?no config json provided}"
  39. shift
  40. cat ${CONFIG_JSON} | exec ${SCRIPT_DIR}/bscript ${SCRIPT_DIR}/../scripts/new_bubble.json ${@} --call-include --vars -