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

3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Bubble Packer Images
  2. A [packer image](https://packer.io) is way to initialize a new cloud system with an operating system and
  3. software and files pre-installed. This is an oversimplified explanation but will suffice for our current needs.
  4. Before packer images, we launched Bubbles onto "blank" Ubuntu systems and then did
  5. tons of installation and configuration. It took 20+ minutes to launch a new Bubble.
  6. We decided we could do better. Packer allows us to create Ubuntu images that already have
  7. PostgreSQL, Redis and nginx installed and configured, and lots more.
  8. Launching a Bubble is now faster (usually 10 minutes or less) because all the standard software
  9. and configs are already present on the packer image that each launch starts with.
  10. We can make it even faster, but getting a new Bubble launched in under 10 minutes is a real accomplishment,
  11. and Packer makes it possible.
  12. ## Image Types
  13. There are two types of packer images: `sage` and `node`
  14. A `sage` image is for deploying new Bubbles in Launcher mode. A launcher is called a `sage` in the Bubble API.
  15. A `node` image is for deploying new Bubbles in Node mode. A regular Bubble that acts as a VPN for devices is called a `node` in the Bubble API.
  16. Bubble will automatically use the appropriate image type based on the Launch Type.
  17. To set the Launch Type: on the Bubble launch screen, click the "Launch with Advanced Settings" link.
  18. When using the API, set the `launchType` property in the JSON request that creates the Bubble.
  19. ## Launching a Bubble while Packer Images are Building
  20. If you try to launch a Bubble before the required packer image is ready, your Bubble launcher will detect that the image
  21. is in the process of being built, and wait until it is ready before trying to use them.
  22. ## Image Validity
  23. The packer images are tied to a specific Bubble version. As long as the Bubble API launcher can find packer images
  24. that match its version, it will be able to launch Bubbles.
  25. When your Bubble is upgraded, its version changes, so the old packer images are no longer valid.
  26. Your Bubble will automatically build new images the next time a Bubble is launched.
  27. If you'd prefer not to add a 20 minute delay (as packer images are built) to the next Bubble launch, you
  28. can manually rebuild the images after upgrading your Bubble server. See below.
  29. ## Manually Rebuilding Packer Images
  30. To ensure that all required packer images exist (build them if needed):
  31. ./bin/pack_bubble
  32. For more information, see:
  33. ./bin/pack_bubble --help
  34. Note: to use the `bin` tools, define environment variables `BUBBLE_USER`, `BUBBLE_PASS`, and `BUBBLE_API`
  35. appropriately for your Bubble. For example:
  36. export BUBBLE_USER=user@example.com
  37. export BUBBLE_PASSWORD=password
  38. export BUBBLE_API=https://bubble.example.com/api # deployed launcher
  39. export BUBBLE_API=http://127.0.0.1:8090/api # local launcher
  40. ./bin/pack_bubble